Merge tizen patch based on 1.12.2
authorSejun Park <sejun79.park@samsung.com>
Thu, 9 Nov 2017 07:57:49 +0000 (16:57 +0900)
committerSejun Park <sejun79.park@samsung.com>
Thu, 9 Nov 2017 07:57:49 +0000 (16:57 +0900)
Change-Id: I3de5759ac30cd4932ca8a256b59d8ecc44e97ea8

80 files changed:
.gbs.conf
.gitignore
.gitmodules
Makefile.am
common/Makefile.am [deleted file]
common/extract-release-date-from-doap-file [deleted file]
common/gst-autogen.sh [deleted file]
common/m4/Makefile.am [deleted file]
common/m4/README [deleted file]
common/m4/as-ac-expand.m4 [deleted file]
common/m4/as-auto-alt.m4 [deleted file]
common/m4/as-compiler-flag.m4 [deleted file]
common/m4/as-compiler.m4 [deleted file]
common/m4/as-docbook.m4 [deleted file]
common/m4/as-gcc-inline-assembly.m4 [deleted file]
common/m4/as-libtool-tags.m4 [deleted file]
common/m4/as-libtool.m4 [deleted file]
common/m4/as-python.m4 [deleted file]
common/m4/as-version.m4 [deleted file]
common/m4/ax_create_stdint_h.m4 [deleted file]
common/m4/check.m4 [deleted file]
common/m4/glib-gettext.m4 [deleted file]
common/m4/gst-arch.m4 [deleted file]
common/m4/gst-args.m4 [deleted file]
common/m4/gst-check.m4 [deleted file]
common/m4/gst-debuginfo.m4 [deleted file]
common/m4/gst-default.m4 [deleted file]
common/m4/gst-doc.m4 [deleted file]
common/m4/gst-dowhile.m4 [deleted file]
common/m4/gst-error.m4 [deleted file]
common/m4/gst-feature.m4 [deleted file]
common/m4/gst-function.m4 [deleted file]
common/m4/gst-gettext.m4 [deleted file]
common/m4/gst-glib2.m4 [deleted file]
common/m4/gst-libxml2.m4 [deleted file]
common/m4/gst-package-release-datetime.m4 [deleted file]
common/m4/gst-parser.m4 [deleted file]
common/m4/gst-platform.m4 [deleted file]
common/m4/gst-plugin-docs.m4 [deleted file]
common/m4/gst-plugindir.m4 [deleted file]
common/m4/gst-valgrind.m4 [deleted file]
common/m4/gst-x11.m4 [deleted file]
common/m4/gst.m4 [deleted file]
common/m4/gtk-doc.m4 [deleted file]
common/m4/introspection.m4 [deleted file]
common/m4/orc.m4 [deleted file]
common/m4/pkg.m4 [deleted file]
config/bellagio/gstomx.conf
config/exynos/gstomx.conf
config/exynos64/gstomx.conf
config/rpi/gstomx.conf
configure.ac
examples/egl/testegl.c [changed mode: 0644->0755]
omx/Makefile.am [changed mode: 0644->0755]
omx/gstomx.c [changed mode: 0644->0755]
omx/gstomx.h [changed mode: 0644->0755]
omx/gstomxaudiodec.c
omx/gstomxaudioenc.c [changed mode: 0644->0755]
omx/gstomxbufferpool.c
omx/gstomxbufferpool.h
omx/gstomxh264dec.c
omx/gstomxh264dec.h
omx/gstomxh264enc.c [changed mode: 0644->0755]
omx/gstomxh264enc.h [changed mode: 0644->0755]
omx/gstomxh265dec.c [new file with mode: 0644]
omx/gstomxh265dec.h [new file with mode: 0644]
omx/gstomxh265enc.c [new file with mode: 0644]
omx/gstomxh265enc.h [new file with mode: 0644]
omx/gstomxvideo.c
omx/gstomxvideodec.c
omx/gstomxvideodec.h [changed mode: 0644->0755]
omx/gstomxvideoenc.c [changed mode: 0644->0755]
omx/gstomxvideoenc.h [changed mode: 0644->0755]
omx/gstomxvp9dec.c [new file with mode: 0644]
omx/gstomxvp9dec.h [new file with mode: 0644]
omx/openmax/OMX_IVCommon.h
omx/openmax/OMX_Index.h
omx/openmax/OMX_VideoExt.h
packaging/common.tar.gz [new file with mode: 0644]
packaging/gst-omx.spec

index fa9fdc5..23d6959 100644 (file)
--- a/.gbs.conf
+++ b/.gbs.conf
@@ -1,3 +1,3 @@
 [general]
-upstream_branch = upstream
-upstream_tag = ${upstreamversion}
+upstream_branch = upstream/1.12
+upstream_tag = upstream/${upstreamversion}
index 530a8f2..0fdd1d3 100644 (file)
@@ -35,6 +35,10 @@ gst-omx-*.tar*
 *.orig
 *.rej
 tools/listcomponents
-/m4
+/m4/libtool.m4
+/m4/ltoptions.m4
+/m4/ltsugar.m4
+/m4/ltversion.m4
+/m4/lt~obsolete.m4
 Makefile.in
 Makefile
index a6b1eda..e69de29 100644 (file)
@@ -1,3 +0,0 @@
-[submodule "common"]
-       path = common
-       url = git://anongit.freedesktop.org/gstreamer/common
index 82affc6..b063bc1 100755 (executable)
@@ -1,4 +1,4 @@
-SUBDIRS = common omx tools config m4
+SUBDIRS = common omx tools m4
 
 if BUILD_EXAMPLES
 SUBDIRS += examples
diff --git a/common/Makefile.am b/common/Makefile.am
deleted file mode 100644 (file)
index 25966fc..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-SUBDIRS = m4
-
-EXTRA_DIST = \
-       ChangeLog \
-       gettext.patch \
-       glib-gen.mak gtk-doc.mak upload-doc.mak \
-       cruft.mak release.mak win32.mak po.mak \
-       parallel-subdirs.mak \
-       gst-autogen.sh \
-       check-exports \
-       c-to-xml.py mangle-tmpl.py scangobj-merge.py \
-       gtk-doc-plugins.mak \
-       plugins.xsl gstdoc-scangobj \
-       gst.supp check.mak \
-       coverage/lcov.mak \
-       coverage/coverage-report.pl \
-       coverage/coverage-report.xsl \
-       coverage/coverage-report-entry.pl \
-       download-translations \
-       extract-release-date-from-doap-file \
-       gst-indent \
-       orc.mak
diff --git a/common/extract-release-date-from-doap-file b/common/extract-release-date-from-doap-file
deleted file mode 100644 (file)
index f57e307..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-# Shell script to extract the date given a release version and a .doap file
-
-if test "x$1" = "x" -o "x$2" = "x" -o ! -s "$2"; then
-  echo "Usage: $0 RELEASE-VERSION-NUMBER DOAP-FILE" >&2;
-  exit 1
-fi
-
-if ! grep '<Project' "$2" >/dev/null ; then
-  echo "$2 does not look lika a .doap file" >&2;
-  exit 1
-fi
-
-if ! grep "$1" "$2" >/dev/null ; then
-  echo "$2 contains no reference to a version $1" >&2;
-  exit 1
-fi
-
-awk 'BEGIN {x=0}
-{
-if ( $0 ~ /<release>/ ) {x=1; chunk=""}
-if (x==1) {
-  if ($0 ~ /<revision>/) { chunk = chunk $0 }
-  if ($0 ~ /<created>/) { chunk = chunk $0 }
-}
-if ($0 ~ /<\/release>/) {x=0; print chunk}
-}' < "$2" | \
-\
-grep '<revision>'"$1"'</revision>' | \
-\
-sed -e 's/^.*<created>//' -e 's/<\/created>.*$//'
-
diff --git a/common/gst-autogen.sh b/common/gst-autogen.sh
deleted file mode 100644 (file)
index 78cab66..0000000
+++ /dev/null
@@ -1,345 +0,0 @@
-# a silly hack that generates autoregen.sh but it's handy
-# Remove the old autoregen.sh first to create a new file,
-# as the current one may be being read by the shell executing
-# this script.
-if [ -f "autoregen.sh" ]; then
-  rm autoregen.sh
-fi
-echo "#!/bin/sh" > autoregen.sh
-echo "./autogen.sh $@ \$@" >> autoregen.sh
-chmod +x autoregen.sh
-
-# helper functions for autogen.sh
-
-debug ()
-# print out a debug message if DEBUG is a defined variable
-{
-  if test ! -z "$DEBUG"
-  then
-    echo "DEBUG: $1"
-  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 ()
-{
-  if test "x$1" = "x"; then
-    return 0
-  fi
-
-  while test "x$1" != "x" ; do
-    optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
-    case "$1" in
-      --noconfigure)
-          NOCONFIGURE=defined
-         AUTOGEN_EXT_OPT="$AUTOGEN_EXT_OPT --noconfigure"
-          echo "+ configure run disabled"
-          shift
-          ;;
-      --nocheck)
-         AUTOGEN_EXT_OPT="$AUTOGEN_EXT_OPT --nocheck"
-          NOCHECK=defined
-          echo "+ autotools version check disabled"
-          shift
-          ;;
-      -d|--debug)
-          DEBUG=defined
-         AUTOGEN_EXT_OPT="$AUTOGEN_EXT_OPT --debug"
-          echo "+ debug output enabled"
-          shift
-          ;;
-      -h|--help)
-          echo "autogen.sh (autogen options) -- (configure options)"
-          echo "autogen.sh help options: "
-          echo " --noconfigure            don't run the configure script"
-          echo " --nocheck                don't do version checks"
-          echo " --debug                  debug the autogen process"
-          echo
-          echo " --with-autoconf PATH     use autoconf in PATH"
-          echo " --with-automake PATH     use automake in PATH"
-          echo
-          echo "Any argument either not in the above list or after a '--' will be "
-          echo "passed to ./configure."
-         exit 1
-          ;;
-      --with-automake=*)
-          AUTOMAKE=$optarg
-          echo "+ using alternate automake in $optarg"
-         CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-automake=$AUTOMAKE"
-          shift
-          ;;
-      --with-autoconf=*)
-          AUTOCONF=$optarg
-          echo "+ using alternate autoconf in $optarg"
-         CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-autoconf=$AUTOCONF"
-          shift
-          ;;
-      --) shift ; break ;;
-      *)
-          echo "+ passing argument $1 to configure"
-         CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT $1"
-          shift
-          ;;
-    esac
-  done
-
-  for arg do CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT $arg"; done
-  if test ! -z "$CONFIGURE_EXT_OPT"
-  then
-    echo "+ options passed to configure: $CONFIGURE_EXT_OPT"
-  fi
-}
-
-toplevel_check ()
-{
-  srcfile=$1
-  test -f $srcfile || {
-        echo "You must run this script in the top-level $package directory"
-        exit 1
-  }
-}
-
-tool_run ()
-{
-  tool=$1
-  options=$2
-  run_if_fail=$3
-  echo "+ running $tool $options..."
-  $tool $options || {
-    echo
-    echo $tool failed
-    eval $run_if_fail
-    exit 1
-  }
-}
-
-install_git_hooks ()
-{
-  if test -d .git; then
-    # install pre-commit hook for doing clean commits
-    for hook in pre-commit; do
-      if test ! \( -x .git/hooks/$hook -a -L .git/hooks/$hook \); then
-        echo "+ Installing git $hook hook"
-        rm -f .git/hooks/$hook
-        ln -s ../../common/hooks/$hook.hook .git/hooks/$hook || {
-          # if we couldn't create a symbolic link, try doing a plain cp
-          if cp common/hooks/pre-commit.hook .git/hooks/pre-commit; then
-            chmod +x .git/hooks/pre-commit;
-          else
-            echo "********** Couldn't install git $hook hook **********";
-          fi
-        }
-      fi
-    done
-  fi
-}
diff --git a/common/m4/Makefile.am b/common/m4/Makefile.am
deleted file mode 100644 (file)
index 3d387ee..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-EXTRA_DIST = \
-       README \
-       as-ac-expand.m4 \
-       as-auto-alt.m4 \
-       as-compiler-flag.m4 \
-       as-compiler.m4 \
-       as-docbook.m4 \
-       as-gcc-inline-assembly.m4 \
-       as-libtool.m4 \
-       as-libtool-tags.m4 \
-       as-python.m4 \
-       as-version.m4 \
-       ax_create_stdint_h.m4 \
-       glib-gettext.m4 \
-       gst-arch.m4 \
-       gst-args.m4 \
-       gst-check.m4 \
-       gst-debuginfo.m4 \
-       gst-default.m4 \
-       gst-doc.m4 \
-       gst-dowhile.m4 \
-       gst-error.m4 \
-       gst-feature.m4 \
-       gst-function.m4 \
-       gst-gettext.m4 \
-       gst-glib2.m4 \
-       gst-libxml2.m4 \
-       gst-parser.m4 \
-       gst-package-release-datetime.m4 \
-       gst-platform.m4 \
-       gst-plugindir.m4 \
-       gst-plugin-docs.m4 \
-       gst-valgrind.m4 \
-       gst-x11.m4 \
-       gst.m4 \
-       gtk-doc.m4 \
-       introspection.m4 \
-       pkg.m4 \
-       check.m4 \
-       orc.m4
diff --git a/common/m4/README b/common/m4/README
deleted file mode 100644 (file)
index 867a344..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-All aclocal .m4 files we need are put here and cat'd to acinclude.m4 in
-the source root.  Official ones (taken from the relevant devel packages)
-are named as-is, unofficial ones (or changed ones) get a gst-prefix.
diff --git a/common/m4/as-ac-expand.m4 b/common/m4/as-ac-expand.m4
deleted file mode 100644 (file)
index d6c9e33..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-dnl as-ac-expand.m4 0.2.0
-dnl autostars m4 macro for expanding directories using configure's prefix
-dnl thomas@apestaart.org
-
-dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
-dnl example
-dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
-dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
-
-AC_DEFUN([AS_AC_EXPAND],
-[
-  EXP_VAR=[$1]
-  FROM_VAR=[$2]
-
-  dnl first expand prefix and exec_prefix if necessary
-  prefix_save=$prefix
-  exec_prefix_save=$exec_prefix
-
-  dnl if no prefix given, then use /usr/local, the default prefix
-  if test "x$prefix" = "xNONE"; then
-    prefix="$ac_default_prefix"
-  fi
-  dnl if no exec_prefix given, then use prefix
-  if test "x$exec_prefix" = "xNONE"; then
-    exec_prefix=$prefix
-  fi
-
-  full_var="$FROM_VAR"
-  dnl loop until it doesn't change anymore
-  while true; do
-    new_full_var="`eval echo $full_var`"
-    if test "x$new_full_var" = "x$full_var"; then break; fi
-    full_var=$new_full_var
-  done
-
-  dnl clean up
-  full_var=$new_full_var
-  AC_SUBST([$1], "$full_var")
-
-  dnl restore prefix and exec_prefix
-  prefix=$prefix_save
-  exec_prefix=$exec_prefix_save
-])
diff --git a/common/m4/as-auto-alt.m4 b/common/m4/as-auto-alt.m4
deleted file mode 100644 (file)
index 3f7920d..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-dnl as-auto-alt.m4 0.0.2
-dnl autostars m4 macro for supplying alternate autotools versions to configure
-dnl thomas@apestaart.org
-dnl
-dnl AS_AUTOTOOLS_ALTERNATE()
-dnl
-dnl supplies --with arguments for autoconf, autoheader, automake, aclocal
-
-AC_DEFUN([AS_AUTOTOOLS_ALTERNATE],
-[
-  dnl allow for different autoconf version
-  AC_ARG_WITH(autoconf,
-    AC_HELP_STRING([--with-autoconf],
-                   [use a different autoconf for regeneration of Makefiles]),
-    [
-      unset AUTOCONF
-      AM_MISSING_PROG(AUTOCONF, ${withval})
-      AC_MSG_NOTICE([Using $AUTOCONF as autoconf])
-    ])
-
-  dnl allow for different autoheader version
-  AC_ARG_WITH(autoheader,
-    AC_HELP_STRING([--with-autoheader],
-                   [use a different autoheader for regeneration of Makefiles]),
-    [
-      unset AUTOHEADER
-      AM_MISSING_PROG(AUTOHEADER, ${withval})
-      AC_MSG_NOTICE([Using $AUTOHEADER as autoheader])
-    ])
-
-  dnl allow for different automake version
-  AC_ARG_WITH(automake,
-    AC_HELP_STRING([--with-automake],
-                   [use a different automake for regeneration of Makefiles]),
-    [
-      unset AUTOMAKE
-      AM_MISSING_PROG(AUTOMAKE, ${withval})
-      AC_MSG_NOTICE([Using $AUTOMAKE as automake])
-    ])
-
-  dnl allow for different aclocal version
-  AC_ARG_WITH(aclocal,
-    AC_HELP_STRING([--with-aclocal],
-                   [use a different aclocal for regeneration of Makefiles]),
-    [
-      unset ACLOCAL
-      AM_MISSING_PROG(ACLOCAL, ${withval})
-      AC_MSG_NOTICE([Using $ACLOCAL as aclocal])
-    ])
-])
diff --git a/common/m4/as-compiler-flag.m4 b/common/m4/as-compiler-flag.m4
deleted file mode 100644 (file)
index 8bb853a..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-dnl as-compiler-flag.m4 0.1.0
-
-dnl autostars m4 macro for detection of compiler flags
-
-dnl David Schleef <ds@schleef.org>
-dnl Tim-Philipp Müller <tim centricular net>
-
-dnl AS_COMPILER_FLAG(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED])
-dnl Tries to compile with the given CFLAGS.
-dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags,
-dnl and ACTION-IF-NOT-ACCEPTED otherwise.
-
-AC_DEFUN([AS_COMPILER_FLAG],
-[
-  AC_MSG_CHECKING([to see if compiler understands $1])
-
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS $1"
-
-  AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
-  CFLAGS="$save_CFLAGS"
-
-  if test "X$flag_ok" = Xyes ; then
-    $2
-    true
-  else
-    $3
-    true
-  fi
-  AC_MSG_RESULT([$flag_ok])
-])
-
-dnl AS_CXX_COMPILER_FLAG(CPPFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED])
-dnl Tries to compile with the given CPPFLAGS.
-dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags,
-dnl and ACTION-IF-NOT-ACCEPTED otherwise.
-
-AC_DEFUN([AS_CXX_COMPILER_FLAG],
-[
-  AC_REQUIRE([AC_PROG_CXX])
-
-  AC_MSG_CHECKING([to see if c++ compiler understands $1])
-
-  save_CPPFLAGS="$CPPFLAGS"
-  CPPFLAGS="$CPPFLAGS $1"
-
-  AC_LANG_PUSH(C++)
-
-  AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
-  CPPFLAGS="$save_CPPFLAGS"
-
-  if test "X$flag_ok" = Xyes ; then
-    $2
-    true
-  else
-    $3
-    true
-  fi
-
-  AC_LANG_POP(C++)
-
-  AC_MSG_RESULT([$flag_ok])
-])
-
-dnl AS_OBJC_COMPILER_FLAG(CPPFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED])
-dnl Tries to compile with the given CPPFLAGS.
-dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags,
-dnl and ACTION-IF-NOT-ACCEPTED otherwise.
-
-AC_DEFUN([AS_OBJC_COMPILER_FLAG],
-[
-  AC_REQUIRE([AC_PROG_OBJC])
-
-  AC_MSG_CHECKING([to see if Objective C compiler understands $1])
-
-  save_CPPFLAGS="$CPPFLAGS"
-  CPPFLAGS="$CPPFLAGS $1"
-
-  AC_LANG_PUSH([Objective C])
-
-  AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
-  CPPFLAGS="$save_CPPFLAGS"
-
-  if test "X$flag_ok" = Xyes ; then
-    $2
-    true
-  else
-    $3
-    true
-  fi
-
-  AC_LANG_POP([Objective C])
-
-  AC_MSG_RESULT([$flag_ok])
-])
-
diff --git a/common/m4/as-compiler.m4 b/common/m4/as-compiler.m4
deleted file mode 100644 (file)
index 309a060..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-dnl as-compiler.m4 0.1.0
-
-dnl autostars m4 macro for detection of compiler flavor
-
-dnl Thomas Vander Stichele <thomas at apestaart dot org>
-
-dnl $Id: as-compiler.m4,v 1.4 2004/06/01 09:44:19 thomasvs Exp $
-
-dnl AS_COMPILER(COMPILER)
-dnl will set variable COMPILER to
-dnl - gcc
-dnl - forte
-dnl - (empty) if no guess could be made
-
-AC_DEFUN([AS_COMPILER],
-[
-  as_compiler=
-  AC_MSG_CHECKING(for compiler flavour)
-
-  dnl is it gcc ?
-  if test "x$GCC" = "xyes"; then
-    as_compiler="gcc"
-  fi
-
-  dnl is it forte ?
-  AC_TRY_RUN([
-int main
-(int argc, char *argv[])
-{
-#ifdef __sun
-  return 0;
-#else
-  return 1;
-#endif
-}
-  ], as_compiler="forte", ,)
-
-  if test "x$as_compiler" = "x"; then
-    AC_MSG_RESULT([unknown !])
-  else
-    AC_MSG_RESULT($as_compiler)
-  fi
-  [$1]=$as_compiler
-])
diff --git a/common/m4/as-docbook.m4 b/common/m4/as-docbook.m4
deleted file mode 100644 (file)
index 2e27050..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-dnl AS_DOCBOOK([, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-dnl checks if xsltproc can build docbook documentation
-dnl (which is possible if the catalog is set up properly
-dnl I also tried checking for a specific version and type of docbook
-dnl but xsltproc seemed to happily run anyway, so we can't check for that
-dnl and version
-dnl this macro takes inspiration from
-dnl http://www.movement.uklinux.net/docs/docbook-autotools/configure.html
-AC_DEFUN([AS_DOCBOOK],
-[
-  XSLTPROC_FLAGS=--nonet
-  DOCBOOK_ROOT=
-  TYPE_LC=xml
-  TYPE_UC=XML
-  DOCBOOK_VERSION=4.1.2
-
-  if test -n "$XML_CATALOG_FILES"; then
-    oldIFS=$IFS
-    IFS=' '
-    for xml_catalog_file in $XML_CATALOG_FILES; do
-      if test -f $xml_catalog_file; then
-        XML_CATALOG=$xml_catalog_file
-        CAT_ENTRY_START='<!--'
-        CAT_ENTRY_END='-->'
-        break
-      fi
-    done
-    IFS=$oldIFS
-  elif test ! -f /etc/xml/catalog; then
-    for i in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh /usr/share/sgml/docbook/xsl-stylesheets/ /usr/local/share/xsl/docbook ;
-    do
-      if test -d "$i"; then
-        DOCBOOK_ROOT=$i
-      fi
-    done
-  else
-    XML_CATALOG=/etc/xml/catalog
-    CAT_ENTRY_START='<!--'
-    CAT_ENTRY_END='-->'
-  fi
-
-  dnl We need xsltproc to process the test
-  AC_CHECK_PROG(XSLTPROC,xsltproc,xsltproc,)
-  XSLTPROC_WORKS=no
-  if test -n "$XSLTPROC"; then
-    AC_MSG_CHECKING([whether xsltproc docbook processing works])
-
-    if test -n "$XML_CATALOG"; then
-      DB_FILE="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"
-    else
-      DB_FILE="$DOCBOOK_ROOT/xhtml/docbook.xsl"
-    fi
-    $XSLTPROC $XSLTPROC_FLAGS $DB_FILE >/dev/null 2>&1 << END
-<?xml version="1.0" encoding='ISO-8859-1'?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook $TYPE_UC V$DOCBOOK_VERSION//EN" "http://www.oasis-open.org/docbook/$TYPE_LC/$DOCBOOK_VERSION/docbookx.dtd">
-<book id="test">
-</book>
-END
-    if test "$?" = 0; then
-      XSLTPROC_WORKS=yes
-    fi
-    AC_MSG_RESULT($XSLTPROC_WORKS)
-  fi
-
-  if test "x$XSLTPROC_WORKS" = "xyes"; then
-    dnl execute ACTION-IF-FOUND
-    ifelse([$1], , :, [$1])
-  else
-    dnl execute ACTION-IF-NOT-FOUND
-    ifelse([$2], , :, [$2])
-  fi
-
-  AC_SUBST(XML_CATALOG)
-  AC_SUBST(XSLTPROC_FLAGS)
-  AC_SUBST(DOCBOOK_ROOT)
-  AC_SUBST(CAT_ENTRY_START)
-  AC_SUBST(CAT_ENTRY_END)
-])
diff --git a/common/m4/as-gcc-inline-assembly.m4 b/common/m4/as-gcc-inline-assembly.m4
deleted file mode 100644 (file)
index af32104..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-dnl as-gcc-inline-assembly.m4 0.1.0
-
-dnl autostars m4 macro for detection of gcc inline assembly
-
-dnl David Schleef <ds@schleef.org>
-
-dnl $Id$
-
-dnl AS_COMPILER_FLAG(ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED])
-dnl Tries to compile with the given CFLAGS.
-dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags,
-dnl and ACTION-IF-NOT-ACCEPTED otherwise.
-
-AC_DEFUN([AS_GCC_INLINE_ASSEMBLY],
-[
-  AC_MSG_CHECKING([if compiler supports gcc-style inline assembly])
-
-  AC_TRY_COMPILE([], [
-#ifdef __GNUC_MINOR__
-#if (__GNUC__ * 1000 + __GNUC_MINOR__) < 3004
-#error GCC before 3.4 has critical bugs compiling inline assembly
-#endif
-#endif
-__asm__ (""::) ], [flag_ok=yes], [flag_ok=no])
-
-  if test "X$flag_ok" = Xyes ; then
-    $1
-    true
-  else
-    $2
-    true
-  fi
-  AC_MSG_RESULT([$flag_ok])
-])
-
-
-AC_DEFUN([AS_GCC_ASM_POWERPC_FPU],
-[
-  AC_MSG_CHECKING([if compiler supports FPU instructions on PowerPC])
-
-  AC_TRY_COMPILE([], [__asm__ ("fadd 0,0,0"::) ], [flag_ok=yes], [flag_ok=no])
-
-  if test "X$flag_ok" = Xyes ; then
-    $1
-    true
-  else
-    $2
-    true
-  fi
-  AC_MSG_RESULT([$flag_ok])
-])
-
diff --git a/common/m4/as-libtool-tags.m4 b/common/m4/as-libtool-tags.m4
deleted file mode 100644 (file)
index 06f0ae4..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-dnl as-libtool-tags.m4 0.1.4
-
-dnl autostars m4 macro for selecting libtool "tags" (languages)
-
-dnl Andy Wingo does not claim credit for this macro
-dnl backported from libtool 1.6 by Paolo Bonzini
-dnl see http://lists.gnu.org/archive/html/libtool/2003-12/msg00007.html
-
-dnl $Id$
-
-dnl AS_LIBTOOL_TAGS([tags...])
-
-dnl example
-dnl AS_LIBTOOL_TAGS([]) for only C (no fortran, etc)
-
-dnl When AC_LIBTOOL_TAGS is used, I redefine _LT_AC_TAGCONFIG
-dnl to be more similar to the libtool 1.6 implementation, which
-dnl uses an m4 loop and m4 case instead of a shell loop.  This
-dnl way the CXX/GCJ/F77/RC tests are not always expanded.
-
-dnl AS_LIBTOOL_TAGS
-dnl ---------------
-dnl tags to enable
-AC_DEFUN([AS_LIBTOOL_TAGS],
-[m4_define([_LT_TAGS],[$1])
-m4_define([_LT_AC_TAGCONFIG], [
-  # redefined LT AC TAGCONFIG
-  if test -f "$ltmain"; then
-    if test ! -f "${ofile}"; then
-      AC_MSG_WARN([output file `$ofile' does not exist])
-    fi
-
-    if test -z "$LTCC"; then
-      eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
-      if test -z "$LTCC"; then
-        AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
-      else
-        AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
-      fi
-    fi
-
-    AC_FOREACH([_LT_TAG], _LT_TAGS,
-      echo THOMAS: tag _LT_TAG
-      [m4_case(_LT_TAG,
-      [CXX], [
-    if test -n "$CXX" && test "X$CXX" != "Xno"; then
-      echo "THOMAS: YAY CXX"
-      AC_LIBTOOL_LANG_CXX_CONFIG
-      available_tags="$available_tags _LT_TAG"
-    fi],
-      [F77], [
-    if test -n "$F77" && test "X$F77" != "Xno"; then
-      AC_LIBTOOL_LANG_F77_CONFIG
-      available_tags="$available_tags _LT_TAG"
-    fi],
-      [GCJ], [
-    if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
-      AC_LIBTOOL_LANG_GCJ_CONFIG
-      available_tags="$available_tags _LT_TAG"
-    fi],
-      [RC], [
-    if test -n "$RC" && test "X$RC" != "Xno"; then
-      AC_LIBTOOL_LANG_RC_CONFIG
-      available_tags="$available_tags _LT_TAG"
-    fi],
-      [m4_errprintn(m4_location[: error: invalid tag name: ]"_LT_TAG")
-      m4_exit(1)])
-    ])
-    echo THOMAS: available tags: $available_tags
-  fi
-  # Now substitute the updated list of available tags.
-  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
-    mv "${ofile}T" "$ofile"
-    chmod +x "$ofile"
-    AC_MSG_NOTICE([updated available libtool tags with $available_tags.])
-  else
-    rm -f "${ofile}T"
-    AC_MSG_ERROR([unable to update list of available tagged configurations.])
-
-  fi
-
-])dnl _LT_AC_TAG_CONFIG
-])
diff --git a/common/m4/as-libtool.m4 b/common/m4/as-libtool.m4
deleted file mode 100644 (file)
index 3b16095..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-dnl as-libtool.m4 0.1.4
-
-dnl autostars m4 macro for libtool versioning
-
-dnl Thomas Vander Stichele <thomas at apestaart dot org>
-
-dnl $Id: as-libtool.m4,v 1.10 2005/10/15 13:44:23 thomasvs Exp $
-
-dnl AS_LIBTOOL(PREFIX, CURRENT, REVISION, AGE, [RELEASE])
-
-dnl example
-dnl AS_LIBTOOL(GST, 2, 0, 0)
-
-dnl this macro
-dnl - defines [$PREFIX]_CURRENT, REVISION and AGE
-dnl - defines [$PREFIX]_LIBVERSION
-dnl - defines [$PREFIX]_LT_LDFLAGS to set versioning
-dnl - AC_SUBST's them all
-
-dnl if RELEASE is given, then add a -release option to the LDFLAGS
-dnl with the given release version
-dnl then use [$PREFIX]_LT_LDFLAGS in the relevant Makefile.am's
-
-dnl call AM_PROG_LIBTOOL after this call
-
-AC_DEFUN([AS_LIBTOOL],
-[
-  [$1]_CURRENT=[$2]
-  [$1]_REVISION=[$3]
-  [$1]_AGE=[$4]
-  [$1]_LIBVERSION=[$2]:[$3]:[$4]
-  AC_SUBST([$1]_CURRENT)
-  AC_SUBST([$1]_REVISION)
-  AC_SUBST([$1]_AGE)
-  AC_SUBST([$1]_LIBVERSION)
-
-  [$1]_LT_LDFLAGS="$[$1]_LT_LDFLAGS -version-info $[$1]_LIBVERSION"
-  if test ! -z "[$5]"
-  then
-    [$1]_LT_LDFLAGS="$[$1]_LT_LDFLAGS -release [$5]"
-  fi
-  AC_SUBST([$1]_LT_LDFLAGS)
-
-  LT_PREREQ([2.2.6])
-  LT_INIT([dlopen win32-dll disable-static])
-])
diff --git a/common/m4/as-python.m4 b/common/m4/as-python.m4
deleted file mode 100644 (file)
index eb9b175..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-## ------------------------
-## Python file handling
-## From Andrew Dalke
-## Updated by James Henstridge
-## Updated by Andy Wingo to loop through possible pythons
-## ------------------------
-
-# AS_PATH_PYTHON([MINIMUM-VERSION])
-
-# Adds support for distributing Python modules and packages.  To
-# install modules, copy them to $(pythondir), using the python_PYTHON
-# automake variable.  To install a package with the same name as the
-# automake package, install to $(pkgpythondir), or use the
-# pkgpython_PYTHON automake variable.
-
-# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
-# locations to install python extension modules (shared libraries).
-# Another macro is required to find the appropriate flags to compile
-# extension modules.
-
-# If your package is configured with a different prefix to python,
-# users will have to add the install directory to the PYTHONPATH
-# environment variable, or create a .pth file (see the python
-# documentation for details).
-
-# If the MINIMUM-VERSION argument is passed, AS_PATH_PYTHON will
-# cause an error if the version of python installed on the system
-# doesn't meet the requirement.  MINIMUM-VERSION should consist of
-# numbers and dots only.
-
-# Updated to loop over all possible python binaries by Andy Wingo
-# <wingo@pobox.com>
-# Updated to only warn and unset PYTHON if no good one is found
-
-AC_DEFUN([AS_PATH_PYTHON],
- [
-  dnl Find a version of Python.  I could check for python versions 1.4
-  dnl or earlier, but the default installation locations changed from
-  dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages
-  dnl in 1.5, and I don't want to maintain that logic.
-
-  dnl should we do the version check?
-  PYTHON_CANDIDATES="python python2.2 python2.1 python2.0 python2 \
-                     python1.6 python1.5"
-  ifelse([$1],[],
-         [AC_PATH_PROG(PYTHON, $PYTHON_CANDIDATES)],
-         [
-     AC_MSG_NOTICE(Looking for Python version >= $1)
-    changequote(<<, >>)dnl
-    prog="
-import sys, string
-minver = '$1'
-# split string by '.' and convert to numeric
-minver_info = map(string.atoi, string.split(minver, '.'))
-# we can now do comparisons on the two lists:
-if sys.version_info >= tuple(minver_info):
-       sys.exit(0)
-else:
-       sys.exit(1)"
-    changequote([, ])dnl
-
-    python_good=false
-    for python_candidate in $PYTHON_CANDIDATES; do
-      unset PYTHON
-      AC_PATH_PROG(PYTHON, $python_candidate) 1> /dev/null 2> /dev/null
-
-      if test "x$PYTHON" = "x"; then continue; fi
-
-      if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC; then
-        AC_MSG_CHECKING(["$PYTHON":])
-       AC_MSG_RESULT([okay])
-        python_good=true
-        break;
-      else
-        dnl clear the cache val
-        unset ac_cv_path_PYTHON
-      fi
-    done
-  ])
-
-  if test "$python_good" != "true"; then
-    AC_MSG_WARN([No suitable version of python found])
-    PYTHON=
-  else
-
-  AC_MSG_CHECKING([local Python configuration])
-
-  dnl Query Python for its version number.  Getting [:3] seems to be
-  dnl the best way to do this; it's what "site.py" does in the standard
-  dnl library.  Need to change quote character because of [:3]
-
-  AC_SUBST(PYTHON_VERSION)
-  changequote(<<, >>)dnl
-  PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[:3]"`
-  changequote([, ])dnl
-
-
-  dnl Use the values of $prefix and $exec_prefix for the corresponding
-  dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
-  dnl distinct variables so they can be overridden if need be.  However,
-  dnl general consensus is that you shouldn't need this ability.
-
-  AC_SUBST(PYTHON_PREFIX)
-  PYTHON_PREFIX='${prefix}'
-
-  AC_SUBST(PYTHON_EXEC_PREFIX)
-  PYTHON_EXEC_PREFIX='${exec_prefix}'
-
-  dnl At times (like when building shared libraries) you may want
-  dnl to know which OS platform Python thinks this is.
-
-  AC_SUBST(PYTHON_PLATFORM)
-  PYTHON_PLATFORM=`$PYTHON -c "import sys; print sys.platform"`
-
-
-  dnl Set up 4 directories:
-
-  dnl pythondir -- where to install python scripts.  This is the
-  dnl   site-packages directory, not the python standard library
-  dnl   directory like in previous automake betas.  This behaviour
-  dnl   is more consistent with lispdir.m4 for example.
-  dnl
-  dnl Also, if the package prefix isn't the same as python's prefix,
-  dnl then the old $(pythondir) was pretty useless.
-
-  AC_SUBST(pythondir)
-  pythondir=$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION/site-packages
-
-  dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
-  dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
-  dnl   more consistent with the rest of automake.
-  dnl   Maybe this should be put in python.am?
-
-  AC_SUBST(pkgpythondir)
-  pkgpythondir=\${pythondir}/$PACKAGE
-
-  dnl pyexecdir -- directory for installing python extension modules
-  dnl   (shared libraries)  Was PYTHON_SITE_EXEC in previous betas.
-
-  AC_SUBST(pyexecdir)
-  pyexecdir=$PYTHON_EXEC_PREFIX"/lib/python"$PYTHON_VERSION/site-packages
-
-  dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
-  dnl   Maybe this should be put in python.am?
-
-  AC_SUBST(pkgpyexecdir)
-  pkgpyexecdir=\${pyexecdir}/$PACKAGE
-
-  AC_MSG_RESULT([looks good])
-
-  fi
-])
diff --git a/common/m4/as-version.m4 b/common/m4/as-version.m4
deleted file mode 100644 (file)
index 22ff774..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-dnl as-version.m4 0.2.0
-
-dnl autostars m4 macro for versioning
-
-dnl Thomas Vander Stichele <thomas at apestaart dot org>
-
-dnl $Id: as-version.m4,v 1.15 2006/04/01 09:40:24 thomasvs Exp $
-
-dnl AS_VERSION
-
-dnl example
-dnl AS_VERSION
-
-dnl this macro
-dnl - AC_SUBST's PACKAGE_VERSION_MAJOR, _MINOR, _MICRO
-dnl - AC_SUBST's PACKAGE_VERSION_RELEASE,
-dnl    which can be used for rpm release fields
-dnl - doesn't call AM_INIT_AUTOMAKE anymore because it prevents
-dnl   maintainer mode from running correctly
-dnl
-dnl don't forget to put #undef PACKAGE_VERSION_RELEASE in acconfig.h
-dnl if you use acconfig.h
-
-AC_DEFUN([AS_VERSION],
-[
-  PACKAGE_VERSION_MAJOR=$(echo AC_PACKAGE_VERSION | cut -d'.' -f1)
-  PACKAGE_VERSION_MINOR=$(echo AC_PACKAGE_VERSION | cut -d'.' -f2)
-  PACKAGE_VERSION_MICRO=$(echo AC_PACKAGE_VERSION | cut -d'.' -f3)
-
-  AC_SUBST(PACKAGE_VERSION_MAJOR)
-  AC_SUBST(PACKAGE_VERSION_MINOR)
-  AC_SUBST(PACKAGE_VERSION_MICRO)
-])
-
-dnl AS_NANO(ACTION-IF-NANO-NON-NULL, [ACTION-IF-NANO-NULL])
-
-dnl requires AC_INIT to be called before
-dnl For projects using a fourth or nano number in your versioning to indicate
-dnl development or prerelease snapshots, this macro allows the build to be
-dnl set up differently accordingly.
-
-dnl this macro:
-dnl - parses AC_PACKAGE_VERSION, set by AC_INIT, and extracts the nano number
-dnl - sets the variable PACKAGE_VERSION_NANO
-dnl - sets the variable PACKAGE_VERSION_RELEASE, which can be used
-dnl   for rpm release fields
-dnl - executes ACTION-IF-NANO-NON-NULL or ACTION-IF-NANO-NULL
-
-dnl example:
-dnl AS_NANO(RELEASE="yes", RELEASE="no")
-
-AC_DEFUN([AS_NANO],
-[
-  AC_MSG_CHECKING(nano version)
-
-  NANO=$(echo AC_PACKAGE_VERSION | cut -d'.' -f4)
-
-  if test x"$NANO" = x || test "x$NANO" = "x0" ; then
-    AC_MSG_RESULT([0 (release)])
-    NANO=0
-    PACKAGE_VERSION_RELEASE=1
-    ifelse([$1], , :, [$1])
-  else
-    AC_MSG_RESULT($NANO)
-    PACKAGE_VERSION_RELEASE=0.`date +%Y%m%d.%H%M%S`
-    if test "x$NANO" != "x1" ; then
-       ifelse([$1], , :, [$1])
-    else
-       ifelse([$2], , :, [$2])
-    fi
-  fi
-  PACKAGE_VERSION_NANO=$NANO
-  AC_SUBST(PACKAGE_VERSION_NANO)
-  AC_SUBST(PACKAGE_VERSION_RELEASE)
-])
diff --git a/common/m4/ax_create_stdint_h.m4 b/common/m4/ax_create_stdint_h.m4
deleted file mode 100644 (file)
index 13bf699..0000000
+++ /dev/null
@@ -1,734 +0,0 @@
-##### http://autoconf-archive.cryp.to/ax_create_stdint_h.html
-#
-# SYNOPSIS
-#
-#   AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])]
-#
-# DESCRIPTION
-#
-#   the "ISO C9X: 7.18 Integer types <stdint.h>" section requires the
-#   existence of an include file <stdint.h> that defines a set of
-#   typedefs, especially uint8_t,int32_t,uintptr_t. Many older
-#   installations will not provide this file, but some will have the
-#   very same definitions in <inttypes.h>. In other enviroments we can
-#   use the inet-types in <sys/types.h> which would define the typedefs
-#   int8_t and u_int8_t respectivly.
-#
-#   This macros will create a local "_stdint.h" or the headerfile given
-#   as an argument. In many cases that file will just "#include
-#   <stdint.h>" or "#include <inttypes.h>", while in other environments
-#   it will provide the set of basic 'stdint's definitions/typedefs:
-#
-#     int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t
-#     int_least32_t.. int_fast32_t.. intmax_t
-#
-#   which may or may not rely on the definitions of other files, or
-#   using the AC_CHECK_SIZEOF macro to determine the actual sizeof each
-#   type.
-#
-#   if your header files require the stdint-types you will want to
-#   create an installable file mylib-int.h that all your other
-#   installable header may include. So if you have a library package
-#   named "mylib", just use
-#
-#        AX_CREATE_STDINT_H(mylib-int.h)
-#
-#   in configure.ac and go to install that very header file in
-#   Makefile.am along with the other headers (mylib.h) - and the
-#   mylib-specific headers can simply use "#include <mylib-int.h>" to
-#   obtain the stdint-types.
-#
-#   Remember, if the system already had a valid <stdint.h>, the
-#   generated file will include it directly. No need for fuzzy
-#   HAVE_STDINT_H things... (oops, GCC 4.2.x has deliberatly disabled
-#   its stdint.h for non-c99 compilation and the c99-mode is not the
-#   default. Therefore this macro will not use the compiler's stdint.h
-#   - please complain to the GCC developers).
-#
-# LAST MODIFICATION
-#
-#   2007-06-27
-#
-# COPYLEFT
-#
-#   Copyright (c) 2007 Guido U. Draheim <guidod@gmx.de>
-#
-#   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., 59 Temple Place - Suite 330, Boston, MA
-#   02111-1307, USA.
-#
-#   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 Macro 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.
-
-AC_DEFUN([AX_CHECK_DATA_MODEL],[
-   AC_CHECK_SIZEOF(char)
-   AC_CHECK_SIZEOF(short)
-   AC_CHECK_SIZEOF(int)
-   AC_CHECK_SIZEOF(long)
-   AC_CHECK_SIZEOF(void*)
-   ac_cv_char_data_model=""
-   ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_char"
-   ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_short"
-   ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_int"
-   ac_cv_long_data_model=""
-   ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_int"
-   ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_long"
-   ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_voidp"
-   AC_MSG_CHECKING([data model])
-   case "$ac_cv_char_data_model/$ac_cv_long_data_model" in
-    122/242)     ac_cv_data_model="IP16"  ; n="standard 16bit machine" ;;
-    122/244)     ac_cv_data_model="LP32"  ; n="standard 32bit machine" ;;
-    122/*)       ac_cv_data_model="i16"   ; n="unusual int16 model" ;;
-    124/444)     ac_cv_data_model="ILP32" ; n="standard 32bit unixish" ;;
-    124/488)     ac_cv_data_model="LP64"  ; n="standard 64bit unixish" ;;
-    124/448)     ac_cv_data_model="LLP64" ; n="unusual 64bit unixish" ;;
-    124/*)       ac_cv_data_model="i32"   ; n="unusual int32 model" ;;
-    128/888)     ac_cv_data_model="ILP64" ; n="unusual 64bit numeric" ;;
-    128/*)       ac_cv_data_model="i64"   ; n="unusual int64 model" ;;
-    222/*2)      ac_cv_data_model="DSP16" ; n="strict 16bit dsptype" ;;
-    333/*3)      ac_cv_data_model="DSP24" ; n="strict 24bit dsptype" ;;
-    444/*4)      ac_cv_data_model="DSP32" ; n="strict 32bit dsptype" ;;
-    666/*6)      ac_cv_data_model="DSP48" ; n="strict 48bit dsptype" ;;
-    888/*8)      ac_cv_data_model="DSP64" ; n="strict 64bit dsptype" ;;
-    222/*|333/*|444/*|666/*|888/*) :
-                 ac_cv_data_model="iDSP"  ; n="unusual dsptype" ;;
-     *)          ac_cv_data_model="none"  ; n="very unusual model" ;;
-   esac
-   AC_MSG_RESULT([$ac_cv_data_model ($ac_cv_long_data_model, $n)])
-])
-
-dnl AX_CHECK_HEADER_STDINT_X([HEADERLIST][,ACTION-IF])
-AC_DEFUN([AX_CHECK_HEADER_STDINT_X],[
-AC_CACHE_CHECK([for stdint uintptr_t], [ac_cv_header_stdint_x],[
- ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h)
-  AC_MSG_RESULT([(..)])
-  for i in m4_ifval([$1],[$1],[stdint.h inttypes.h sys/inttypes.h sys/types.h])
-  do
-   unset ac_cv_type_uintptr_t
-   unset ac_cv_type_uint64_t
-   AC_CHECK_TYPE(uintptr_t,[ac_cv_header_stdint_x=$i],continue,[#include <$i>])
-   AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>])
-   m4_ifvaln([$2],[$2]) break
-  done
-  AC_MSG_CHECKING([for stdint uintptr_t])
- ])
-])
-
-AC_DEFUN([AX_CHECK_HEADER_STDINT_O],[
-AC_CACHE_CHECK([for stdint uint32_t], [ac_cv_header_stdint_o],[
- ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h)
-  AC_MSG_RESULT([(..)])
-  for i in m4_ifval([$1],[$1],[inttypes.h sys/inttypes.h sys/types.h stdint.h])
-  do
-   unset ac_cv_type_uint32_t
-   unset ac_cv_type_uint64_t
-   AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],continue,[#include <$i>])
-   AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>])
-   m4_ifvaln([$2],[$2]) break
-   break;
-  done
-  AC_MSG_CHECKING([for stdint uint32_t])
- ])
-])
-
-AC_DEFUN([AX_CHECK_HEADER_STDINT_U],[
-AC_CACHE_CHECK([for stdint u_int32_t], [ac_cv_header_stdint_u],[
- ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h)
-  AC_MSG_RESULT([(..)])
-  for i in m4_ifval([$1],[$1],[sys/types.h inttypes.h sys/inttypes.h]) ; do
-   unset ac_cv_type_u_int32_t
-   unset ac_cv_type_u_int64_t
-   AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],continue,[#include <$i>])
-   AC_CHECK_TYPE(u_int64_t,[and64="/u_int64_t"],[and64=""],[#include<$i>])
-   m4_ifvaln([$2],[$2]) break
-   break;
-  done
-  AC_MSG_CHECKING([for stdint u_int32_t])
- ])
-])
-
-AC_DEFUN([AX_CREATE_STDINT_H],
-[# ------ AX CREATE STDINT H -------------------------------------
-AC_MSG_CHECKING([for stdint types])
-ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)`
-# try to shortcircuit - if the default include path of the compiler
-# can find a "stdint.h" header then we assume that all compilers can.
-AC_CACHE_VAL([ac_cv_header_stdint_t],[
-old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS=""
-old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS=""
-old_CFLAGS="$CFLAGS"     ; CFLAGS=""
-AC_TRY_COMPILE([#include <stdint.h>],[int_least32_t v = 0;],
-[ac_cv_stdint_result="(assuming C99 compatible system)"
- ac_cv_header_stdint_t="stdint.h"; ],
-[ac_cv_header_stdint_t=""])
-if test "$GCC" = "yes" && test ".$ac_cv_header_stdint_t" = "."; then
-CFLAGS="-std=c99"
-AC_TRY_COMPILE([#include <stdint.h>],[int_least32_t v = 0;],
-[AC_MSG_WARN(your GCC compiler has a defunct stdint.h for its default-mode)])
-fi
-CXXFLAGS="$old_CXXFLAGS"
-CPPFLAGS="$old_CPPFLAGS"
-CFLAGS="$old_CFLAGS" ])
-
-v="... $ac_cv_header_stdint_h"
-if test "$ac_stdint_h" = "stdint.h" ; then
- AC_MSG_RESULT([(are you sure you want them in ./stdint.h?)])
-elif test "$ac_stdint_h" = "inttypes.h" ; then
- AC_MSG_RESULT([(are you sure you want them in ./inttypes.h?)])
-elif test "_$ac_cv_header_stdint_t" = "_" ; then
- AC_MSG_RESULT([(putting them into $ac_stdint_h)$v])
-else
- ac_cv_header_stdint="$ac_cv_header_stdint_t"
- AC_MSG_RESULT([$ac_cv_header_stdint (shortcircuit)])
-fi
-
-if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit..
-
-dnl .....intro message done, now do a few system checks.....
-dnl btw, all old CHECK_TYPE macros do automatically "DEFINE" a type,
-dnl therefore we use the autoconf implementation detail CHECK_TYPE_NEW
-dnl instead that is triggered with 3 or more arguments (see types.m4)
-
-inttype_headers=`echo $2 | sed -e 's/,/ /g'`
-
-ac_cv_stdint_result="(no helpful system typedefs seen)"
-AX_CHECK_HEADER_STDINT_X(dnl
-   stdint.h inttypes.h sys/inttypes.h $inttype_headers,
-   ac_cv_stdint_result="(seen uintptr_t$and64 in $i)")
-
-if test "_$ac_cv_header_stdint_x" = "_" ; then
-AX_CHECK_HEADER_STDINT_O(dnl,
-   inttypes.h sys/inttypes.h stdint.h $inttype_headers,
-   ac_cv_stdint_result="(seen uint32_t$and64 in $i)")
-fi
-
-if test "_$ac_cv_header_stdint_x" = "_" ; then
-if test "_$ac_cv_header_stdint_o" = "_" ; then
-AX_CHECK_HEADER_STDINT_U(dnl,
-   sys/types.h inttypes.h sys/inttypes.h $inttype_headers,
-   ac_cv_stdint_result="(seen u_int32_t$and64 in $i)")
-fi fi
-
-dnl if there was no good C99 header file, do some typedef checks...
-if test "_$ac_cv_header_stdint_x" = "_" ; then
-   AC_MSG_CHECKING([for stdint datatype model])
-   AC_MSG_RESULT([(..)])
-   AX_CHECK_DATA_MODEL
-fi
-
-if test "_$ac_cv_header_stdint_x" != "_" ; then
-   ac_cv_header_stdint="$ac_cv_header_stdint_x"
-elif  test "_$ac_cv_header_stdint_o" != "_" ; then
-   ac_cv_header_stdint="$ac_cv_header_stdint_o"
-elif  test "_$ac_cv_header_stdint_u" != "_" ; then
-   ac_cv_header_stdint="$ac_cv_header_stdint_u"
-else
-   ac_cv_header_stdint="stddef.h"
-fi
-
-AC_MSG_CHECKING([for extra inttypes in chosen header])
-AC_MSG_RESULT([($ac_cv_header_stdint)])
-dnl see if int_least and int_fast types are present in _this_ header.
-unset ac_cv_type_int_least32_t
-unset ac_cv_type_int_fast32_t
-AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>])
-AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>])
-AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>])
-
-fi # shortcircut to system "stdint.h"
-# ------------------ PREPARE VARIABLES ------------------------------
-if test "$GCC" = "yes" ; then
-ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
-else
-ac_cv_stdint_message="using $CC"
-fi
-
-AC_MSG_RESULT([make use of $ac_cv_header_stdint in $ac_stdint_h dnl
-$ac_cv_stdint_result])
-
-dnl -----------------------------------------------------------------
-# ----------------- DONE inttypes.h checks START header -------------
-AC_CONFIG_COMMANDS([$ac_stdint_h],[
-AC_MSG_NOTICE(creating $ac_stdint_h : $_ac_stdint_h)
-ac_stdint=$tmp/_stdint.h
-
-echo "#ifndef" $_ac_stdint_h >$ac_stdint
-echo "#define" $_ac_stdint_h "1" >>$ac_stdint
-echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint
-echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint
-echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint
-if test "_$ac_cv_header_stdint_t" != "_" ; then
-echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint
-echo "#include <stdint.h>" >>$ac_stdint
-echo "#endif" >>$ac_stdint
-echo "#endif" >>$ac_stdint
-else
-
-cat >>$ac_stdint <<STDINT_EOF
-
-/* ................... shortcircuit part ........................... */
-
-#if defined HAVE_STDINT_H || defined _STDINT_HAVE_STDINT_H
-#include <stdint.h>
-#else
-#include <stddef.h>
-
-/* .................... configured part ............................ */
-
-STDINT_EOF
-
-echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint
-if test "_$ac_cv_header_stdint_x" != "_" ; then
-  ac_header="$ac_cv_header_stdint_x"
-  echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint
-else
-  echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint
-fi
-
-echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint
-if  test "_$ac_cv_header_stdint_o" != "_" ; then
-  ac_header="$ac_cv_header_stdint_o"
-  echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint
-else
-  echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint
-fi
-
-echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint
-if  test "_$ac_cv_header_stdint_u" != "_" ; then
-  ac_header="$ac_cv_header_stdint_u"
-  echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint
-else
-  echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint
-fi
-
-echo "" >>$ac_stdint
-
-if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then
-  echo "#include <$ac_header>" >>$ac_stdint
-  echo "" >>$ac_stdint
-fi fi
-
-echo "/* which 64bit typedef has been found */" >>$ac_stdint
-if test "$ac_cv_type_uint64_t" = "yes" ; then
-echo "#define   _STDINT_HAVE_UINT64_T" "1"  >>$ac_stdint
-else
-echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint
-fi
-if test "$ac_cv_type_u_int64_t" = "yes" ; then
-echo "#define   _STDINT_HAVE_U_INT64_T" "1"  >>$ac_stdint
-else
-echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint
-fi
-echo "" >>$ac_stdint
-
-echo "/* which type model has been detected */" >>$ac_stdint
-if test "_$ac_cv_char_data_model" != "_" ; then
-echo "#define   _STDINT_CHAR_MODEL" "$ac_cv_char_data_model" >>$ac_stdint
-echo "#define   _STDINT_LONG_MODEL" "$ac_cv_long_data_model" >>$ac_stdint
-else
-echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint
-echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint
-fi
-echo "" >>$ac_stdint
-
-echo "/* whether int_least types were detected */" >>$ac_stdint
-if test "$ac_cv_type_int_least32_t" = "yes"; then
-echo "#define   _STDINT_HAVE_INT_LEAST32_T" "1"  >>$ac_stdint
-else
-echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint
-fi
-echo "/* whether int_fast types were detected */" >>$ac_stdint
-if test "$ac_cv_type_int_fast32_t" = "yes"; then
-echo "#define   _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint
-else
-echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint
-fi
-echo "/* whether intmax_t type was detected */" >>$ac_stdint
-if test "$ac_cv_type_intmax_t" = "yes"; then
-echo "#define   _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint
-else
-echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint
-fi
-echo "" >>$ac_stdint
-
-  cat >>$ac_stdint <<STDINT_EOF
-/* .................... detections part ............................ */
-
-/* whether we need to define bitspecific types from compiler base types */
-#ifndef _STDINT_HEADER_INTPTR
-#ifndef _STDINT_HEADER_UINT32
-#ifndef _STDINT_HEADER_U_INT32
-#define _STDINT_NEED_INT_MODEL_T
-#else
-#define _STDINT_HAVE_U_INT_TYPES
-#endif
-#endif
-#endif
-
-#ifdef _STDINT_HAVE_U_INT_TYPES
-#undef _STDINT_NEED_INT_MODEL_T
-#endif
-
-#ifdef  _STDINT_CHAR_MODEL
-#if     _STDINT_CHAR_MODEL+0 == 122 || _STDINT_CHAR_MODEL+0 == 124
-#ifndef _STDINT_BYTE_MODEL
-#define _STDINT_BYTE_MODEL 12
-#endif
-#endif
-#endif
-
-#ifndef _STDINT_HAVE_INT_LEAST32_T
-#define _STDINT_NEED_INT_LEAST_T
-#endif
-
-#ifndef _STDINT_HAVE_INT_FAST32_T
-#define _STDINT_NEED_INT_FAST_T
-#endif
-
-#ifndef _STDINT_HEADER_INTPTR
-#define _STDINT_NEED_INTPTR_T
-#ifndef _STDINT_HAVE_INTMAX_T
-#define _STDINT_NEED_INTMAX_T
-#endif
-#endif
-
-
-/* .................... definition part ............................ */
-
-/* some system headers have good uint64_t */
-#ifndef _HAVE_UINT64_T
-#if     defined _STDINT_HAVE_UINT64_T  || defined HAVE_UINT64_T
-#define _HAVE_UINT64_T
-#elif   defined _STDINT_HAVE_U_INT64_T || defined HAVE_U_INT64_T
-#define _HAVE_UINT64_T
-typedef u_int64_t uint64_t;
-#endif
-#endif
-
-#ifndef _HAVE_UINT64_T
-/* .. here are some common heuristics using compiler runtime specifics */
-#if defined __STDC_VERSION__ && defined __STDC_VERSION__ >= 199901L
-#define _HAVE_UINT64_T
-#define _HAVE_LONGLONG_UINT64_T
-typedef long long int64_t;
-typedef unsigned long long uint64_t;
-
-#elif !defined __STRICT_ANSI__
-#if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__
-#define _HAVE_UINT64_T
-typedef __int64 int64_t;
-typedef unsigned __int64 uint64_t;
-
-#elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__
-/* note: all ELF-systems seem to have loff-support which needs 64-bit */
-#if !defined _NO_LONGLONG
-#define _HAVE_UINT64_T
-#define _HAVE_LONGLONG_UINT64_T
-typedef long long int64_t;
-typedef unsigned long long uint64_t;
-#endif
-
-#elif defined __alpha || (defined __mips && defined _ABIN32)
-#if !defined _NO_LONGLONG
-typedef long int64_t;
-typedef unsigned long uint64_t;
-#endif
-  /* compiler/cpu type to define int64_t */
-#endif
-#endif
-#endif
-
-#if defined _STDINT_HAVE_U_INT_TYPES
-/* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */
-typedef u_int8_t uint8_t;
-typedef u_int16_t uint16_t;
-typedef u_int32_t uint32_t;
-
-/* glibc compatibility */
-#ifndef __int8_t_defined
-#define __int8_t_defined
-#endif
-#endif
-
-#ifdef _STDINT_NEED_INT_MODEL_T
-/* we must guess all the basic types. Apart from byte-adressable system, */
-/* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */
-/* (btw, those nibble-addressable systems are way off, or so we assume) */
-
-dnl   /* have a look at "64bit and data size neutrality" at */
-dnl   /* http://unix.org/version2/whatsnew/login_64bit.html */
-dnl   /* (the shorthand "ILP" types always have a "P" part) */
-
-#if defined _STDINT_BYTE_MODEL
-#if _STDINT_LONG_MODEL+0 == 242
-/* 2:4:2 =  IP16 = a normal 16-bit system                */
-typedef unsigned char   uint8_t;
-typedef unsigned short  uint16_t;
-typedef unsigned long   uint32_t;
-#ifndef __int8_t_defined
-#define __int8_t_defined
-typedef          char    int8_t;
-typedef          short   int16_t;
-typedef          long    int32_t;
-#endif
-#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444
-/* 2:4:4 =  LP32 = a 32-bit system derived from a 16-bit */
-/* 4:4:4 = ILP32 = a normal 32-bit system                */
-typedef unsigned char   uint8_t;
-typedef unsigned short  uint16_t;
-typedef unsigned int    uint32_t;
-#ifndef __int8_t_defined
-#define __int8_t_defined
-typedef          char    int8_t;
-typedef          short   int16_t;
-typedef          int     int32_t;
-#endif
-#elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488
-/* 4:8:4 =  IP32 = a 32-bit system prepared for 64-bit    */
-/* 4:8:8 =  LP64 = a normal 64-bit system                 */
-typedef unsigned char   uint8_t;
-typedef unsigned short  uint16_t;
-typedef unsigned int    uint32_t;
-#ifndef __int8_t_defined
-#define __int8_t_defined
-typedef          char    int8_t;
-typedef          short   int16_t;
-typedef          int     int32_t;
-#endif
-/* this system has a "long" of 64bit */
-#ifndef _HAVE_UINT64_T
-#define _HAVE_UINT64_T
-typedef unsigned long   uint64_t;
-typedef          long    int64_t;
-#endif
-#elif _STDINT_LONG_MODEL+0 == 448
-/*      LLP64   a 64-bit system derived from a 32-bit system */
-typedef unsigned char   uint8_t;
-typedef unsigned short  uint16_t;
-typedef unsigned int    uint32_t;
-#ifndef __int8_t_defined
-#define __int8_t_defined
-typedef          char    int8_t;
-typedef          short   int16_t;
-typedef          int     int32_t;
-#endif
-/* assuming the system has a "long long" */
-#ifndef _HAVE_UINT64_T
-#define _HAVE_UINT64_T
-#define _HAVE_LONGLONG_UINT64_T
-typedef unsigned long long uint64_t;
-typedef          long long  int64_t;
-#endif
-#else
-#define _STDINT_NO_INT32_T
-#endif
-#else
-#define _STDINT_NO_INT8_T
-#define _STDINT_NO_INT32_T
-#endif
-#endif
-
-/*
- * quote from SunOS-5.8 sys/inttypes.h:
- * Use at your own risk.  As of February 1996, the committee is squarely
- * behind the fixed sized types; the "least" and "fast" types are still being
- * discussed.  The probability that the "fast" types may be removed before
- * the standard is finalized is high enough that they are not currently
- * implemented.
- */
-
-#if defined _STDINT_NEED_INT_LEAST_T
-typedef  int8_t    int_least8_t;
-typedef  int16_t   int_least16_t;
-typedef  int32_t   int_least32_t;
-#ifdef _HAVE_UINT64_T
-typedef  int64_t   int_least64_t;
-#endif
-
-typedef uint8_t   uint_least8_t;
-typedef uint16_t  uint_least16_t;
-typedef uint32_t  uint_least32_t;
-#ifdef _HAVE_UINT64_T
-typedef uint64_t  uint_least64_t;
-#endif
-  /* least types */
-#endif
-
-#if defined _STDINT_NEED_INT_FAST_T
-typedef  int8_t    int_fast8_t;
-typedef  int       int_fast16_t;
-typedef  int32_t   int_fast32_t;
-#ifdef _HAVE_UINT64_T
-typedef  int64_t   int_fast64_t;
-#endif
-
-typedef uint8_t   uint_fast8_t;
-typedef unsigned  uint_fast16_t;
-typedef uint32_t  uint_fast32_t;
-#ifdef _HAVE_UINT64_T
-typedef uint64_t  uint_fast64_t;
-#endif
-  /* fast types */
-#endif
-
-#ifdef _STDINT_NEED_INTMAX_T
-#ifdef _HAVE_UINT64_T
-typedef  int64_t       intmax_t;
-typedef uint64_t      uintmax_t;
-#else
-typedef          long  intmax_t;
-typedef unsigned long uintmax_t;
-#endif
-#endif
-
-#ifdef _STDINT_NEED_INTPTR_T
-#ifndef __intptr_t_defined
-#define __intptr_t_defined
-/* we encourage using "long" to store pointer values, never use "int" ! */
-#if   _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484
-typedef  unsigned int   uintptr_t;
-typedef           int    intptr_t;
-#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444
-typedef  unsigned long  uintptr_t;
-typedef           long   intptr_t;
-#elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T
-typedef        uint64_t uintptr_t;
-typedef         int64_t  intptr_t;
-#else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */
-typedef  unsigned long  uintptr_t;
-typedef           long   intptr_t;
-#endif
-#endif
-#endif
-
-/* The ISO C99 standard specifies that in C++ implementations these
-   should only be defined if explicitly requested.  */
-#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
-#ifndef UINT32_C
-
-/* Signed.  */
-# define INT8_C(c)      c
-# define INT16_C(c)     c
-# define INT32_C(c)     c
-# ifdef _HAVE_LONGLONG_UINT64_T
-#  define INT64_C(c)    c ## L
-# else
-#  define INT64_C(c)    c ## LL
-# endif
-
-/* Unsigned.  */
-# define UINT8_C(c)     c ## U
-# define UINT16_C(c)    c ## U
-# define UINT32_C(c)    c ## U
-# ifdef _HAVE_LONGLONG_UINT64_T
-#  define UINT64_C(c)   c ## UL
-# else
-#  define UINT64_C(c)   c ## ULL
-# endif
-
-/* Maximal type.  */
-# ifdef _HAVE_LONGLONG_UINT64_T
-#  define INTMAX_C(c)   c ## L
-#  define UINTMAX_C(c)  c ## UL
-# else
-#  define INTMAX_C(c)   c ## LL
-#  define UINTMAX_C(c)  c ## ULL
-# endif
-
-  /* literalnumbers */
-#endif
-#endif
-
-/* These limits are merily those of a two complement byte-oriented system */
-
-/* Minimum of signed integral types.  */
-# define INT8_MIN               (-128)
-# define INT16_MIN              (-32767-1)
-# define INT32_MIN              (-2147483647-1)
-# define INT64_MIN              (-__INT64_C(9223372036854775807)-1)
-/* Maximum of signed integral types.  */
-# define INT8_MAX               (127)
-# define INT16_MAX              (32767)
-# define INT32_MAX              (2147483647)
-# define INT64_MAX              (__INT64_C(9223372036854775807))
-
-/* Maximum of unsigned integral types.  */
-# define UINT8_MAX              (255)
-# define UINT16_MAX             (65535)
-# define UINT32_MAX             (4294967295U)
-# define UINT64_MAX             (__UINT64_C(18446744073709551615))
-
-/* Minimum of signed integral types having a minimum size.  */
-# define INT_LEAST8_MIN         INT8_MIN
-# define INT_LEAST16_MIN        INT16_MIN
-# define INT_LEAST32_MIN        INT32_MIN
-# define INT_LEAST64_MIN        INT64_MIN
-/* Maximum of signed integral types having a minimum size.  */
-# define INT_LEAST8_MAX         INT8_MAX
-# define INT_LEAST16_MAX        INT16_MAX
-# define INT_LEAST32_MAX        INT32_MAX
-# define INT_LEAST64_MAX        INT64_MAX
-
-/* Maximum of unsigned integral types having a minimum size.  */
-# define UINT_LEAST8_MAX        UINT8_MAX
-# define UINT_LEAST16_MAX       UINT16_MAX
-# define UINT_LEAST32_MAX       UINT32_MAX
-# define UINT_LEAST64_MAX       UINT64_MAX
-
-  /* shortcircuit*/
-#endif
-  /* once */
-#endif
-#endif
-STDINT_EOF
-fi
-    if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then
-      AC_MSG_NOTICE([$ac_stdint_h is unchanged])
-    else
-      ac_dir=`AS_DIRNAME(["$ac_stdint_h"])`
-      AS_MKDIR_P(["$ac_dir"])
-      rm -f $ac_stdint_h
-      mv $ac_stdint $ac_stdint_h
-    fi
-],[# variables for create stdint.h replacement
-PACKAGE="$PACKAGE"
-VERSION="$VERSION"
-ac_stdint_h="$ac_stdint_h"
-_ac_stdint_h=AS_TR_CPP(_$PACKAGE-$ac_stdint_h)
-ac_cv_stdint_message="$ac_cv_stdint_message"
-ac_cv_header_stdint_t="$ac_cv_header_stdint_t"
-ac_cv_header_stdint_x="$ac_cv_header_stdint_x"
-ac_cv_header_stdint_o="$ac_cv_header_stdint_o"
-ac_cv_header_stdint_u="$ac_cv_header_stdint_u"
-ac_cv_type_uint64_t="$ac_cv_type_uint64_t"
-ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t"
-ac_cv_char_data_model="$ac_cv_char_data_model"
-ac_cv_long_data_model="$ac_cv_long_data_model"
-ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t"
-ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t"
-ac_cv_type_intmax_t="$ac_cv_type_intmax_t"
-])
-])
diff --git a/common/m4/check.m4 b/common/m4/check.m4
deleted file mode 100644 (file)
index afd26eb..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-dnl _AM_TRY_CHECK(MINIMUM-VERSION, EXTRA-CFLAGS, EXTRA-LIBS, CHECK-LIB-NAME
-dnl               [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-dnl Test for check, and define CHECK_CFLAGS and CHECK_LIBS
-dnl Done this way because of the brokenness that is
-dnl https://launchpad.net/distros/ubuntu/+source/check/+bug/5840
-dnl
-
-AC_DEFUN([_AM_TRY_CHECK],
-[
-  min_check_version=$1
-  extra_cflags=$2
-  extra_libs=$3
-  check_lib_name=$4
-
-  CHECK_CFLAGS="$extra_cflags"
-  CHECK_LIBS="$extra_libs -l$check_lib_name"
-
-  ac_save_CFLAGS="$CFLAGS"
-  ac_save_LIBS="$LIBS"
-
-  CFLAGS="$CFLAGS $CHECK_CFLAGS"
-  LIBS="$CHECK_LIBS $LIBS"
-
-  AC_MSG_CHECKING(for check named $check_lib_name  - version >= $min_check_version)
-
-  rm -f conf.check-test
-  dnl unset no_check, since in our second run it would have been set to yes
-  dnl before
-  no_check=
-  AC_TRY_RUN([
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <check.h>
-
-int main ()
-{
-  int major, minor, micro;
-  char *tmp_version;
-
-  system ("touch conf.check-test");
-
-  /* HP/UX 9 (%@#!) writes to sscanf strings */
-  tmp_version = strdup("$min_check_version");
-  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
-     printf("%s, bad version string\n", "$min_check_version");
-     return 1;
-   }
-
-  if ((CHECK_MAJOR_VERSION != check_major_version) ||
-      (CHECK_MINOR_VERSION != check_minor_version) ||
-      (CHECK_MICRO_VERSION != check_micro_version))
-    {
-      printf("\n*** The check header file (version %d.%d.%d) does not match\n",
-            CHECK_MAJOR_VERSION, CHECK_MINOR_VERSION, CHECK_MICRO_VERSION);
-      printf("*** the check library (version %d.%d.%d).\n",
-            check_major_version, check_minor_version, check_micro_version);
-      return 1;
-    }
-
-  if ((check_major_version > major) ||
-      ((check_major_version == major) && (check_minor_version > minor)) ||
-      ((check_major_version == major) && (check_minor_version == minor) && (check_micro_version >= micro)))
-    {
-      return 0;
-    }
-  else
-    {
-      printf("\n*** An old version of check (%d.%d.%d) was found.\n",
-             check_major_version, check_minor_version, check_micro_version);
-      printf("*** You need a version of check being at least %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 check library and header\n");
-      printf("*** file is being found. Rerun configure with the --with-check=PATH option\n");
-      printf("*** to specify the prefix where the correct version was installed.\n");
-    }
-
-  return 1;
-}
-],, no_check=yes, [echo $ac_n "cross compiling; assumed OK... $ac_c"])
-
-  CFLAGS="$ac_save_CFLAGS"
-  LIBS="$ac_save_LIBS"
-
-  if test "x$no_check" = x ; then
-    AC_MSG_RESULT(yes)
-    ifelse([$5], , :, [$5])
-  else
-    AC_MSG_RESULT(no)
-    if test -f conf.check-test ; then
-      :
-    else
-      echo "*** Could not run check test program, checking why..."
-      CFLAGS="$CFLAGS $CHECK_CFLAGS"
-      LIBS="$CHECK_LIBS $LIBS"
-      AC_TRY_LINK([
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <check.h>
-], ,  [ echo "*** The test program compiled, but did not run. This usually means"
-        echo "*** that the run-time linker is not finding check. 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"
-        echo "*** the exact error that occured." ])
-
-      CFLAGS="$ac_save_CFLAGS"
-      LIBS="$ac_save_LIBS"
-    fi
-
-    CHECK_CFLAGS=""
-    CHECK_LIBS=""
-
-    rm -f conf.check-test
-    ifelse([$6], , AC_MSG_ERROR([check not found]), [$6])
-  fi
-])
-
-
-dnl AM_PATH_CHECK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-dnl Test for check, and define CHECK_CFLAGS and CHECK_LIBS
-dnl
-
-AC_DEFUN([AM_PATH_CHECK],
-[
-  AC_ARG_WITH(check,
-  [  --with-check=PATH       prefix where check is installed [default=auto]])
-
-  AC_ARG_WITH(checklibname,
-    AC_HELP_STRING([--with-check-lib-name=NAME],
-      [name of the PIC check library (default=check)]))
-
-  min_check_version=ifelse([$1], ,0.8.2,$1)
-
-  if test x$with_check = xno; then
-    AC_MSG_RESULT(disabled)
-    ifelse([$3], , AC_MSG_ERROR([disabling check is not supported]), [$3])
-  else
-    if test "x$with_check" != x; then
-      CHECK_EXTRA_CFLAGS="-I$with_check/include"
-      CHECK_EXTRA_LIBS="-L$with_check/lib"
-    else
-      CHECK_EXTRA_CFLAGS=""
-      CHECK_EXTRA_LIBS=""
-    fi
-
-    if test x$with_checklibname = x; then
-      _AM_TRY_CHECK($min_check_version, $CHECK_EXTRA_CFLAGS, $CHECK_EXTRA_LIBS,
-        check_pic, [have_check=true], [have_check=false])
-      if test x$have_check = xtrue; then
-        ifelse([$2], , :, [$2])
-      else
-        _AM_TRY_CHECK($min_check_version, $CHECK_EXTRA_CFLAGS, $CHECK_EXTRA_LIBS,
-          check, [have_check=true], [have_check=false])
-        if test x$have_check = xtrue; then
-          ifelse([$2], , :, [$2])
-        else
-          ifelse([$3], , AC_MSG_ERROR([check not found]), [$3])
-        fi
-      fi
-    else
-      _AM_TRY_CHECK($min_check_version, $CHECK_EXTRA_CFLAGS, $CHECK_EXTRA_LIBS,
-        $with_checklibname, [have_check=true], [have_check=false])
-      if test x$have_check = xtrue; then
-        ifelse([$2], , :, [$2])
-      else
-        ifelse([$3], , AC_MSG_ERROR([check not found]), [$3])
-      fi
-    fi
-
-    AC_SUBST(CHECK_CFLAGS)
-    AC_SUBST(CHECK_LIBS)
-    rm -f conf.check-test
-  fi
-])
diff --git a/common/m4/glib-gettext.m4 b/common/m4/glib-gettext.m4
deleted file mode 100644 (file)
index f8d442f..0000000
+++ /dev/null
@@ -1,432 +0,0 @@
-# Copyright (C) 1995-2002 Free Software Foundation, Inc.
-# Copyright (C) 2001-2003,2004 Red Hat, Inc.
-#
-# This file is free software, distributed under the terms of the GNU
-# General Public License.  As a special exception to the GNU General
-# Public License, this file may be distributed as part of a program
-# that contains a configuration script generated by Autoconf, under
-# the same distribution terms as the rest of that program.
-#
-# This file can be copied and used freely without restrictions.  It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-#
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
-#
-# Modified to never use included libintl.
-# Owen Taylor <otaylor@redhat.com>, 12/15/1998
-#
-# Major rework to remove unused code
-# Owen Taylor <otaylor@redhat.com>, 12/11/2002
-#
-# Added better handling of ALL_LINGUAS from GNU gettext version
-# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
-#
-# Modified to require ngettext
-# Matthias Clasen <mclasen@redhat.com> 08/06/2004
-#
-# We need this here as well, since someone might use autoconf-2.5x
-# to configure GLib then an older version to configure a package
-# using AM_GLIB_GNU_GETTEXT
-AC_PREREQ(2.53)
-
-dnl
-dnl We go to great lengths to make sure that aclocal won't
-dnl try to pull in the installed version of these macros
-dnl when running aclocal in the glib directory.
-dnl
-m4_copy([AC_DEFUN],[glib_DEFUN])
-m4_copy([AC_REQUIRE],[glib_REQUIRE])
-dnl
-dnl At the end, if we're not within glib, we'll define the public
-dnl definitions in terms of our private definitions.
-dnl
-
-# GLIB_LC_MESSAGES
-#--------------------
-glib_DEFUN([GLIB_LC_MESSAGES],
-  [AC_CHECK_HEADERS([locale.h])
-    if test $ac_cv_header_locale_h = yes; then
-    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
-      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
-       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
-    if test $am_cv_val_LC_MESSAGES = yes; then
-      AC_DEFINE(HAVE_LC_MESSAGES, 1,
-        [Define if your <locale.h> file defines LC_MESSAGES.])
-    fi
-  fi])
-
-# GLIB_PATH_PROG_WITH_TEST
-#----------------------------
-dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
-dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
-[# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
-  /*)
-  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in ifelse([$5], , $PATH, [$5]); do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if [$3]; then
-       ac_cv_path_$1="$ac_dir/$ac_word"
-       break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
-  ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
-  AC_MSG_RESULT([$]$1)
-else
-  AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
-
-# GLIB_WITH_NLS
-#-----------------
-glib_DEFUN([GLIB_WITH_NLS],
-  dnl NLS is obligatory
-  [USE_NLS=yes
-    AC_SUBST(USE_NLS)
-
-    gt_cv_have_gettext=no
-
-    CATOBJEXT=NONE
-    XGETTEXT=:
-    INTLLIBS=
-
-    AC_CHECK_HEADER(libintl.h,
-     [gt_cv_func_dgettext_libintl="no"
-      libintl_extra_libs=""
-
-      #
-      # First check in libc
-      #
-      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
-        [AC_TRY_LINK([
-#include <libintl.h>
-],
-         [return !ngettext ("","", 1)],
-         gt_cv_func_ngettext_libc=yes,
-          gt_cv_func_ngettext_libc=no)
-        ])
-
-      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
-             AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
-               [AC_TRY_LINK([
-#include <libintl.h>
-],
-                 [return !dgettext ("","")],
-                 gt_cv_func_dgettext_libc=yes,
-                 gt_cv_func_dgettext_libc=no)
-               ])
-      fi
-
-      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
-        AC_CHECK_FUNCS(bind_textdomain_codeset)
-      fi
-
-      #
-      # If we don't have everything we want, check in libintl
-      #
-      if test "$gt_cv_func_dgettext_libc" != "yes" \
-        || test "$gt_cv_func_ngettext_libc" != "yes" \
-         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
-
-        AC_CHECK_LIB(intl, bindtextdomain,
-           [AC_CHECK_LIB(intl, ngettext,
-                   [AC_CHECK_LIB(intl, dgettext,
-                                 gt_cv_func_dgettext_libintl=yes)])])
-
-       if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
-         AC_MSG_CHECKING([if -liconv is needed to use gettext])
-         AC_MSG_RESULT([])
-         AC_CHECK_LIB(intl, ngettext,
-               [AC_CHECK_LIB(intl, dcgettext,
-                      [gt_cv_func_dgettext_libintl=yes
-                       libintl_extra_libs=-liconv],
-                       :,-liconv)],
-               :,-liconv)
-        fi
-
-        #
-        # If we found libintl, then check in it for bind_textdomain_codeset();
-        # we'll prefer libc if neither have bind_textdomain_codeset(),
-        # and both have dgettext and ngettext
-        #
-        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
-          glib_save_LIBS="$LIBS"
-          LIBS="$LIBS -lintl $libintl_extra_libs"
-          unset ac_cv_func_bind_textdomain_codeset
-          AC_CHECK_FUNCS(bind_textdomain_codeset)
-          LIBS="$glib_save_LIBS"
-
-          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
-            gt_cv_func_dgettext_libc=no
-          else
-            if test "$gt_cv_func_dgettext_libc" = "yes" \
-               && test "$gt_cv_func_ngettext_libc" = "yes"; then
-              gt_cv_func_dgettext_libintl=no
-            fi
-          fi
-        fi
-      fi
-
-      if test "$gt_cv_func_dgettext_libc" = "yes" \
-       || test "$gt_cv_func_dgettext_libintl" = "yes"; then
-        gt_cv_have_gettext=yes
-      fi
-
-      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
-        INTLLIBS="-lintl $libintl_extra_libs"
-      fi
-
-      if test "$gt_cv_have_gettext" = "yes"; then
-       AC_DEFINE(HAVE_GETTEXT,1,
-         [Define if the GNU gettext() function is already present or preinstalled.])
-       GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
-         [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
-       if test "$MSGFMT" != "no"; then
-          glib_save_LIBS="$LIBS"
-          LIBS="$LIBS $INTLLIBS"
-         AC_CHECK_FUNCS(dcgettext)
-         MSGFMT_OPTS=
-         AC_MSG_CHECKING([if msgfmt accepts -c])
-         GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
-msgid ""
-msgstr ""
-"Content-Type: text/plain; charset=UTF-8\n"
-"Project-Id-Version: test 1.0\n"
-"PO-Revision-Date: 2007-02-15 12:01+0100\n"
-"Last-Translator: test <foo@bar.xx>\n"
-"Language-Team: C <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Transfer-Encoding: 8bit\n"
-], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
-         AC_SUBST(MSGFMT_OPTS)
-         AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-         GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-           [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
-         AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
-                        return _nl_msg_cat_cntr],
-           [CATOBJEXT=.gmo
-             DATADIRNAME=share],
-           [case $host in
-           *-*-solaris*)
-           dnl On Solaris, if bind_textdomain_codeset is in libc,
-           dnl GNU format message catalog is always supported,
-            dnl since both are added to the libc all together.
-           dnl Hence, we'd like to go with DATADIRNAME=share and
-           dnl and CATOBJEXT=.gmo in this case.
-            AC_CHECK_FUNC(bind_textdomain_codeset,
-             [CATOBJEXT=.gmo
-               DATADIRNAME=share],
-             [CATOBJEXT=.mo
-               DATADIRNAME=lib])
-           ;;
-           *)
-           CATOBJEXT=.mo
-            DATADIRNAME=lib
-           ;;
-           esac])
-          LIBS="$glib_save_LIBS"
-         INSTOBJEXT=.mo
-       else
-         gt_cv_have_gettext=no
-       fi
-      fi
-    ])
-
-    if test "$gt_cv_have_gettext" = "yes" ; then
-      AC_DEFINE(ENABLE_NLS, 1,
-        [always defined to indicate that i18n is enabled])
-    fi
-
-    dnl Test whether we really found GNU xgettext.
-    if test "$XGETTEXT" != ":"; then
-      dnl If it is not GNU xgettext we define it as : so that the
-      dnl Makefiles still can work.
-      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
-        : ;
-      else
-        AC_MSG_RESULT(
-         [found xgettext program is not GNU xgettext; ignore it])
-        XGETTEXT=":"
-      fi
-    fi
-
-    # We need to process the po/ directory.
-    POSUB=po
-
-    AC_OUTPUT_COMMANDS(
-      [case "$CONFIG_FILES" in *po/Makefile.in*)
-        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
-      esac])
-
-    dnl These rules are solely for the distribution goal.  While doing this
-    dnl we only have to keep exactly one list of the available catalogs
-    dnl in configure.in.
-    for lang in $ALL_LINGUAS; do
-      GMOFILES="$GMOFILES $lang.gmo"
-      POFILES="$POFILES $lang.po"
-    done
-
-    dnl Make all variables we use known to autoconf.
-    AC_SUBST(CATALOGS)
-    AC_SUBST(CATOBJEXT)
-    AC_SUBST(DATADIRNAME)
-    AC_SUBST(GMOFILES)
-    AC_SUBST(INSTOBJEXT)
-    AC_SUBST(INTLLIBS)
-    AC_SUBST(PO_IN_DATADIR_TRUE)
-    AC_SUBST(PO_IN_DATADIR_FALSE)
-    AC_SUBST(POFILES)
-    AC_SUBST(POSUB)
-  ])
-
-# AM_GLIB_GNU_GETTEXT
-# -------------------
-# Do checks necessary for use of gettext. If a suitable implementation
-# of gettext is found in either in libintl or in the C library,
-# it will set INTLLIBS to the libraries needed for use of gettext
-# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
-# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
-# on various variables needed by the Makefile.in.in installed by
-# glib-gettextize.
-dnl
-glib_DEFUN([GLIB_GNU_GETTEXT],
-  [AC_REQUIRE([AC_PROG_CC])dnl
-   AC_REQUIRE([AC_HEADER_STDC])dnl
-
-   GLIB_LC_MESSAGES
-   GLIB_WITH_NLS
-
-   if test "$gt_cv_have_gettext" = "yes"; then
-     if test "x$ALL_LINGUAS" = "x"; then
-       LINGUAS=
-     else
-       AC_MSG_CHECKING(for catalogs to be installed)
-       NEW_LINGUAS=
-       for presentlang in $ALL_LINGUAS; do
-         useit=no
-         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
-           desiredlanguages="$LINGUAS"
-         else
-           desiredlanguages="$ALL_LINGUAS"
-         fi
-         for desiredlang in $desiredlanguages; do
-          # Use the presentlang catalog if desiredlang is
-           #   a. equal to presentlang, or
-           #   b. a variant of presentlang (because in this case,
-           #      presentlang can be used as a fallback for messages
-           #      which are not translated in the desiredlang catalog).
-           case "$desiredlang" in
-             "$presentlang"*) useit=yes;;
-           esac
-         done
-         if test $useit = yes; then
-           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
-         fi
-       done
-       LINGUAS=$NEW_LINGUAS
-       AC_MSG_RESULT($LINGUAS)
-     fi
-
-     dnl Construct list of names of catalog files to be constructed.
-     if test -n "$LINGUAS"; then
-       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
-     fi
-   fi
-
-   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
-   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
-   dnl Try to locate is.
-   MKINSTALLDIRS=
-   if test -n "$ac_aux_dir"; then
-     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
-   fi
-   if test -z "$MKINSTALLDIRS"; then
-     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
-   fi
-   AC_SUBST(MKINSTALLDIRS)
-
-   dnl Generate list of files to be processed by xgettext which will
-   dnl be included in po/Makefile.
-   test -d po || mkdir po
-   if test "x$srcdir" != "x."; then
-     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
-       posrcprefix="$srcdir/"
-     else
-       posrcprefix="../$srcdir/"
-     fi
-   else
-     posrcprefix="../"
-   fi
-   rm -f po/POTFILES
-   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,        $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
-       < $srcdir/po/POTFILES.in > po/POTFILES
-  ])
-
-# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
-# -------------------------------
-# Define VARIABLE to the location where catalog files will
-# be installed by po/Makefile.
-glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
-[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
-glib_save_prefix="$prefix"
-glib_save_exec_prefix="$exec_prefix"
-glib_save_datarootdir="$datarootdir"
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-test "x$exec_prefix" = xNONE && exec_prefix=$prefix
-datarootdir=`eval echo "${datarootdir}"`
-if test "x$CATOBJEXT" = "x.mo" ; then
-  localedir=`eval echo "${libdir}/locale"`
-else
-  localedir=`eval echo "${datadir}/locale"`
-fi
-prefix="$glib_save_prefix"
-exec_prefix="$glib_save_exec_prefix"
-datarootdir="$glib_save_datarootdir"
-AC_DEFINE_UNQUOTED($1, "$localedir",
-  [Define the location where the catalogs will be installed])
-])
-
-dnl
-dnl Now the definitions that aclocal will find
-dnl
-ifdef(glib_configure_in,[],[
-AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
-AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
-])dnl
-
-# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
-#
-# Create a temporary file with TEST-FILE as its contents and pass the
-# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
-# 0 and perform ACTION-IF-FAIL for any other exit status.
-AC_DEFUN([GLIB_RUN_PROG],
-[cat >conftest.foo <<_ACEOF
-$2
-_ACEOF
-if AC_RUN_LOG([$1 conftest.foo]); then
-  m4_ifval([$3], [$3], [:])
-m4_ifvaln([$4], [else $4])dnl
-echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
-sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
-fi])
-
diff --git a/common/m4/gst-arch.m4 b/common/m4/gst-arch.m4
deleted file mode 100644 (file)
index 077a20b..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-dnl AG_GST_ARCH
-dnl sets up defines and automake conditionals for host architecture
-dnl checks endianness
-dnl defines HOST_CPU
-
-AC_DEFUN([AG_GST_ARCH],
-[
-  dnl Determine CPU
-  case "x${target_cpu}" in
-    xi?86 | xk? | xi?86_64)
-      case $target_os in
-         solaris*)
-            AC_CHECK_DECL([__i386],    [I386_ABI="yes"], [I386_ABI="no"])
-            AC_CHECK_DECL([__amd64], [AMD64_ABI="yes"], [AMD64_ABI="no"])
-
-            if test "x$I386_ABI" = "xyes" ; then
-               HAVE_CPU_I386=yes
-               AC_DEFINE(HAVE_CPU_I386, 1, [Define if the target CPU is an x86])
-            fi
-            if test "x$AMD64_ABI" = "xyes" ; then
-                HAVE_CPU_X86_64=yes
-                AC_DEFINE(HAVE_CPU_X86_64, 1, [Define if the target CPU is a x86_64])
-            fi
-            ;;
-         *)
-            HAVE_CPU_I386=yes
-            AC_DEFINE(HAVE_CPU_I386, 1, [Define if the target CPU is an x86])
-
-            dnl FIXME could use some better detection
-            dnl (ie CPUID)
-            case "x${target_cpu}" in
-              xi386 | xi486) ;;
-            *)
-              AC_DEFINE(HAVE_RDTSC, 1, [Define if RDTSC is available]) ;;
-            esac
-            ;;
-      esac
-      ;;
-    xpowerpc)
-      HAVE_CPU_PPC=yes
-      AC_DEFINE(HAVE_CPU_PPC, 1, [Define if the target CPU is a PowerPC]) ;;
-    xpowerpc64)
-      HAVE_CPU_PPC64=yes
-      AC_DEFINE(HAVE_CPU_PPC64, 1, [Define if the target CPU is a 64 bit PowerPC]) ;;
-    xalpha*)
-      HAVE_CPU_ALPHA=yes
-      AC_DEFINE(HAVE_CPU_ALPHA, 1, [Define if the target CPU is an Alpha]) ;;
-    xarm*)
-      HAVE_CPU_ARM=yes
-      AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the target CPU is an ARM]) ;;
-    xsparc*)
-      HAVE_CPU_SPARC=yes
-      AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the target CPU is a SPARC]) ;;
-    xmips*)
-      HAVE_CPU_MIPS=yes
-      AC_DEFINE(HAVE_CPU_MIPS, 1, [Define if the target CPU is a MIPS]) ;;
-    xhppa*)
-      HAVE_CPU_HPPA=yes
-      AC_DEFINE(HAVE_CPU_HPPA, 1, [Define if the target CPU is a HPPA]) ;;
-    xs390*)
-      HAVE_CPU_S390=yes
-      AC_DEFINE(HAVE_CPU_S390, 1, [Define if the target CPU is a S390]) ;;
-    xia64*)
-      HAVE_CPU_IA64=yes
-      AC_DEFINE(HAVE_CPU_IA64, 1, [Define if the target CPU is a IA64]) ;;
-    xm68k*)
-      HAVE_CPU_M68K=yes
-      AC_DEFINE(HAVE_CPU_M68K, 1, [Define if the target CPU is a M68K]) ;;
-    xx86_64)
-      HAVE_CPU_X86_64=yes
-      AC_DEFINE(HAVE_CPU_X86_64, 1, [Define if the target CPU is a x86_64]) ;;
-    xcris)
-      HAVE_CPU_CRIS=yes
-      AC_DEFINE(HAVE_CPU_CRIS, 1, [Define if the target CPU is a CRIS]) ;;
-    xcrisv32)
-      HAVE_CPU_CRISV32=yes
-      AC_DEFINE(HAVE_CPU_CRISV32, 1, [Define if the target CPU is a CRISv32]) ;;
-  esac
-
-  dnl Determine endianness
-  AC_C_BIGENDIAN
-
-  AM_CONDITIONAL(HAVE_CPU_I386,       test "x$HAVE_CPU_I386" = "xyes")
-  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_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")
-  AM_CONDITIONAL(HAVE_CPU_MIPS,       test "x$HAVE_CPU_MIPS" = "xyes")
-  AM_CONDITIONAL(HAVE_CPU_S390,       test "x$HAVE_CPU_S390" = "xyes")
-  AM_CONDITIONAL(HAVE_CPU_IA64,       test "x$HAVE_CPU_IA64" = "xyes")
-  AM_CONDITIONAL(HAVE_CPU_M68K,       test "x$HAVE_CPU_M68K" = "xyes")
-  AM_CONDITIONAL(HAVE_CPU_X86_64,     test "x$HAVE_CPU_X86_64" = "xyes")
-  AM_CONDITIONAL(HAVE_CPU_CRIS,       test "x$HAVE_CPU_CRIS" = "xyes")
-  AM_CONDITIONAL(HAVE_CPU_CRISV32,    test "x$HAVE_CPU_CRISV32" = "xyes")
-
-  AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu", [the host CPU])
-  AC_DEFINE_UNQUOTED(TARGET_CPU, "$target_cpu", [the target CPU])
-])
-
-dnl check if unaligned memory access works correctly
-AC_DEFUN([AG_GST_UNALIGNED_ACCESS], [
-  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*)
-        _AS_ECHO_N([(blacklisted) ])
-        as_cv_unaligned_access=no
-       ;;
-      i?86*|x86_64*|amd64*|powerpc*|m68k*|cris*)
-        _AS_ECHO_N([(whitelisted) ])
-        as_cv_unaligned_access=yes
-       ;;
-    esac
-  else
-    _AS_ECHO_N([(cached) ])
-  fi
-  if test x"$as_cv_unaligned_access" = x ; then
-    AC_TRY_RUN([
-int main(int argc, char **argv)
-{
-  char array[] = "ABCDEFGH";
-  unsigned int iarray[2];
-  memcpy(iarray,array,8);
-#define GET(x) (*(unsigned int *)((char *)iarray + (x)))
-  if(GET(0) != 0x41424344 && GET(0) != 0x44434241) return 1;
-  if(GET(1) != 0x42434445 && GET(1) != 0x45444342) return 1;
-  if(GET(2) != 0x43444546 && GET(2) != 0x46454443) return 1;
-  if(GET(3) != 0x44454647 && GET(3) != 0x47464544) return 1;
-  return 0;
-}
-    ], as_cv_unaligned_access="yes", as_cv_unaligned_access="no")
-  fi
-  AC_MSG_RESULT($as_cv_unaligned_access)
-  if test "$as_cv_unaligned_access" = "yes"; then
-    AC_DEFINE_UNQUOTED(HAVE_UNALIGNED_ACCESS, 1,
-      [defined if unaligned memory access works correctly])
-  fi
-])
diff --git a/common/m4/gst-args.m4 b/common/m4/gst-args.m4
deleted file mode 100644 (file)
index b478c82..0000000
+++ /dev/null
@@ -1,360 +0,0 @@
-dnl configure-time options shared among gstreamer modules
-
-dnl AG_GST_ARG_DEBUG
-dnl AG_GST_ARG_PROFILING
-dnl AG_GST_ARG_VALGRIND
-dnl AG_GST_ARG_GCOV
-
-dnl AG_GST_ARG_EXAMPLES
-
-dnl AG_GST_ARG_WITH_PKG_CONFIG_PATH
-dnl AG_GST_ARG_WITH_PACKAGE_NAME
-dnl AG_GST_ARG_WITH_PACKAGE_ORIGIN
-
-dnl AG_GST_ARG_WITH_PLUGINS
-dnl AG_GST_CHECK_PLUGIN
-dnl AG_GST_DISABLE_PLUGIN
-
-dnl AG_GST_ARG_ENABLE_EXTERNAL
-dnl AG_GST_ARG_ENABLE_EXPERIMENTAL
-dnl AG_GST_ARG_ENABLE_BROKEN
-
-dnl AG_GST_ARG_DISABLE_FATAL_WARNINGS
-AC_DEFUN([AG_GST_ARG_DEBUG],
-[
-  dnl debugging stuff
-  AC_ARG_ENABLE(debug,
-    AC_HELP_STRING([--disable-debug],[disable addition of -g debugging info]),
-    [
-      case "${enableval}" in
-        yes) USE_DEBUG=yes ;;
-        no)  USE_DEBUG=no ;;
-        *)   AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
-      esac
-    ],
-    [USE_DEBUG=yes]) dnl Default value
-])
-
-AC_DEFUN([AG_GST_ARG_PROFILING],
-[
-  AC_ARG_ENABLE(profiling,
-    AC_HELP_STRING([--enable-profiling],
-      [adds -pg to compiler commandline, for profiling]),
-    [
-      case "${enableval}" in
-        yes) USE_PROFILING=yes ;;
-        no)  USE_PROFILING=no ;;
-        *)   AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
-      esac
-    ],
-    [USE_PROFILING=no]) dnl Default value
-])
-
-AC_DEFUN([AG_GST_ARG_VALGRIND],
-[
-  dnl valgrind inclusion
-  AC_ARG_ENABLE(valgrind,
-    AC_HELP_STRING([--disable-valgrind],[disable run-time valgrind detection]),
-    [
-      case "${enableval}" in
-        yes) USE_VALGRIND="$USE_DEBUG" ;;
-        no)  USE_VALGRIND=no ;;
-        *)   AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind) ;;
-      esac
-    ],
-    [USE_VALGRIND="$USE_DEBUG"]) dnl Default value
-  VALGRIND_REQ="3.0"
-  if test "x$USE_VALGRIND" = xyes; then
-    PKG_CHECK_MODULES(VALGRIND, valgrind >= $VALGRIND_REQ,
-      USE_VALGRIND="yes",
-      USE_VALGRIND="no")
-  fi
-  if test "x$USE_VALGRIND" = xyes; then
-    AC_DEFINE(HAVE_VALGRIND, 1, [Define if valgrind should be used])
-    AC_MSG_NOTICE(Using extra code paths for valgrind)
-  fi
-])
-
-AC_DEFUN([AG_GST_ARG_GCOV],
-[
-  AC_ARG_ENABLE(gcov,
-    AC_HELP_STRING([--enable-gcov],
-      [compile with coverage profiling instrumentation (gcc only)]),
-    enable_gcov=$enableval,
-    enable_gcov=no)
-  if test x$enable_gcov = xyes ; then
-    if test "x$GCC" != "xyes"
-    then
-      AC_MSG_ERROR([gcov only works if gcc is used])
-    fi
-
-    AS_COMPILER_FLAG(["-fprofile-arcs"],
-      [GCOV_CFLAGS="$GCOV_CFLAGS -fprofile-arcs"],
-      true)
-    AS_COMPILER_FLAG(["-ftest-coverage"],
-      [GCOV_CFLAGS="$GCOV_CFLAGS -ftest-coverage"],
-      true)
-    dnl remove any -O flags - FIXME: is this needed ?
-    GCOV_CFLAGS=`echo "$GCOV_CFLAGS" | sed -e 's/-O[[0-9]]*//g'`
-    dnl libtool 1.5.22 and lower strip -fprofile-arcs from the flags
-    dnl passed to the linker, which is a bug; -fprofile-arcs implicitly
-    dnl links in -lgcov, so we do it explicitly here for the same effect
-    GCOV_LIBS=-lgcov
-    AC_SUBST(GCOV_CFLAGS)
-    AC_SUBST(GCOV_LIBS)
-    GCOV=`echo $CC | sed s/gcc/gcov/g`
-    AC_SUBST(GCOV)
-
-    GST_GCOV_ENABLED=yes
-    AC_DEFINE_UNQUOTED(GST_GCOV_ENABLED, 1,
-      [Defined if gcov is enabled to force a rebuild due to config.h changing])
-    dnl if gcov is used, we do not want default -O2 CFLAGS
-    if test "x$GST_GCOV_ENABLED" = "xyes"
-    then
-      CFLAGS="$CFLAGS -O0"
-      AC_SUBST(CFLAGS)
-      CXXFLAGS="$CXXFLAGS -O0"
-      AC_SUBST(CXXFLAGS)
-      FFLAGS="$FFLAGS -O0"
-      AC_SUBST(FFLAGS)
-      CCASFLAGS="$CCASFLAGS -O0"
-      AC_SUBST(CCASFLAGS)
-      AC_MSG_NOTICE([gcov enabled, setting CFLAGS and friends to $CFLAGS])
-    fi
-  fi
-  AM_CONDITIONAL(GST_GCOV_ENABLED, test x$enable_gcov = xyes)
-])
-
-AC_DEFUN([AG_GST_ARG_EXAMPLES],
-[
-  AC_ARG_ENABLE(examples,
-    AC_HELP_STRING([--disable-examples], [disable building examples]),
-      [
-        case "${enableval}" in
-          yes) BUILD_EXAMPLES=yes ;;
-          no)  BUILD_EXAMPLES=no ;;
-          *)   AC_MSG_ERROR(bad value ${enableval} for --disable-examples) ;;
-        esac
-      ],
-      [BUILD_EXAMPLES=yes]) dnl Default value
-  AM_CONDITIONAL(BUILD_EXAMPLES,      test "x$BUILD_EXAMPLES" = "xyes")
-])
-
-AC_DEFUN([AG_GST_ARG_WITH_PKG_CONFIG_PATH],
-[
-  dnl possibly modify pkg-config path
-  AC_ARG_WITH(pkg-config-path,
-     AC_HELP_STRING([--with-pkg-config-path],
-                    [colon-separated list of pkg-config(1) dirs]),
-     [
-       export PKG_CONFIG_PATH=${withval}
-       AC_MSG_NOTICE(Set PKG_CONFIG_PATH to $PKG_CONFIG_PATH)
-     ])
-])
-
-
-dnl This macro requires that GST_GIT or GST_CVS is set to yes or no (release)
-AC_DEFUN([AG_GST_ARG_WITH_PACKAGE_NAME],
-[
-  dnl package name in plugins
-  AC_ARG_WITH(package-name,
-    AC_HELP_STRING([--with-package-name],
-      [specify package name to use in plugins]),
-    [
-      case "${withval}" in
-        yes) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
-        no)  AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
-        *)   GST_PACKAGE_NAME="${withval}" ;;
-      esac
-    ],
-    [
-      P=$1
-      if test "x$P" = "x"
-      then
-        P=$PACKAGE_NAME
-      fi
-
-      if test "x$PACKAGE_VERSION_NANO" = "x0"
-      then
-        GST_PACKAGE_NAME="$P source release"
-      else
-        if test "x$PACKAGE_VERSION_NANO" = "x1"
-        then
-          GST_PACKAGE_NAME="$P git"
-        else
-          GST_PACKAGE_NAME="$P prerelease"
-        fi
-      fi
-    ]
-  )
-  AC_MSG_NOTICE(Using $GST_PACKAGE_NAME as package name)
-  AC_DEFINE_UNQUOTED(GST_PACKAGE_NAME, "$GST_PACKAGE_NAME",
-      [package name in plugins])
-  AC_SUBST(GST_PACKAGE_NAME)
-])
-
-AC_DEFUN([AG_GST_ARG_WITH_PACKAGE_ORIGIN],
-[
-  dnl package origin URL
-  AC_ARG_WITH(package-origin,
-    AC_HELP_STRING([--with-package-origin],
-      [specify package origin URL to use in plugins]),
-    [
-      case "${withval}" in
-        yes) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
-        no)  AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
-        *)   GST_PACKAGE_ORIGIN="${withval}" ;;
-      esac
-    ],
-    [GST_PACKAGE_ORIGIN="[Unknown package origin]"] dnl Default value
-  )
-  AC_MSG_NOTICE(Using $GST_PACKAGE_ORIGIN as package origin)
-  AC_DEFINE_UNQUOTED(GST_PACKAGE_ORIGIN, "$GST_PACKAGE_ORIGIN",
-      [package origin])
-  AC_SUBST(GST_PACKAGE_ORIGIN)
-])
-
-dnl sets WITH_PLUGINS to the list of plug-ins given as an argument
-dnl also clears GST_PLUGINS_ALL and GST_PLUGINS_SELECTED
-AC_DEFUN([AG_GST_ARG_WITH_PLUGINS],
-[
-  AC_ARG_WITH(plugins,
-    AC_HELP_STRING([--with-plugins],
-      [comma-separated list of dependencyless plug-ins to compile]),
-    [WITH_PLUGINS=$withval],
-    [WITH_PLUGINS=])
-
-  GST_PLUGINS_ALL=""
-  GST_PLUGINS_SELECTED=""
-  GST_PLUGINS_NONPORTED=""
-
-  AC_SUBST(GST_PLUGINS_ALL)
-  AC_SUBST(GST_PLUGINS_SELECTED)
-  AC_SUBST(GST_PLUGINS_NONPORTED)
-])
-
-dnl AG_GST_CHECK_PLUGIN(PLUGIN-NAME)
-dnl
-dnl This macro adds the plug-in <PLUGIN-NAME> to GST_PLUGINS_ALL. Then it
-dnl checks if WITH_PLUGINS is empty or the plugin is present in WITH_PLUGINS,
-dnl and if so adds it to GST_PLUGINS_SELECTED. Then it checks if the plugin
-dnl is present in WITHOUT_PLUGINS (ie. was disabled specifically) and if so
-dnl removes it from GST_PLUGINS_SELECTED.
-dnl
-dnl The macro will call AM_CONDITIONAL(USE_PLUGIN_<PLUGIN-NAME>, ...) to allow
-dnl control of what is built in Makefile.ams.
-AC_DEFUN([AG_GST_CHECK_PLUGIN],
-[
-  GST_PLUGINS_ALL="$GST_PLUGINS_ALL [$1]"
-
-  define([pname_def],translit([$1], -a-z, _a-z))
-
-  AC_ARG_ENABLE([$1],
-    AC_HELP_STRING([--disable-[$1]], [disable dependency-less $1 plugin]),
-    [
-      case "${enableval}" in
-        yes) [gst_use_]pname_def=yes ;;
-        no) [gst_use_]pname_def=no ;;
-        *) AC_MSG_ERROR([bad value ${enableval} for --enable-$1]) ;;
-       esac
-    ],
-    [[gst_use_]pname_def=yes]) dnl Default value
-
-  if test x$[gst_use_]pname_def = xno; then
-    AC_MSG_NOTICE(disabling dependency-less plugin $1)
-    WITHOUT_PLUGINS="$WITHOUT_PLUGINS [$1]"
-  fi
-  undefine([pname_def])
-
-  dnl First check inclusion
-  if [[ -z "$WITH_PLUGINS" ]] || echo " [$WITH_PLUGINS] " | tr , ' ' | grep -i " [$1] " > /dev/null; then
-    GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED [$1]"
-  fi
-  dnl Then check exclusion
-  if echo " [$WITHOUT_PLUGINS] " | tr , ' ' | grep -i " [$1] " > /dev/null; then
-    GST_PLUGINS_SELECTED=`echo " $GST_PLUGINS_SELECTED " | $SED -e 's/ [$1] / /'`
-  fi
-  dnl Finally check if the plugin is ported or not
-  if echo " [$GST_PLUGINS_NONPORTED] " | tr , ' ' | grep -i " [$1] " > /dev/null; then
-    GST_PLUGINS_SELECTED=`echo " $GST_PLUGINS_SELECTED " | $SED -e 's/ [$1] / /'`
-  fi
-  AM_CONDITIONAL([USE_PLUGIN_]translit([$1], a-z, A-Z), echo " $GST_PLUGINS_SELECTED " | grep -i " [$1] " > /dev/null)
-])
-
-dnl AG_GST_DISABLE_PLUGIN(PLUGIN-NAME)
-dnl
-dnl This macro disables the plug-in <PLUGIN-NAME> by removing it from
-dnl GST_PLUGINS_SELECTED.
-AC_DEFUN([AG_GST_DISABLE_PLUGIN],
-[
-  GST_PLUGINS_SELECTED=`echo " $GST_PLUGINS_SELECTED " | $SED -e 's/ [$1] / /'`
-  AM_CONDITIONAL([USE_PLUGIN_]translit([$1], a-z, A-Z), false)
-])
-
-AC_DEFUN([AG_GST_ARG_ENABLE_EXTERNAL],
-[
-  AG_GST_CHECK_FEATURE(EXTERNAL, [building of plug-ins with external deps],,
-    HAVE_EXTERNAL=yes, enabled,
-    [
-      AC_MSG_NOTICE(building external plug-ins)
-      BUILD_EXTERNAL="yes"
-    ],[
-      AC_MSG_WARN(all plug-ins with external dependencies will not be built)
-      BUILD_EXTERNAL="no"
-    ])
-  # make BUILD_EXTERNAL available to Makefile.am
-  AM_CONDITIONAL(BUILD_EXTERNAL, test "x$BUILD_EXTERNAL" = "xyes")
-])
-
-dnl experimental plug-ins; stuff that hasn't had the dust settle yet
-dnl read 'builds, but might not work'
-AC_DEFUN([AG_GST_ARG_ENABLE_EXPERIMENTAL],
-[
-  AG_GST_CHECK_FEATURE(EXPERIMENTAL, [building of experimental plug-ins],,
-    HAVE_EXPERIMENTAL=yes, disabled,
-    [
-      AC_MSG_WARN(building experimental plug-ins)
-      BUILD_EXPERIMENTAL="yes"
-    ],[
-      AC_MSG_NOTICE(not building experimental plug-ins)
-      BUILD_EXPERIMENTAL="no"
-    ])
-  # make BUILD_EXPERIMENTAL available to Makefile.am
-  AM_CONDITIONAL(BUILD_EXPERIMENTAL, test "x$BUILD_EXPERIMENTAL" = "xyes")
-])
-
-dnl broken plug-ins; stuff that doesn't seem to build at the moment
-AC_DEFUN([AG_GST_ARG_ENABLE_BROKEN],
-[
-  AG_GST_CHECK_FEATURE(BROKEN, [building of broken plug-ins],,
-    HAVE_BROKEN=yes, disabled,
-    [
-      AC_MSG_WARN([building broken plug-ins -- no bug reports on these, only patches ...])
-    ],[
-      AC_MSG_NOTICE([not building broken plug-ins])
-    ])
-])
-
-dnl allow people (or build tools) to override default behaviour
-dnl for fatal compiler warnings
-dnl Enable fatal warnings by default only for development versions
-AC_DEFUN([AG_GST_ARG_DISABLE_FATAL_WARNINGS],
-[
-  AC_ARG_ENABLE(fatal-warnings,
-    AC_HELP_STRING([--disable-fatal-warnings],
-                   [Don't turn compiler warnings into fatal errors]),
-    [
-      case "${enableval}" in
-        yes) FATAL_WARNINGS=yes ;;
-        no)  FATAL_WARNINGS=no ;;
-        *)   AC_MSG_ERROR(bad value ${enableval} for --disable-fatal-warnings) ;;
-      esac
-    ],
-    [
-      if test "x`expr $PACKAGE_VERSION_MINOR % 2`" = "x1" -a "x`expr $PACKAGE_VERSION_MICRO '<' 90`" = "x1"; then
-        FATAL_WARNINGS=yes
-      else
-        FATAL_WARNINGS=no
-      fi
-    ])
-])
diff --git a/common/m4/gst-check.m4 b/common/m4/gst-check.m4
deleted file mode 100644 (file)
index 4277053..0000000
+++ /dev/null
@@ -1,294 +0,0 @@
-dnl pkg-config-based checks for GStreamer modules and dependency modules
-
-dnl generic:
-dnl AG_GST_PKG_CHECK_MODULES([PREFIX], [WHICH], [REQUIRED])
-dnl sets HAVE_[$PREFIX], [$PREFIX]_*
-dnl AG_GST_CHECK_MODULES([PREFIX], [MODULE], [MINVER], [NAME], [REQUIRED])
-dnl sets HAVE_[$PREFIX], [$PREFIX]_*
-
-dnl specific:
-dnl AG_GST_CHECK_GST([MAJMIN], [MINVER], [REQUIRED])
-dnl   also sets/ACSUBSTs GST_TOOLS_DIR and GST_PLUGINS_DIR
-dnl AG_GST_CHECK_GST_BASE([MAJMIN], [MINVER], [REQUIRED])
-dnl AG_GST_CHECK_GST_CONTROLLER([MAJMIN], [MINVER], [REQUIRED])
-dnl AG_GST_CHECK_GST_NET([MAJMIN], [MINVER], [REQUIRED])
-dnl AG_GST_CHECK_GST_CHECK([MAJMIN], [MINVER], [REQUIRED])
-dnl AG_GST_CHECK_GST_PLUGINS_BASE([MAJMIN], [MINVER], [REQUIRED])
-dnl   also sets/ACSUBSTs GSTPB_PLUGINS_DIR
-
-AC_DEFUN([AG_GST_PKG_CHECK_MODULES],
-[
-  which="[$2]"
-  dnl not required by default, since we use this mostly for plugin deps
-  required=ifelse([$3], , "no", [$3])
-
-  PKG_CHECK_MODULES([$1], $which,
-    [
-      HAVE_[$1]="yes"
-    ],
-    [
-      HAVE_[$1]="no"
-      if test "x$required" = "xyes"; then
-        AC_MSG_ERROR($[$1]_PKG_ERRORS)
-      else
-        AC_MSG_NOTICE($[$1]_PKG_ERRORS)
-      fi
-    ])
-
-  dnl AC_SUBST of CFLAGS and LIBS was not done before automake 1.7
-  dnl It gets done automatically in automake >= 1.7, which we now require
-]))
-
-AC_DEFUN([AG_GST_CHECK_MODULES],
-[
-  module=[$2]
-  minver=[$3]
-  name="[$4]"
-  required=ifelse([$5], , "yes", [$5]) dnl required by default
-
-  PKG_CHECK_MODULES([$1], $module >= $minver,
-    [
-      HAVE_[$1]="yes"
-    ],
-    [
-      HAVE_[$1]="no"
-      AC_MSG_NOTICE($[$1]_PKG_ERRORS)
-      if test "x$required" = "xyes"; then
-        AC_MSG_ERROR([no $module >= $minver ($name) found])
-      else
-        AC_MSG_NOTICE([no $module >= $minver ($name) found])
-      fi
-    ])
-
-  dnl AC_SUBST of CFLAGS and LIBS was not done before automake 1.7
-  dnl It gets done automatically in automake >= 1.7, which we now require
-]))
-
-AC_DEFUN([AG_GST_CHECK_GST],
-[
-  AG_GST_CHECK_MODULES(GST, gstreamer-[$1], [$2], [GStreamer], [$3])
-  dnl allow setting before calling this macro to override
-  if test -z $GST_TOOLS_DIR; then
-    GST_TOOLS_DIR=`$PKG_CONFIG --variable=toolsdir gstreamer-[$1]`
-    if test -z $GST_TOOLS_DIR; then
-      AC_MSG_ERROR(
-        [no tools dir set in GStreamer pkg-config file, core upgrade needed.])
-    fi
-  fi
-  AC_MSG_NOTICE([using GStreamer tools in $GST_TOOLS_DIR])
-  AC_SUBST(GST_TOOLS_DIR)
-
-  dnl check for where core plug-ins got installed
-  dnl this is used for unit tests
-  dnl allow setting before calling this macro to override
-  if test -z $GST_PLUGINS_DIR; then
-    GST_PLUGINS_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-[$1]`
-    if test -z $GST_PLUGINS_DIR; then
-      AC_MSG_ERROR(
-        [no pluginsdir set in GStreamer pkg-config file, core upgrade needed.])
-    fi
-  fi
-  AC_MSG_NOTICE([using GStreamer plug-ins in $GST_PLUGINS_DIR])
-  AC_SUBST(GST_PLUGINS_DIR)
-])
-
-AC_DEFUN([AG_GST_CHECK_GST_BASE],
-[
-  AG_GST_CHECK_MODULES(GST_BASE, gstreamer-base-[$1], [$2],
-    [GStreamer Base Libraries], [$3])
-])
-
-AC_DEFUN([AG_GST_CHECK_GST_CONTROLLER],
-[
-  AG_GST_CHECK_MODULES(GST_CONTROLLER, gstreamer-controller-[$1], [$2],
-    [GStreamer Controller Library], [$3])
-])
-
-AC_DEFUN([AG_GST_CHECK_GST_NET],
-[
-  AG_GST_CHECK_MODULES(GST_NET, gstreamer-net-[$1], [$2],
-    [GStreamer Network Library], [$3])
-])
-
-AC_DEFUN([AG_GST_CHECK_GST_CHECK],
-[
-  AG_GST_CHECK_MODULES(GST_CHECK, gstreamer-check-[$1], [$2],
-    [GStreamer Check unittest Library], [$3])
-])
-
-dnl ===========================================================================
-dnl AG_GST_CHECK_UNINSTALLED_SETUP([ACTION-IF-UNINSTALLED], [ACTION-IF-NOT])
-dnl
-dnl ACTION-IF-UNINSTALLED  (optional) extra actions to perform if the setup
-dnl                        is an uninstalled setup
-dnl ACTION-IF-NOT          (optional) extra actions to perform if the setup
-dnl                        is not an uninstalled setup
-dnl ===========================================================================
-AC_DEFUN([AG_GST_CHECK_UNINSTALLED_SETUP],
-[
-  AC_MSG_CHECKING([whether this is an uninstalled GStreamer setup])
-  AC_CACHE_VAL(gst_cv_is_uninstalled_setup,[
-    gst_cv_is_uninstalled_setup=no
-    if (set -u; : $GST_PLUGIN_SYSTEM_PATH) 2>/dev/null ; then
-      if test -z "$GST_PLUGIN_SYSTEM_PATH" \
-           -a -n "$GST_PLUGIN_SCANNER"     \
-           -a -n "$GST_PLUGIN_PATH"        \
-           -a -n "$GST_REGISTRY"           \
-           -a -n "$DYLD_LIBRARY_PATH"      \
-           -a -n "$LD_LIBRARY_PATH"; then
-        gst_cv_is_uninstalled_setup=yes;
-      fi
-    fi
-  ])
-  AC_MSG_RESULT($gst_cv_is_uninstalled_setup)
-  if test "x$gst_cv_is_uninstalled_setup" = "xyes"; then
-    ifelse([$1], , :, [$1])
-  else
-    ifelse([$2], , :, [$2])
-  fi
-])
-
-dnl ===========================================================================
-dnl AG_GST_CHECK_GST_PLUGINS_BASE([GST-API_VERSION], [MIN-VERSION], [REQUIRED])
-dnl
-dnl Sets GST_PLUGINS_BASE_CFLAGS and GST_PLUGINS_BASE_LIBS.
-dnl
-dnl Also sets GSTPB_PLUGINS_DIR (and for consistency also GST_PLUGINS_BASE_DIR)
-dnl for use in Makefile.am. This is only really needed/useful in uninstalled
-dnl setups, since in an installed setup all plugins will be found in
-dnl GST_PLUGINS_DIR anyway.
-dnl ===========================================================================
-AC_DEFUN([AG_GST_CHECK_GST_PLUGINS_BASE],
-[
-  AG_GST_CHECK_MODULES(GST_PLUGINS_BASE, gstreamer-plugins-base-[$1], [$2],
-    [GStreamer Base Plugins], [$3])
-
-  if test "x$HAVE_GST_PLUGINS_BASE" = "xyes"; then
-    dnl check for where base plugins got installed
-    dnl this is used for unit tests
-    dnl allow setting before calling this macro to override
-    if test -z $GSTPB_PLUGINS_DIR; then
-      GSTPB_PLUGINS_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-plugins-base-[$1]`
-      if test -z $GSTPB_PLUGINS_DIR; then
-        AC_MSG_ERROR(
-          [no pluginsdir set in GStreamer Base Plugins pkg-config file])
-      fi
-    fi
-    AC_MSG_NOTICE([using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR])
-    GST_PLUGINS_BASE_DIR="$GSTPB_PLUGINS_DIR/gst:$GSTPB_PLUGINS_DIR/sys:$GSTPB_PLUGINS_DIR/ext"
-    AC_SUBST(GST_PLUGINS_BASE_DIR)
-    AC_SUBST(GSTPB_PLUGINS_DIR)
-  fi
-])
-
-dnl ===========================================================================
-dnl AG_GST_CHECK_GST_PLUGINS_GOOD([GST-API_VERSION], [MIN-VERSION])
-dnl
-dnl Will set GST_PLUGINS_GOOD_DIR for use in Makefile.am. Note that this will
-dnl only be set in an uninstalled setup, since -good ships no .pc file and in
-dnl an installed setup all plugins will be found in GST_PLUGINS_DIR anyway.
-dnl ===========================================================================
-AC_DEFUN([AG_GST_CHECK_GST_PLUGINS_GOOD],
-[
-  AG_GST_CHECK_MODULES(GST_PLUGINS_GOOD, gstreamer-plugins-good-[$1], [$2],
-    [GStreamer Good Plugins], [no])
-
-  if test "x$HAVE_GST_PLUGINS_GOOD" = "xyes"; then
-    dnl check for where good plugins got installed
-    dnl this is used for unit tests
-    dnl allow setting before calling this macro to override
-    if test -z $GST_PLUGINS_GOOD_DIR; then
-      GST_PLUGINS_GOOD_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-plugins-good-[$1]`
-      if test -z $GST_PLUGINS_GOOD_DIR; then
-        AC_MSG_ERROR([no pluginsdir set in GStreamer Good Plugins pkg-config file])
-      fi
-    fi
-    AC_MSG_NOTICE([using GStreamer Good Plugins in $GST_PLUGINS_GOOD_DIR])
-    GST_PLUGINS_GOOD_DIR="$GST_PLUGINS_GOOD_DIR/gst:$GST_PLUGINS_GOOD_DIR/sys:$GST_PLUGINS_GOOD_DIR/ext"
-    AC_SUBST(GST_PLUGINS_GOOD_DIR)
-  fi
-])
-
-dnl ===========================================================================
-dnl AG_GST_CHECK_GST_PLUGINS_UGLY([GST-API_VERSION], [MIN-VERSION])
-dnl
-dnl Will set GST_PLUGINS_UGLY_DIR for use in Makefile.am. Note that this will
-dnl only be set in an uninstalled setup, since -bad ships no .pc file and in
-dnl an installed setup all plugins will be found in GST_PLUGINS_DIR anyway.
-dnl ===========================================================================
-AC_DEFUN([AG_GST_CHECK_GST_PLUGINS_UGLY],
-[
-  AG_GST_CHECK_MODULES(GST_PLUGINS_UGLY, gstreamer-plugins-ugly-[$1], [$2],
-    [GStreamer Ugly Plugins], [no])
-
-  if test "x$HAVE_GST_PLUGINS_UGLY" = "xyes"; then
-    dnl check for where ugly plugins got installed
-    dnl this is used for unit tests
-    dnl allow setting before calling this macro to override
-    if test -z $GST_PLUGINS_UGLY_DIR; then
-      GST_PLUGINS_UGLY_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-plugins-ugly-[$1]`
-      if test -z $GST_PLUGINS_UGLY_DIR; then
-        AC_MSG_ERROR([no pluginsdir set in GStreamer Ugly Plugins pkg-config file])
-      fi
-    fi
-    AC_MSG_NOTICE([using GStreamer Ugly Plugins in $GST_PLUGINS_UGLY_DIR])
-    GST_PLUGINS_UGLY_DIR="$GST_PLUGINS_UGLY_DIR/gst:$GST_PLUGINS_UGLY_DIR/sys:$GST_PLUGINS_UGLY_DIR/ext"
-    AC_SUBST(GST_PLUGINS_UGLY_DIR)
-  fi
-])
-
-dnl ===========================================================================
-dnl AG_GST_CHECK_GST_PLUGINS_BAD([GST-API_VERSION], [MIN-VERSION])
-dnl
-dnl Will set GST_PLUGINS_BAD_DIR for use in Makefile.am. Note that this will
-dnl only be set in an uninstalled setup, since -ugly ships no .pc file and in
-dnl an installed setup all plugins will be found in GST_PLUGINS_DIR anyway.
-dnl ===========================================================================
-AC_DEFUN([AG_GST_CHECK_GST_PLUGINS_BAD],
-[
-  AG_GST_CHECK_MODULES(GST_PLUGINS_BAD, gstreamer-plugins-bad-[$1], [$2],
-    [GStreamer Bad Plugins], [no])
-
-  if test "x$HAVE_GST_PLUGINS_BAD" = "xyes"; then
-    dnl check for where bad plugins got installed
-    dnl this is used for unit tests
-    dnl allow setting before calling this macro to override
-    if test -z $GST_PLUGINS_BAD_DIR; then
-      GST_PLUGINS_BAD_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-plugins-bad-[$1]`
-      if test -z $GST_PLUGINS_BAD_DIR; then
-        AC_MSG_ERROR([no pluginsdir set in GStreamer Bad Plugins pkg-config file])
-      fi
-    fi
-    AC_MSG_NOTICE([using GStreamer Bad Plugins in $GST_PLUGINS_BAD_DIR])
-    GST_PLUGINS_BAD_DIR="$GST_PLUGINS_BAD_DIR/gst:$GST_PLUGINS_BAD_DIR/sys:$GST_PLUGINS_BAD_DIR/ext"
-    AC_SUBST(GST_PLUGINS_BAD_DIR)
-  fi
-])
-
-dnl ===========================================================================
-dnl AG_GST_CHECK_GST_PLUGINS_LIBAV([GST-API_VERSION], [MIN-VERSION])
-dnl
-dnl Will set GST_PLUGINS_LIBAV_DIR for use in Makefile.am. Note that this will
-dnl only be set in an uninstalled setup, since -libav ships no .pc file and in
-dnl an installed setup all plugins will be found in GST_PLUGINS_DIR anyway.
-dnl ===========================================================================
-AC_DEFUN([AG_GST_CHECK_GST_PLUGINS_LIBAV],
-[
-  AG_GST_CHECK_MODULES(GST_PLUGINS_LIBAV, gstreamer-plugins-libav-[$1], [$2],
-    [GStreamer Libav Plugins], [no])
-
-  if test "x$HAVE_GST_PLUGINS_LIBAV" = "xyes"; then
-    dnl check for where libav plugins got installed
-    dnl this is used for unit tests
-    dnl allow setting before calling this macro to override
-    if test -z $GST_PLUGINS_LIBAV_DIR; then
-      GST_PLUGINS_LIBAV_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-plugins-libav-[$1]`
-      if test -z $GST_PLUGINS_LIBAV_DIR; then
-        AC_MSG_ERROR([no pluginsdir set in GStreamer Libav Plugins pkg-config file])
-      fi
-    fi
-    GST_PLUGINS_LIBAV_DIR="$GST_PLUGINS_LIBAV_DIR/ext/libav"
-    AC_MSG_NOTICE([using GStreamer Libav Plugins in $GST_PLUGINS_LIBAV_DIR])
-    AC_SUBST(GST_PLUGINS_LIBAV_DIR)
-  fi
-])
diff --git a/common/m4/gst-debuginfo.m4 b/common/m4/gst-debuginfo.m4
deleted file mode 100644 (file)
index b48854d..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-AC_DEFUN([AG_GST_DEBUGINFO], [
-AC_ARG_ENABLE(debug,
-AC_HELP_STRING([--disable-debug],[disable addition of -g debugging info]),
-[case "${enableval}" in
-  yes) USE_DEBUG=yes ;;
-  no)  USE_DEBUG=no ;;
-  *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
-esac],
-[USE_DEBUG=yes]) dnl Default value
-
-AC_ARG_ENABLE(DEBUG,
-AC_HELP_STRING([--disable-DEBUG],[disables compilation of debugging messages]),
-[case "${enableval}" in
-  yes) ENABLE_DEBUG=yes ;;
-  no)  ENABLE_DEBUG=no ;;
-  *) AC_MSG_ERROR(bad value ${enableval} for --enable-DEBUG) ;;
-esac],
-[ENABLE_DEBUG=yes]) dnl Default value
-if test x$ENABLE_DEBUG = xyes; then
-  AC_DEFINE(GST_DEBUG_ENABLED, 1, [Define if DEBUG statements should be compiled in])
-fi
-
-AC_ARG_ENABLE(INFO,
-AC_HELP_STRING([--disable-INFO],[disables compilation of informational messages]),
-[case "${enableval}" in
-  yes) ENABLE_INFO=yes ;;
-  no)  ENABLE_INFO=no ;;
-  *) AC_MSG_ERROR(bad value ${enableval} for --enable-INFO) ;;
-esac],
-[ENABLE_INFO=yes]) dnl Default value
-if test x$ENABLE_INFO = xyes; then
-  AC_DEFINE(GST_INFO_ENABLED, 1, [Define if INFO statements should be compiled in])
-fi
-
-AC_ARG_ENABLE(debug-color,
-AC_HELP_STRING([--disable-debug-color],[disables color output of DEBUG and INFO output]),
-[case "${enableval}" in
-  yes) ENABLE_DEBUG_COLOR=yes ;;
-  no)  ENABLE_DEBUG_COLOR=no ;;
-  *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug-color) ;;
-esac],
-[ENABLE_DEBUG_COLOR=yes]) dnl Default value
-if test "x$ENABLE_DEBUG_COLOR" = xyes; then
-  AC_DEFINE(GST_DEBUG_COLOR, 1, [Define if debugging messages should be colorized])
-fi
-])
diff --git a/common/m4/gst-default.m4 b/common/m4/gst-default.m4
deleted file mode 100644 (file)
index 8de9756..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-dnl default elements used for tests and such
-
-dnl AG_GST_DEFAULT_ELEMENTS
-
-AC_DEFUN([AG_GST_DEFAULT_ELEMENTS],
-[
-  dnl decide on default elements
-  dnl FIXME: describe where exactly this gets used
-  dnl FIXME: decide if it's a problem that this could point to sinks from
-  dnl        depending plugin modules
-  dnl FIXME: when can we just use autoaudiosrc and autovideosrc?
-  DEFAULT_AUDIOSINK="autoaudiosink"
-  DEFAULT_VIDEOSINK="autovideosink"
-  DEFAULT_AUDIOSRC="alsasrc"
-  DEFAULT_VIDEOSRC="v4l2src"
-  DEFAULT_VISUALIZER="goom"
-  case "$host" in
-    *-sun-* | *pc-solaris* )
-      DEFAULT_AUDIOSRC="sunaudiosrc"
-      ;;
-    *-darwin* )
-      DEFAULT_AUDIOSRC="osxaudiosrc"
-      ;;
-  esac
-
-  dnl Default audio sink
-  AC_ARG_WITH(default-audiosink,
-    AC_HELP_STRING([--with-default-audiosink], [specify default audio sink]),
-    [
-      case "${withval}" in
-        yes) AC_MSG_ERROR(bad value ${withval} for --with-default-audiosink) ;;
-        no)  AC_MSG_ERROR(bad value ${withval} for --with-default-audiosink) ;;
-        *)   DEFAULT_AUDIOSINK="${withval}" ;;
-      esac
-    ],
-    [
-      DEFAULT_AUDIOSINK="$DEFAULT_AUDIOSINK"
-    ] dnl Default value as determined above
-  )
-  AC_MSG_NOTICE(Using $DEFAULT_AUDIOSINK as default audio sink)
-  AC_SUBST(DEFAULT_AUDIOSINK)
-  AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSINK, "$DEFAULT_AUDIOSINK",
-    [Default audio sink])
-
-  dnl Default audio source
-  AC_ARG_WITH(default-audiosrc,
-    AC_HELP_STRING([--with-default-audiosrc], [specify default audio source]),
-    [
-      case "${withval}" in
-        yes) AC_MSG_ERROR(bad value ${withval} for --with-default-audiosrc) ;;
-        no)  AC_MSG_ERROR(bad value ${withval} for --with-default-audiosrc) ;;
-        *)   DEFAULT_AUDIOSRC="${withval}" ;;
-      esac
-    ],
-    [
-      DEFAULT_AUDIOSRC="$DEFAULT_AUDIOSRC"
-    ] dnl Default value as determined above
-  )
-  AC_MSG_NOTICE(Using $DEFAULT_AUDIOSRC as default audio source)
-  AC_SUBST(DEFAULT_AUDIOSRC)
-  AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSRC, "$DEFAULT_AUDIOSRC",
-    [Default audio source])
-
-  dnl Default video sink
-  AC_ARG_WITH(default-videosink,
-    AC_HELP_STRING([--with-default-videosink], [specify default video sink]),
-    [
-      case "${withval}" in
-        yes) AC_MSG_ERROR(bad value ${withval} for --with-default-videosink) ;;
-        no)  AC_MSG_ERROR(bad value ${withval} for --with-default-videosink) ;;
-        *)   DEFAULT_VIDEOSINK="${withval}" ;;
-      esac
-    ],
-    [
-      DEFAULT_VIDEOSINK="$DEFAULT_VIDEOSINK"
-    ] dnl Default value as determined above
-  )
-  AC_MSG_NOTICE(Using $DEFAULT_VIDEOSINK as default video sink)
-  AC_SUBST(DEFAULT_VIDEOSINK)
-  AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSINK, "$DEFAULT_VIDEOSINK",
-    [Default video sink])
-
-  dnl Default video source
-  AC_ARG_WITH(default-videosrc,
-    AC_HELP_STRING([--with-default-videosrc], [specify default video source]),
-    [
-      case "${withval}" in
-        yes) AC_MSG_ERROR(bad value ${withval} for --with-default-videosrc) ;;
-        no)  AC_MSG_ERROR(bad value ${withval} for --with-default-videosrc) ;;
-        *)   DEFAULT_VIDEOSRC="${withval}" ;;
-      esac
-    ],
-    [
-      DEFAULT_VIDEOSRC="$DEFAULT_VIDEOSRC"
-    ] dnl Default value as determined above
-  )
-  AC_MSG_NOTICE(Using $DEFAULT_VIDEOSRC as default video source)
-  AC_SUBST(DEFAULT_VIDEOSRC)
-  AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSRC, "$DEFAULT_VIDEOSRC",
-    [Default video source])
-
-    dnl Default visualizer
-  AC_ARG_WITH(default-visualizer,
-    AC_HELP_STRING([--with-default-visualizer], [specify default visualizer]),
-    [
-      case "${withval}" in
-        yes) AC_MSG_ERROR(bad value ${withval} for --with-default-visualizer) ;;
-        no)  AC_MSG_ERROR(bad value ${withval} for --with-default-visualizer) ;;
-        *)   DEFAULT_VISUALIZER="${withval}" ;;
-      esac
-    ],
-    [
-      DEFAULT_VISUALIZER="$DEFAULT_VISUALIZER"
-    ] dnl Default value as determined above
-  )
-  AC_MSG_NOTICE(Using $DEFAULT_VISUALIZER as default visualizer)
-  AC_SUBST(DEFAULT_VISUALIZER)
-  AC_DEFINE_UNQUOTED(DEFAULT_VISUALIZER, "$DEFAULT_VISUALIZER",
-    [Default visualizer])
-])
diff --git a/common/m4/gst-doc.m4 b/common/m4/gst-doc.m4
deleted file mode 100644 (file)
index 5d3f0fd..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-AC_DEFUN([AG_GST_DOCBOOK_CHECK],
-[
-  dnl choose a location to install docbook docs in
-  if test "x$PACKAGE_TARNAME" = "x"
-  then
-    AC_MSG_ERROR([Internal error - PACKAGE_TARNAME not set])
-  fi
-  docdir="\$(datadir)/doc/$PACKAGE_TARNAME-$GST_API_VERSION"
-
-  dnl enable/disable docbook documentation building
-  AC_ARG_ENABLE(docbook,
-  AC_HELP_STRING([--enable-docbook],
-                 [use docbook to build documentation [default=no]]),,
-                 enable_docbook=no)
-
-  have_docbook=no
-
-  if test x$enable_docbook = xyes; then
-    dnl check if we actually have everything we need
-
-    dnl check for docbook tools
-    AC_CHECK_PROG(HAVE_DOCBOOK2PS, docbook2ps, yes, no)
-    AC_CHECK_PROG(HAVE_XSLTPROC, xsltproc, yes, no)
-    AC_CHECK_PROG(HAVE_JADETEX, jadetex, yes, no)
-    AC_CHECK_PROG(HAVE_PS2PDF, ps2pdf, yes, no)
-
-    dnl check if we can process docbook stuff
-    AS_DOCBOOK(have_docbook=yes, have_docbook=no)
-
-    dnl check for extra tools
-    AC_CHECK_PROG(HAVE_DVIPS, dvips, yes, no)
-    AC_CHECK_PROG(HAVE_XMLLINT, xmllint, yes, no)
-
-    AC_CHECK_PROG(HAVE_PNGTOPNM, pngtopnm, yes, no)
-    AC_CHECK_PROG(HAVE_PNMTOPS,  pnmtops,  yes, no)
-    AC_CHECK_PROG(HAVE_EPSTOPDF, epstopdf, yes, no)
-
-    dnl check if we can generate HTML
-    if test "x$HAVE_XSLTPROC" = "xyes" && \
-       test "x$enable_docbook" = "xyes" && \
-       test "x$HAVE_XMLLINT" = "xyes"; then
-      DOC_HTML=yes
-      AC_MSG_NOTICE(Will output HTML documentation)
-     else
-      DOC_HTML=no
-      AC_MSG_NOTICE(Will not output HTML documentation)
-    fi
-
-    dnl check if we can generate PS
-    if test "x$HAVE_DOCBOOK2PS" = "xyes" && \
-       test "x$enable_docbook" = "xyes" && \
-       test "x$HAVE_XMLLINT" = "xyes" && \
-       test "x$HAVE_JADETEX" = "xyes" && \
-       test "x$HAVE_DVIPS" = "xyes" && \
-       test "x$HAVE_PNGTOPNM" = "xyes" && \
-       test "x$HAVE_PNMTOPS" = "xyes"; then
-      DOC_PS=yes
-      AC_MSG_NOTICE(Will output PS documentation)
-    else
-      DOC_PS=no
-      AC_MSG_NOTICE(Will not output PS documentation)
-    fi
-
-    dnl check if we can generate PDF - using only ps2pdf
-    if test "x$DOC_PS" = "xyes" && \
-       test "x$enable_docbook" = "xyes" && \
-       test "x$HAVE_XMLLINT" = "xyes" && \
-       test "x$HAVE_PS2PDF" = "xyes"; then
-      DOC_PDF=yes
-      AC_MSG_NOTICE(Will output PDF documentation)
-    else
-      DOC_PDF=no
-      AC_MSG_NOTICE(Will not output PDF documentation)
-    fi
-
-    dnl if we don't have everything, we should disable
-    if test "x$have_docbook" != "xyes"; then
-      enable_docbook=no
-    fi
-  fi
-
-  dnl if we're going to install documentation, tell us where
-  if test "x$have_docbook" = "xyes"; then
-    AC_MSG_NOTICE(Installing documentation in $docdir)
-    AC_SUBST(docdir)
-  fi
-
-  AM_CONDITIONAL(ENABLE_DOCBOOK,      test x$enable_docbook = xyes)
-  AM_CONDITIONAL(DOC_HTML,            test x$DOC_HTML = xyes)
-  AM_CONDITIONAL(DOC_PDF,             test x$DOC_PDF = xyes)
-  AM_CONDITIONAL(DOC_PS,              test x$DOC_PS = xyes)
-])
diff --git a/common/m4/gst-dowhile.m4 b/common/m4/gst-dowhile.m4
deleted file mode 100644 (file)
index 069808d..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-dnl
-dnl Check for working do while(0) macros. This is used by G_STMT_START
-dnl and G_STMT_END in glib/gmacros.h. Without having this defined we
-dnl get "ambigious if-else" compiler warnings when compling C++ code.
-dnl
-dnl Copied from GLib's configure.in
-dnl
-AC_DEFUN([AG_GST_CHECK_DOWHILE_MACROS],[
-
-dnl *** check for working do while(0) macros ***
-AC_CACHE_CHECK([for working do while(0) macros], _cv_g_support_dowhile_macros, [
-       AC_TRY_COMPILE([],[
-       #define STMT_START do
-       #define STMT_END while(0)
-       #define STMT_TEST STMT_START { i = 0; } STMT_END
-       int main(void) { int i = 1; STMT_TEST; return i; }],
-       [_cv_g_support_dowhile_macros=yes],
-       [_cv_g_support_dowhile_macros=no],
-       [_cv_g_support_dowhile_macros=yes])
-])
-if test x$_cv_g_support_dowhile_macros = xyes; then
-  AC_DEFINE(HAVE_DOWHILE_MACROS, 1, [define for working do while(0) macros])
-fi
-])
diff --git a/common/m4/gst-error.m4 b/common/m4/gst-error.m4
deleted file mode 100644 (file)
index bce80d2..0000000
+++ /dev/null
@@ -1,298 +0,0 @@
-dnl handle various error-related things
-
-dnl Thomas Vander Stichele <thomas@apestaart.org>
-dnl Tim-Philipp Müller <tim centricular net>
-
-dnl Last modification: 2008-02-18
-
-dnl AG_GST_SET_ERROR_CFLAGS([ADD-WERROR], [MORE_FLAGS])
-dnl AG_GST_SET_ERROR_CXXFLAGS([ADD-WERROR], [MORE_FLAGS])
-dnl AG_GST_SET_LEVEL_DEFAULT([IS-GIT-VERSION])
-
-
-dnl Sets WARNING_CFLAGS and ERROR_CFLAGS to something the compiler 
-dnl will accept and AC_SUBST them so they are available in Makefile
-dnl
-dnl WARNING_CFLAGS will contain flags to make the compiler emit more
-dnl   warnings.
-dnl ERROR_CFLAGS will contain flags to make those warnings fatal,
-dnl   unless ADD-WERROR is set to "no"
-dnl 
-dnl If MORE_FLAGS is set, tries to add each of the given flags
-dnl to WARNING_CFLAGS if the compiler supports them. Each flag is 
-dnl tested separately.
-dnl
-dnl These flags can be overridden at make time:
-dnl make ERROR_CFLAGS=
-AC_DEFUN([AG_GST_SET_ERROR_CFLAGS],
-[
-  AC_REQUIRE([AC_PROG_CC])
-  AC_REQUIRE([AS_COMPILER_FLAG])
-
-  WARNING_CFLAGS=""
-  ERROR_CFLAGS=""
-
-  dnl if we support -Wall, set it unconditionally
-  AS_COMPILER_FLAG(-Wall,
-                   WARNING_CFLAGS="$WARNING_CFLAGS -Wall")
-
-  dnl Warn if declarations after statements are used (C99 extension)
-  AS_COMPILER_FLAG(-Wdeclaration-after-statement,
-        WARNING_CFLAGS="$WARNING_CFLAGS -Wdeclaration-after-statement")
-
-  dnl Warn if variable length arrays are used (C99 extension)
-  AS_COMPILER_FLAG(-Wvla,
-        WARNING_CFLAGS="$WARNING_CFLAGS -Wvla")
-
-  dnl Warn for invalid pointer arithmetic
-  AS_COMPILER_FLAG(-Wpointer-arith,
-        WARNING_CFLAGS="$WARNING_CFLAGS -Wpointer-arith")
-
-  dnl if asked for, add -Werror if supported
-  if test "x$1" != "xno"
-  then
-    AS_COMPILER_FLAG(-Werror, ERROR_CFLAGS="$ERROR_CFLAGS -Werror")
-
-    dnl if -Werror isn't suported, try -errwarn=%all (Sun Forte case)
-    if test "x$ERROR_CFLAGS" = "x"
-    then
-      AS_COMPILER_FLAG([-errwarn=%all], [
-          ERROR_CFLAGS="-errwarn=%all"
-          dnl try -errwarn=%all,no%E_EMPTY_DECLARATION,
-          dnl no%E_STATEMENT_NOT_REACHED,no%E_ARGUEMENT_MISMATCH,
-          dnl no%E_MACRO_REDEFINED (Sun Forte case)
-          dnl For Forte we need disable "empty declaration" warning produced by un-needed semicolon
-          dnl "statement not reached" disabled because there is g_assert_not_reached () in some places
-          dnl "macro redefined" because of gst/gettext.h
-          dnl FIXME: is it really supposed to be 'ARGUEMENT' and not 'ARGUMENT'?
-          for f in 'no%E_EMPTY_DECLARATION' \
-                   'no%E_STATEMENT_NOT_REACHED' \
-                   'no%E_ARGUEMENT_MISMATCH' \
-                   'no%E_MACRO_REDEFINED' \
-                   'no%E_LOOP_NOT_ENTERED_AT_TOP'
-          do
-            AS_COMPILER_FLAG([-errwarn=%all,$f], [
-              ERROR_CFLAGS="$ERROR_CFLAGS,$f"
-            ])
-          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
-
-  if test "x$2" != "x"
-  then
-    UNSUPPORTED=""
-    list="$2"
-    for each in $list
-    do
-      AS_COMPILER_FLAG($each,
-          WARNING_CFLAGS="$WARNING_CFLAGS $each",
-          UNSUPPORTED="$UNSUPPORTED $each")
-    done
-    if test "X$UNSUPPORTED" != X ; then
-      AC_MSG_NOTICE([unsupported compiler flags: $UNSUPPORTED])
-    fi
-  fi
-
-  AC_SUBST(WARNING_CFLAGS)
-  AC_SUBST(ERROR_CFLAGS)
-  AC_MSG_NOTICE([set WARNING_CFLAGS to $WARNING_CFLAGS])
-  AC_MSG_NOTICE([set ERROR_CFLAGS to $ERROR_CFLAGS])
-])
-
-dnl Sets WARNING_CXXFLAGS and ERROR_CXXFLAGS to something the compiler 
-dnl will accept and AC_SUBST them so they are available in Makefile
-dnl
-dnl WARNING_CXXFLAGS will contain flags to make the compiler emit more
-dnl   warnings.
-dnl ERROR_CXXFLAGS will contain flags to make those warnings fatal,
-dnl   unless ADD-WERROR is set to "no"
-dnl 
-dnl If MORE_FLAGS is set, tries to add each of the given flags
-dnl to WARNING_CFLAGS if the compiler supports them. Each flag is 
-dnl tested separately.
-dnl
-dnl These flags can be overridden at make time:
-dnl make ERROR_CXXFLAGS=
-AC_DEFUN([AG_GST_SET_ERROR_CXXFLAGS],
-[
-  AC_REQUIRE([AC_PROG_CXX])
-  AC_REQUIRE([AS_CXX_COMPILER_FLAG])
-
-  ERROR_CXXFLAGS=""
-  WARNING_CXXFLAGS=""
-
-  dnl if we support -Wall, set it unconditionally
-  AS_CXX_COMPILER_FLAG(-Wall, WARNING_CXXFLAGS="$WARNING_CXXFLAGS -Wall")
-
-  dnl if asked for, add -Werror if supported
-  if test "x$1" != "xno"
-  then
-    AS_CXX_COMPILER_FLAG(-Werror, ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror")
-
-    if test "x$ERROR_CXXFLAGS" != "x"
-    then
-        dnl add exceptions
-        AS_CXX_COMPILER_FLAG([-Wno-non-virtual-dtor], ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Wno-non-virtual-dtor")
-
-       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_CXX_COMPILER_FLAG([-fno-strict-aliasing],
-           ERROR_CXXFLAGS="$ERROR_CXXFLAGS -fno-strict-aliasing")
-         ])
-    else
-      dnl if -Werror isn't suported, try -errwarn=%all
-      AS_CXX_COMPILER_FLAG([-errwarn=%all], ERROR_CXXFLAGS="$ERROR_CXXFLAGS -errwarn=%all")
-      if test "x$ERROR_CXXFLAGS" != "x"; then
-        dnl try -errwarn=%all,no%E_EMPTY_DECLARATION,
-        dnl no%E_STATEMENT_NOT_REACHED,no%E_ARGUEMENT_MISMATCH,
-        dnl no%E_MACRO_REDEFINED (Sun Forte case)
-        dnl For Forte we need disable "empty declaration" warning produced by un-needed semicolon
-        dnl "statement not reached" disabled because there is g_assert_not_reached () in some places
-        dnl "macro redefined" because of gst/gettext.h
-        dnl FIXME: is it really supposed to be 'ARGUEMENT' and not 'ARGUMENT'?
-        dnl FIXME: do any of these work with the c++ compiler? if not, why
-        dnl do we check at all?
-        for f in 'no%E_EMPTY_DECLARATION' \
-                 'no%E_STATEMENT_NOT_REACHED' \
-                 'no%E_ARGUEMENT_MISMATCH' \
-                 'no%E_MACRO_REDEFINED' \
-                 'no%E_LOOP_NOT_ENTERED_AT_TOP'
-        do
-          AS_CXX_COMPILER_FLAG([-errwarn=%all,$f], [ERROR_CXXFLAGS="$ERROR_CXXFLAGS,$f"])
-        done
-      fi
-    fi
-  fi
-
-  if test "x$2" != "x"
-  then
-    UNSUPPORTED=""
-    list="$2"
-    for each in $list
-    do
-      AS_CXX_COMPILER_FLAG($each,
-          WARNING_CXXFLAGS="$WARNING_CXXFLAGS $each",
-          UNSUPPORTED="$UNSUPPORTED $each")
-    done
-    if test "X$UNSUPPORTED" != X ; then
-      AC_MSG_NOTICE([unsupported compiler flags: $UNSUPPORTED])
-    fi
-  fi
-
-  AC_SUBST(WARNING_CXXFLAGS)
-  AC_SUBST(ERROR_CXXFLAGS)
-  AC_MSG_NOTICE([set WARNING_CXXFLAGS to $WARNING_CXXFLAGS])
-  AC_MSG_NOTICE([set ERROR_CXXFLAGS to $ERROR_CXXFLAGS])
-])
-
-dnl Sets WARNING_OBJCFLAGS and ERROR_OBJCFLAGS to something the compiler 
-dnl will accept and AC_SUBST them so they are available in Makefile
-dnl
-dnl WARNING_OBJCFLAGS will contain flags to make the compiler emit more
-dnl   warnings.
-dnl ERROR_OBJCFLAGS will contain flags to make those warnings fatal,
-dnl   unless ADD-WERROR is set to "no"
-dnl 
-dnl If MORE_FLAGS is set, tries to add each of the given flags
-dnl to WARNING_CFLAGS if the compiler supports them. Each flag is 
-dnl tested separately.
-dnl
-dnl These flags can be overridden at make time:
-dnl make ERROR_OBJCFLAGS=
-AC_DEFUN([AG_GST_SET_ERROR_OBJCFLAGS],
-[
-  AC_REQUIRE([AC_PROG_OBJC])
-  AC_REQUIRE([AS_OBJC_COMPILER_FLAG])
-
-  ERROR_OBJCFLAGS=""
-  WARNING_OBJCFLAGS=""
-
-  dnl if we support -Wall, set it unconditionally
-  AS_OBJC_COMPILER_FLAG(-Wall, WARNING_OBJCFLAGS="$WARNING_OBJCFLAGS -Wall")
-
-  dnl if asked for, add -Werror if supported
-  if test "x$1" != "xno"
-  then
-    AS_OBJC_COMPILER_FLAG(-Werror, ERROR_OBJCFLAGS="$ERROR_OBJCFLAGS -Werror")
-
-    if test "x$ERROR_OBJCFLAGS" != "x"
-    then
-       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_OBJC_COMPILER_FLAG([-fno-strict-aliasing],
-           ERROR_OBJCFLAGS="$ERROR_OBJCFLAGS -fno-strict-aliasing")
-         ])
-    else
-      dnl if -Werror isn't suported, try -errwarn=%all
-      AS_OBJC_COMPILER_FLAG([-errwarn=%all], ERROR_OBJCFLAGS="$ERROR_OBJCFLAGS -errwarn=%all")
-      if test "x$ERROR_OBJCFLAGS" != "x"; then
-        dnl try -errwarn=%all,no%E_EMPTY_DECLARATION,
-        dnl no%E_STATEMENT_NOT_REACHED,no%E_ARGUEMENT_MISMATCH,
-        dnl no%E_MACRO_REDEFINED (Sun Forte case)
-        dnl For Forte we need disable "empty declaration" warning produced by un-needed semicolon
-        dnl "statement not reached" disabled because there is g_assert_not_reached () in some places
-        dnl "macro redefined" because of gst/gettext.h
-        dnl FIXME: is it really supposed to be 'ARGUEMENT' and not 'ARGUMENT'?
-        dnl FIXME: do any of these work with the c++ compiler? if not, why
-        dnl do we check at all?
-        for f in 'no%E_EMPTY_DECLARATION' \
-                 'no%E_STATEMENT_NOT_REACHED' \
-                 'no%E_ARGUEMENT_MISMATCH' \
-                 'no%E_MACRO_REDEFINED' \
-                 'no%E_LOOP_NOT_ENTERED_AT_TOP'
-        do
-          AS_OBJC_COMPILER_FLAG([-errwarn=%all,$f], [ERROR_OBJCFLAGS="$ERROR_OBJCFLAGS,$f"])
-        done
-      fi
-    fi
-  fi
-
-  if test "x$2" != "x"
-  then
-    UNSUPPORTED=""
-    list="$2"
-    for each in $list
-    do
-      AS_OBJC_COMPILER_FLAG($each,
-          WARNING_OBJCFLAGS="$WARNING_OBJCFLAGS $each",
-          UNSUPPORTED="$UNSUPPORTED $each")
-    done
-    if test "X$UNSUPPORTED" != X ; then
-      AC_MSG_NOTICE([unsupported compiler flags: $UNSUPPORTED])
-    fi
-  fi
-
-  AC_SUBST(WARNING_OBJCFLAGS)
-  AC_SUBST(ERROR_OBJCFLAGS)
-  AC_MSG_NOTICE([set WARNING_OBJCFLAGS to $WARNING_OBJCFLAGS])
-  AC_MSG_NOTICE([set ERROR_OBJCFLAGS to $ERROR_OBJCFLAGS])
-])
-
-dnl Sets the default error level for debugging messages
-AC_DEFUN([AG_GST_SET_LEVEL_DEFAULT],
-[
-  dnl define correct errorlevel for debugging messages. We want to have
-  dnl GST_ERROR messages printed when running cvs builds
-  if test "x[$1]" = "xyes"; then
-    GST_LEVEL_DEFAULT=GST_LEVEL_ERROR
-  else
-    GST_LEVEL_DEFAULT=GST_LEVEL_NONE
-  fi
-  AC_DEFINE_UNQUOTED(GST_LEVEL_DEFAULT, $GST_LEVEL_DEFAULT,
-    [Default errorlevel to use])
-  dnl AC_SUBST so we can use it for win32/common/config.h
-  AC_SUBST(GST_LEVEL_DEFAULT)
-])
diff --git a/common/m4/gst-feature.m4 b/common/m4/gst-feature.m4
deleted file mode 100644 (file)
index 876215e..0000000
+++ /dev/null
@@ -1,297 +0,0 @@
-dnl Perform a check for a feature for GStreamer
-dnl Richard Boulton <richard-alsa@tartarus.org>
-dnl Thomas Vander Stichele <thomas@apestaart.org> added useful stuff
-dnl Last modification: 25/06/2001
-dnl
-dnl AG_GST_CHECK_FEATURE(FEATURE-NAME, FEATURE-DESCRIPTION,
-dnl                   DEPENDENT-PLUGINS, TEST-FOR-FEATURE,
-dnl                   DISABLE-BY-DEFAULT, ACTION-IF-USE, ACTION-IF-NOTUSE)
-dnl
-dnl This macro adds a command line argument to allow the user to enable
-dnl or disable a feature, and if the feature is enabled, performs a supplied
-dnl test to check if the feature is available.
-dnl
-dnl The test should define HAVE_<FEATURE-NAME> to "yes" or "no" depending
-dnl on whether the feature is available.
-dnl
-dnl The macro will set USE_<FEATURE-NAME> to "yes" or "no" depending on
-dnl whether the feature is to be used.
-dnl Thomas changed this, so that when USE_<FEATURE-NAME> was already set
-dnl to no, then it stays that way.
-dnl
-dnl The macro will call AM_CONDITIONAL(USE_<FEATURE-NAME>, ...) to allow
-dnl the feature to control what is built in Makefile.ams.  If you want
-dnl additional actions resulting from the test, you can add them with the
-dnl ACTION-IF-USE and ACTION-IF-NOTUSE parameters.
-dnl
-dnl FEATURE-NAME        is the name of the feature, and should be in
-dnl                     purely upper case characters.
-dnl FEATURE-DESCRIPTION is used to describe the feature in help text for
-dnl                     the command line argument.
-dnl DEPENDENT-PLUGINS   lists any plug-ins which depend on this feature.
-dnl TEST-FOR-FEATURE    is a test which sets HAVE_<FEATURE-NAME> to "yes"
-dnl                     or "no" depending on whether the feature is
-dnl                     available.
-dnl DISABLE-BY-DEFAULT  if "disabled", the feature is disabled by default,
-dnl                     if any other value, the feature is enabled by default.
-dnl ACTION-IF-USE       any extra actions to perform if the feature is to be
-dnl                     used.
-dnl ACTION-IF-NOTUSE    any extra actions to perform if the feature is not to
-dnl                     be used.
-dnl
-dnl
-dnl thomas :
-dnl we also added a history.
-dnl GST_PLUGINS_YES will contain all plugins to be built
-dnl                 that were checked through AG_GST_CHECK_FEATURE
-dnl GST_PLUGINS_NO will contain those that won't be built
-
-AC_DEFUN([AG_GST_CHECK_FEATURE],
-[echo
-AC_MSG_NOTICE(*** checking feature: [$2] ***)
-if test "x[$3]" != "x"
-then
-  AC_MSG_NOTICE(*** for plug-ins: [$3] ***)
-fi
-dnl
-builtin(define, [gst_endisable], ifelse($5, [disabled], [enable], [disable]))dnl
-dnl if it is set to NO, then don't even consider it for building
-NOUSE=
-if test "x$USE_[$1]" = "xno"; then
-  NOUSE="yes"
-fi
-AC_ARG_ENABLE(translit([$1], A-Z, a-z),
-  [  ]builtin(format, --%-26s gst_endisable %s, gst_endisable-translit([$1], A-Z, a-z), [$2]ifelse([$3],,,: [$3])),
-  [ case "${enableval}" in
-      yes) USE_[$1]=yes;;
-      no) USE_[$1]=no;;
-      *) AC_MSG_ERROR(bad value ${enableval} for --enable-translit([$1], A-Z, a-z)) ;;
-    esac],
-  [ USE_$1=]ifelse($5, [disabled], [no], [yes]))           dnl DEFAULT
-
-dnl *** set it back to no if it was preset to no
-if test "x$NOUSE" = "xyes"; then
-  USE_[$1]="no"
-  AC_MSG_WARN(*** $3 pre-configured not to be built)
-fi
-NOUSE=
-
-dnl *** Check if it is ported or not
-if echo " [$GST_PLUGINS_NONPORTED] " | tr , ' ' | grep -i " [$1] " > /dev/null; then
-  USE_[$1]="no"
-  AC_MSG_WARN(*** $3 not ported)
-fi
-
-dnl *** If it's enabled
-
-if test x$USE_[$1] = xyes; then
-  dnl save compile variables before the test
-
-  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
-
-  HAVE_[$1]=no
-  dnl TEST_FOR_FEATURE
-  $4
-
-  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
-
-  dnl If it isn't found, unset USE_[$1]
-  if test x$HAVE_[$1] = xno; then
-    USE_[$1]=no
-  else
-    ifelse([$3], , :, [AC_MSG_NOTICE(*** These plugins will be built: [$3])])
-  fi
-fi
-dnl *** Warn if it's disabled or not found
-if test x$USE_[$1] = xyes; then
-  ifelse([$6], , :, [$6])
-  if test "x$3" != "x"; then
-    GST_PLUGINS_YES="\t[$3]\n$GST_PLUGINS_YES"
-  fi
-  AC_DEFINE(HAVE_[$1], , [Define to enable $2]ifelse($3,,, [ (used by $3)]).)
-else
-  ifelse([$3], , :, [AC_MSG_NOTICE(*** These plugins will not be built: [$3])])
-  if test "x$3" != "x"; then
-    GST_PLUGINS_NO="\t[$3]\n$GST_PLUGINS_NO"
-  fi
-  ifelse([$7], , :, [$7])
-fi
-dnl *** Define the conditional as appropriate
-AM_CONDITIONAL(USE_[$1], test x$USE_[$1] = xyes)
-])
-
-dnl Use AC_CHECK_LIB and AC_CHECK_HEADER to do both tests at once
-dnl sets HAVE_module if we have it
-dnl Richard Boulton <richard-alsa@tartarus.org>
-dnl Last modification: 26/06/2001
-dnl AG_GST_CHECK_LIBHEADER(FEATURE-NAME, LIB NAME, LIB FUNCTION, EXTRA LD FLAGS,
-dnl                     HEADER NAME, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
-dnl
-dnl This check was written for GStreamer: it should be renamed and checked
-dnl for portability if you decide to use it elsewhere.
-dnl
-AC_DEFUN([AG_GST_CHECK_LIBHEADER],
-[
-  AC_CHECK_LIB([$2], [$3], HAVE_[$1]=yes, HAVE_[$1]=no,[$4])
-  if test "x$HAVE_[$1]" = "xyes"; then
-    AC_CHECK_HEADER([$5], :, HAVE_[$1]=no)
-    if test "x$HAVE_[$1]" = "xyes"; then
-      dnl execute what needs to be
-      ifelse([$6], , :, [$6])
-    else
-      ifelse([$7], , :, [$7])
-    fi
-  else
-    ifelse([$7], , :, [$7])
-  fi
-  AC_SUBST(HAVE_[$1])
-]
-)
-
-dnl 2004-02-14 Thomas - changed to get set properly and use proper output
-dnl 2003-06-27 Benjamin Otte - changed to make this work with gstconfig.h
-dnl
-dnl Add a subsystem --disable flag and all the necessary symbols and substitions
-dnl
-dnl AG_GST_CHECK_SUBSYSTEM_DISABLE(SYSNAME, [subsystem name])
-dnl
-AC_DEFUN([AG_GST_CHECK_SUBSYSTEM_DISABLE],
-[
-  dnl this define will replace each literal subsys_def occurrence with
-  dnl the lowercase hyphen-separated subsystem
-  dnl e.g. if $1 is GST_DEBUG then subsys_def will be a macro with gst-debug
-  define([subsys_def],translit([$1], _A-Z, -a-z))
-
-  AC_ARG_ENABLE(subsys_def,
-    AC_HELP_STRING(--disable-subsys_def, [disable $2]),
-    [
-      case "${enableval}" in
-        yes) GST_DISABLE_[$1]=no ;;
-        no) GST_DISABLE_[$1]=yes ;;
-        *) AC_MSG_ERROR([bad value ${enableval} for --enable-subsys_def]) ;;
-       esac
-    ],
-    [GST_DISABLE_[$1]=no]) dnl Default value
-
-  if test x$GST_DISABLE_[$1] = xyes; then
-    AC_MSG_NOTICE([disabled subsystem [$2]])
-    GST_DISABLE_[$1]_DEFINE="#define GST_DISABLE_$1 1"
-  else
-    GST_DISABLE_[$1]_DEFINE="/* #undef GST_DISABLE_$1 */"
-  fi
-  AC_SUBST(GST_DISABLE_[$1]_DEFINE)
-  undefine([subsys_def])
-])
-
-
-dnl Parse gstconfig.h for feature and defines add the symbols and substitions
-dnl
-dnl AG_GST_PARSE_SUBSYSTEM_DISABLE(GST_CONFIGPATH, FEATURE)
-dnl
-AC_DEFUN([AG_GST_PARSE_SUBSYSTEM_DISABLE],
-[
-  grep >/dev/null "#undef GST_DISABLE_$2" $1
-  if test $? = 0; then
-    GST_DISABLE_[$2]=0
-  else
-    GST_DISABLE_[$2]=1
-  fi
-  AC_SUBST(GST_DISABLE_[$2])
-])
-
-dnl Parse gstconfig.h and defines add the symbols and substitions
-dnl
-dnl GST_CONFIGPATH=`$PKG_CONFIG --variable=includedir gstreamer-1.0`"/gst/gstconfig.h"
-dnl AG_GST_PARSE_SUBSYSTEM_DISABLES(GST_CONFIGPATH)
-dnl
-AC_DEFUN([AG_GST_PARSE_SUBSYSTEM_DISABLES],
-[
-  AG_GST_PARSE_SUBSYSTEM_DISABLE($1,GST_DEBUG)
-  AG_GST_PARSE_SUBSYSTEM_DISABLE($1,LOADSAVE)
-  AG_GST_PARSE_SUBSYSTEM_DISABLE($1,PARSE)
-  AG_GST_PARSE_SUBSYSTEM_DISABLE($1,TRACE)
-  AG_GST_PARSE_SUBSYSTEM_DISABLE($1,ALLOC_TRACE)
-  AG_GST_PARSE_SUBSYSTEM_DISABLE($1,REGISTRY)
-  AG_GST_PARSE_SUBSYSTEM_DISABLE($1,PLUGIN)
-  AG_GST_PARSE_SUBSYSTEM_DISABLE($1,XML)
-])
-
-dnl AG_GST_CHECK_GST_DEBUG_DISABLED(ACTION-IF-DISABLED, ACTION-IF-NOT-DISABLED)
-dnl
-dnl Checks if the GStreamer debugging system is disabled in the core version
-dnl we are compiling against (by checking gstconfig.h)
-dnl
-AC_DEFUN([AG_GST_CHECK_GST_DEBUG_DISABLED],
-[
-  AC_REQUIRE([AG_GST_CHECK_GST])
-
-  AC_MSG_CHECKING([whether the GStreamer debugging system is enabled])
-  AC_LANG_PUSH([C])
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$GST_CFLAGS $CFLAGS"
-  AC_COMPILE_IFELSE([
-    AC_LANG_SOURCE([[
-      #include <gst/gstconfig.h>
-      #ifdef GST_DISABLE_GST_DEBUG
-      #error "debugging disabled, make compiler fail"
-      #endif]])], [ debug_system_enabled=yes], [debug_system_enabled=no])
-  CFLAGS="$save_CFLAGS"
-  AC_LANG_POP([C])
-
-  AC_MSG_RESULT([$debug_system_enabled])
-
-  if test "x$debug_system_enabled" = "xyes" ; then
-    $2
-    true
-  else
-    $1
-    true
-  fi
-])
-
-dnl relies on GST_PLUGINS_ALL, GST_PLUGINS_SELECTED, GST_PLUGINS_YES,
-dnl GST_PLUGINS_NO, and BUILD_EXTERNAL
-AC_DEFUN([AG_GST_OUTPUT_PLUGINS], [
-
-printf "configure: *** Plug-ins without external dependencies that will be built:\n"
-( for i in $GST_PLUGINS_SELECTED; do printf '\t'$i'\n'; done ) | sort
-printf "\n"
-
-printf "configure: *** Plug-ins without external dependencies that will NOT be built:\n"
-( for i in $GST_PLUGINS_ALL; do
-    case " $GST_PLUGINS_SELECTED " in
-      *\ $i\ *)
-       ;;
-      *)
-       printf '\t'$i'\n'
-       ;;
-    esac
-  done ) | sort
-printf "\n"
-
-printf "configure: *** Plug-ins that have NOT been ported:\n"
-( for i in $GST_PLUGINS_NONPORTED; do
-       printf '\t'$i'\n'
-  done ) | sort
-printf "\n"
-
-if test "x$BUILD_EXTERNAL" = "xno"; then
-  printf "configure: *** No plug-ins with external dependencies will be built\n"
-else
-  printf "configure: *** Plug-ins with dependencies that will be built:"
-  printf "$GST_PLUGINS_YES\n" | sort
-  printf "\n"
-  printf "configure: *** Plug-ins with dependencies that will NOT be built:"
-  printf "$GST_PLUGINS_NO\n" | sort
-  printf "\n"
-fi
-])
-
diff --git a/common/m4/gst-function.m4 b/common/m4/gst-function.m4
deleted file mode 100644 (file)
index 61adfd3..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-dnl
-dnl Check for compiler mechanism to show functions in debugging
-dnl copied from an Ali patch floating on the internet
-dnl
-AC_DEFUN([AG_GST_CHECK_FUNCTION],[
-  dnl #1: __PRETTY_FUNCTION__
-  AC_MSG_CHECKING(whether $CC implements __PRETTY_FUNCTION__)
-  AC_CACHE_VAL(gst_cv_have_pretty_function,[
-    AC_TRY_LINK([#include <stdio.h>],
-                [printf("%s", __PRETTY_FUNCTION__);],
-                gst_cv_have_pretty_function=yes,
-                gst_cv_have_pretty_function=no)
-  ])
-  AC_MSG_RESULT($gst_cv_have_pretty_function)
-  if test "$gst_cv_have_pretty_function" = yes; then
-    AC_DEFINE(HAVE_PRETTY_FUNCTION, 1,
-              [defined if the compiler implements __PRETTY_FUNCTION__])
-  fi
-
-dnl #2: __FUNCTION__
-  AC_MSG_CHECKING(whether $CC implements __FUNCTION__)
-  AC_CACHE_VAL(gst_cv_have_function,[
-    AC_TRY_LINK([#include <stdio.h>],
-                [printf("%s", __FUNCTION__);],
-                gst_cv_have_function=yes,
-                gst_cv_have_function=no)
-  ])
-  AC_MSG_RESULT($gst_cv_have_function)
-  if test "$gst_cv_have_function" = yes; then
-    AC_DEFINE(HAVE_FUNCTION, 1,
-              [defined if the compiler implements __FUNCTION__])
-  fi
-
-dnl #3: __func__
-  AC_MSG_CHECKING(whether $CC implements __func__)
-  AC_CACHE_VAL(gst_cv_have_func,[
-    AC_TRY_LINK([#include <stdio.h>],
-                [printf("%s", __func__);],
-                gst_cv_have_func=yes,
-                gst_cv_have_func=no)
-  ])
-  AC_MSG_RESULT($gst_cv_have_func)
-  if test "$gst_cv_have_func" = yes; then
-    AC_DEFINE(HAVE_FUNC, 1,
-              [defined if the compiler implements __func__])
-  fi
-
-dnl now define FUNCTION to whatever works, and fallback to ""
-  if test "$gst_cv_have_pretty_function" = yes; then
-    function=__PRETTY_FUNCTION__
-  else
-    if test "$gst_cv_have_function" = yes; then
-      function=__FUNCTION__
-    else
-      if test "$gst_cv_have_func" = yes; then
-        function=__func__
-      else
-        function=\"\"
-      fi
-    fi
-  fi
-  AC_DEFINE_UNQUOTED(GST_FUNCTION, $function, [macro to use to show function name])
-])
diff --git a/common/m4/gst-gettext.m4 b/common/m4/gst-gettext.m4
deleted file mode 100644 (file)
index df817eb..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-dnl gettext setup
-
-dnl AG_GST_GETTEXT([gettext-package])
-dnl defines GETTEXT_PACKAGE and LOCALEDIR
-
-AC_DEFUN([AG_GST_GETTEXT],
-[
-  if test "$USE_NLS" = "yes"; then
-    GETTEXT_PACKAGE=[$1]
-  else
-    GETTEXT_PACKAGE=[NULL]
-  fi
-  AC_SUBST(GETTEXT_PACKAGE)
-  AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE",
-                     [gettext package name])
-
-  dnl make sure po/Makevars is kept in sync with GETTEXT_PACKAGE
-  if test -e "${srcdir}/po/Makevars"; then
-    if ! grep -e "$1" "${srcdir}/po/Makevars"; then
-      AC_MSG_ERROR([DOMAIN in po/Makevars does not match GETTEXT_PACKAGE $1])
-    fi
-  fi
-
-  dnl define LOCALEDIR in config.h
-  AS_AC_EXPAND(LOCALEDIR, $datadir/locale)
-  AC_DEFINE_UNQUOTED([LOCALEDIR], "$LOCALEDIR",
-                     [gettext locale dir])
-])
diff --git a/common/m4/gst-glib2.m4 b/common/m4/gst-glib2.m4
deleted file mode 100644 (file)
index 63f0f46..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-dnl check for a minimum version of GLib
-
-dnl AG_GST_GLIB_CHECK([minimum-version-required])
-
-AC_DEFUN([AG_GST_GLIB_CHECK],
-[
-  AC_REQUIRE([AS_NANO])
-
-  dnl Minimum required version of GLib
-  GLIB_REQ=[$1]
-  if test "x$GLIB_REQ" = "x"
-  then
-    AC_MSG_ERROR([Please specify a required version for GLib 2.0])
-  fi
-  AC_SUBST(GLIB_REQ)
-
-  dnl Check for glib with everything
-  AG_GST_PKG_CHECK_MODULES(GLIB,
-    glib-2.0 >= $GLIB_REQ gobject-2.0 gmodule-no-export-2.0)
-
-  if test "x$HAVE_GLIB" = "xno"; then
-    AC_MSG_ERROR([This package requires GLib >= $GLIB_REQ to compile.])
-  fi
-
-  dnl Add define to tell GLib that threading is always enabled within GStreamer
-  dnl code (optimisation, bypasses checks if the threading system is enabled
-  dnl when using threading primitives)
-  GLIB_EXTRA_CFLAGS="$GLIB_EXTRA_CFLAGS -DG_THREADS_MANDATORY"
-
-  dnl Define G_DISABLE_DEPRECATED for development versions
-  if test "x`expr $PACKAGE_VERSION_MINOR % 2`" = "x1" -a "x`expr $PACKAGE_VERSION_MICRO '<' 90`" = "x1"; then
-    GLIB_EXTRA_CFLAGS="$GLIB_EXTRA_CFLAGS -DG_DISABLE_DEPRECATED"
-  fi
-
-  AC_ARG_ENABLE(gobject-cast-checks,
-    AS_HELP_STRING([--enable-gobject-cast-checks[=@<:@no/auto/yes@:>@]],
-      [Enable GObject cast checks]),[enable_gobject_cast_checks=$enableval],
-    [enable_gobject_cast_checks=auto])
-
-  if test "x$enable_gobject_cast_checks" = "xauto"; then
-    dnl Turn on cast checks only for development versions
-    if test "x`expr $PACKAGE_VERSION_MINOR % 2`" = "x1" -a "x`expr $PACKAGE_VERSION_MICRO '<' 90`" = "x1"; then
-      enable_gobject_cast_checks=yes
-    else
-      enable_gobject_cast_checks=no
-    fi
-  fi
-
-  if test "x$enable_gobject_cast_checks" = "xno"; then
-    GLIB_EXTRA_CFLAGS="$GLIB_EXTRA_CFLAGS -DG_DISABLE_CAST_CHECKS"
-  fi
-
-  AC_ARG_ENABLE(glib-asserts,
-    AS_HELP_STRING([--enable-glib-asserts[=@<:@no/auto/yes@:>@]],
-      [Enable GLib assertion]),[enable_glib_assertions=$enableval],
-    [enable_glib_assertions=auto])
-
-  if test "x$enable_glib_assertions" = "xauto"; then
-    dnl Enable assertions only for development versions
-    if test "x`expr $PACKAGE_VERSION_MINOR % 2`" = "x1" -a "x`expr $PACKAGE_VERSION_MICRO '<' 90`" = "x1"; then
-      enable_glib_assertions=yes
-    else
-      enable_glib_assertions=no
-    fi
-  fi
-
-  if test "x$enable_glib_assertions" = "xno"; then
-    GLIB_EXTRA_CFLAGS="$GLIB_EXTRA_CFLAGS -DG_DISABLE_ASSERT"
-  fi
-
-  dnl Find location of glib utils. People may want to or have to override these,
-  dnl e.g. in a cross-compile situation where PATH is a bit messed up. We need
-  dnl for these tools to work on the host, so can't just use the one from the
-  dnl GLib installation that pkg-config picks up, as that might be for a
-  dnl different target architecture.
-  dnl
-  dnl glib-genmarshal:
-  AC_MSG_CHECKING(for glib-genmarshal)
-  if test "x$GLIB_GENMARSHAL" != "x"; then
-    AC_MSG_RESULT([$GLIB_GENMARSHAL (from environment)])
-  else
-    GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
-    if $GLIB_GENMARSHAL --version 2>/dev/null >/dev/null; then
-      AC_MSG_RESULT([$GLIB_GENMARSHAL (from pkg-config path)])
-    else
-      AC_PATH_PROG(GLIB_GENMARSHAL, [glib-genmarshal], [glib-genmarshal])
-      AC_MSG_RESULT([$GLIB_GENMARSHAL])
-    fi
-  fi
-  if ! $GLIB_GENMARSHAL --version 2>/dev/null >/dev/null; then
-    AC_MSG_WARN([$GLIB_GENMARSHAL does not seem to work!])
-  fi
-  AC_SUBST(GLIB_GENMARSHAL)
-
-  dnl glib-mkenums:
-  AC_MSG_CHECKING(for glib-mkenums)
-  if test "x$GLIB_MKENUMS" != "x"; then
-    AC_MSG_RESULT([$GLIB_MKENUMS (from environment)])
-  else
-    dnl glib-mkenums is written in perl so should always work really
-    GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
-    AC_MSG_RESULT([$GLIB_MKENUMS])
-  fi
-  if ! $GLIB_MKENUMS --version 2>/dev/null >/dev/null; then
-    AC_MSG_WARN([$GLIB_MKENUMS does not seem to work!])
-  fi
-  AC_SUBST(GLIB_MKENUMS)
-
-  AC_SUBST(GLIB_EXTRA_CFLAGS)
-
-  dnl Now check for GIO
-  PKG_CHECK_MODULES(GIO, gio-2.0 >= $GLIB_REQ)
-  if test "x$HAVE_GIO" = "xno"; then
-    AC_MSG_ERROR([This package requires GIO >= $GLIB_REQ to compile.])
-  fi
-  
-  GIO_MODULE_DIR="`$PKG_CONFIG --variable=giomoduledir gio-2.0`"
-  AC_DEFINE_UNQUOTED(GIO_MODULE_DIR, "$GIO_MODULE_DIR",
-      [The GIO modules directory.])
-  GIO_LIBDIR="`$PKG_CONFIG --variable=libdir gio-2.0`"
-  AC_DEFINE_UNQUOTED(GIO_LIBDIR, "$GIO_LIBDIR",
-      [The GIO library directory.])
-  AC_SUBST(GIO_CFLAGS)
-  AC_SUBST(GIO_LIBS)
-  AC_SUBST(GIO_LDFLAGS)
-])
diff --git a/common/m4/gst-libxml2.m4 b/common/m4/gst-libxml2.m4
deleted file mode 100644 (file)
index 4a843f0..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-dnl call this macro with the minimum required version as an argument
-dnl this macro sets and AC_SUBSTs XML_CFLAGS and XML_LIBS
-dnl it also sets LIBXML_PKG, used for the pkg-config file
-
-AC_DEFUN([AG_GST_LIBXML2_CHECK],
-[
-  dnl Minimum required version of libxml2
-  dnl default to 2.4.9 if not specified
-  LIBXML2_REQ=ifelse([$1],,2.4.9,[$1])
-  AC_SUBST(LIBXML2_REQ)
-
-  dnl check for libxml2
-  PKG_CHECK_MODULES(XML, libxml-2.0 >= $LIBXML2_REQ,
-                    HAVE_LIBXML2=yes, [
-                      AC_MSG_RESULT(no)
-                      HAVE_LIBXML2=no
-                    ])
-  if test "x$HAVE_LIBXML2" = "xyes"; then
-    AC_DEFINE(HAVE_LIBXML2, 1, [Define if libxml2 is available])
-  else
-    AC_MSG_ERROR([
-        Need libxml2 and development headers/files to build GStreamer.
-
-        You can do without libxml2 if you pass --disable-loadsave to
-        configure, but that breaks ABI, so don't do that unless you
-        are building for an embedded setup and know what you are doing.
-    ])
-  fi
-  dnl this is for the .pc file
-  LIBXML_PKG=', libxml-2.0'
-  AC_SUBST(LIBXML_PKG)
-  AC_SUBST(XML_LIBS)
-  AC_SUBST(XML_CFLAGS)
-
-  dnl XML_LIBS might pull in -lz without zlib actually being on the system, so
-  dnl try linking with these LIBS and CFLAGS
-  ac_save_CFLAGS=$CFLAGS
-  ac_save_LIBS=$LIBS
-  CFLAGS="$CFLAGS $XML_CFLAGS"
-  LIBS="$LIBS $XML_LIBS"
-  AC_TRY_LINK([
-#include <libxml/tree.h>
-#include <stdio.h>
-],[
-/* function body */
-],
-    AC_MSG_NOTICE([Test xml2 program linked]),
-    AC_MSG_ERROR([Could not link libxml2 test program.  Check if you have the necessary dependencies.])
-  )
-  CFLAGS="$ac_save_CFLAGS"
-  LIBS="$ac_save_LIBS"
-])
diff --git a/common/m4/gst-package-release-datetime.m4 b/common/m4/gst-package-release-datetime.m4
deleted file mode 100644 (file)
index bc885e3..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-dnl macros to set GST_PACKAGE_RELEASE_DATETIME
-
-dnl ===========================================================================
-dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME
-dnl
-dnl Usage:
-dnl
-dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME()
-dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([no]...)
-dnl sets the release datetime to the current date
-dnl (no = this is not a release, but git or prerelease)
-dnl
-dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([YYYY-MM-DD])
-dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([yes], [YYYY-MM-DD])
-dnl sets the release datetime to the specified date (and time, if given)
-dnl (yes = this is a release, not git or prerelease)
-dnl
-dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([yes], [DOAP-FILE], [RELEASE-VERSION])
-dnl sets the release date to the release date associated with version
-dnl RELEASE-VERSION in the .doap file DOAP-FILE
-dnl (yes = this is a release, not git or prerelease)
-dnl
-dnl We need to treat pre-releases like git because there won't be an entry
-dnl in the .doap file for pre-releases yet, and we don't want to use the
-dnl date of the last release either.
-dnl ===========================================================================
-AC_DEFUN([AG_GST_SET_PACKAGE_RELEASE_DATETIME],
-[
-  dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME()
-  dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([yes]...)
-  if test "x$1" = "xno" -o "x$1" = "x"; then
-    GST_PACKAGE_RELEASE_DATETIME=`date -u "+%Y-%m-%dT%H:%MZ"`
-  elif test "x$1" = "xyes"; then
-    dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([no], ["YYYY-MM-DD"])
-    dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([no], [DOAP-FILE], [RELEASE-VERSION])
-    if ( echo $1 | grep '^20[1-9][0-9]-[0-1][0-9]-[0-3][0-9]' >/dev/null ) ; then
-      GST_PACKAGE_RELEASE_DATETIME=$1
-    else
-      dnl we assume the .doap file contains the date as YYYY-MM-DD
-      YYYY_MM_DD=`sh "${srcdir}/common/extract-release-date-from-doap-file" $3 $2`;
-      if test "x$YYYY_MM_DD" != "x"; then
-        GST_PACKAGE_RELEASE_DATETIME=$YYYY_MM_DD
-      else
-        AC_MSG_ERROR([SET_PACKAGE_RELEASE_DATETIME: could not extract
-            release date for release version $3 from $2])
-        GST_PACKAGE_RELEASE_DATETIME=""
-      fi
-    fi
-  dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([YYYY-MM-DD])
-  elif ( echo $1 | grep '^20[1-9][0-9]-[0-1][0-9]-[0-3][0-9]' >/dev/null ) ; then
-    GST_PACKAGE_RELEASE_DATETIME=$1
-  else
-    AC_MSG_WARN([SET_PACKAGE_RELEASE_DATETIME: invalid first argument])
-    GST_PACKAGE_RELEASE_DATETIME=""
-  fi
-
-  if test "x$GST_PACKAGE_RELEASE_DATETIME" = "x"; then
-    AC_MSG_WARN([Invalid package release date time: $GST_PACKAGE_RELEASE_DATETIME])
-  else
-    AC_MSG_NOTICE([Setting GST_PACKAGE_RELEASE_DATETIME to $GST_PACKAGE_RELEASE_DATETIME])
-
-    AC_DEFINE_UNQUOTED([GST_PACKAGE_RELEASE_DATETIME],
-        ["$GST_PACKAGE_RELEASE_DATETIME"],
-        [GStreamer package release date/time for plugins as YYYY-MM-DD])
-  fi
-])
-
-dnl ===========================================================================
-dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME_WITH_NANO
-dnl
-dnl Usage:
-dnl
-dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([NANO-VERSION], [DOAP-FILE], [RELEASE-VERSION])
-dnl if NANO-VERSION is 0, sets the release date to the release date associated
-dnl with version RELEASE-VERSION in the .doap file DOAP-FILE, otherwise sets
-dnl the release date and time to the current date/time.
-dnl
-dnl We need to treat pre-releases like git because there won't be an entry
-dnl in the .doap file for pre-releases yet, and we don't want to use the
-dnl date of the last release either.
-dnl ===========================================================================
-AC_DEFUN([AG_GST_SET_PACKAGE_RELEASE_DATETIME_WITH_NANO],
-[
-  if test "x$1" = "x0"; then
-    AG_GST_SET_PACKAGE_RELEASE_DATETIME([yes], [ $2 ], [ $3 ])
-  else
-    AG_GST_SET_PACKAGE_RELEASE_DATETIME([no])
-  fi
-])
diff --git a/common/m4/gst-parser.m4 b/common/m4/gst-parser.m4
deleted file mode 100644 (file)
index b002047..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-AC_DEFUN([AG_GST_BISON_CHECK],
-[
-  dnl FIXME: check if AC_PROG_YACC is suitable here
-  dnl FIXME: make precious
-  AC_PATH_PROG(BISON_PATH, bison, no)
-  if test x$BISON_PATH = xno; then
-    AC_MSG_ERROR(Could not find bison)
-  fi
-
-  dnl check bison version
-  dnl we need version >= 2.4 for the '<>' support
-  dnl in the parser.
-  dnl First lines observed: 'bison (GNU Bison) 2.3' or 'GNU Bison version 1.28'
-  bison_min_version=2.4
-  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
-    AC_MSG_RESULT([yes])
-  else
-    AC_MSG_ERROR([no])
-  fi
-])
-
-AC_DEFUN([AG_GST_FLEX_CHECK],
-[
-  dnl we require flex for building the parser
-  AC_PATH_PROG(FLEX_PATH, flex, no)
-  if test x$FLEX_PATH = xno; then
-    AC_MSG_ERROR(Could not find flex)
-  fi
-
-  dnl check flex version
-  dnl we need version >= 2.5.31 for the reentrancy support
-  dnl in the parser.
-  flex_min_version=2.5.31
-  flex_version=`$FLEX_PATH --version | head -n 1 | awk '{print $2}'`
-  AC_MSG_CHECKING([flex version $flex_version >= $flex_min_version])
-  if perl -w <<EOF
-    (\$min_version_major, \$min_version_minor, \$min_version_micro ) = "$flex_min_version" =~ /(\d+)\.(\d+)\.(\d+)/;
-    (\$flex_version_major, \$flex_version_minor, \$flex_version_micro ) = "$flex_version" =~ /(\d+)\.(\d+)\.(\d+)/;
-    exit (((\$flex_version_major > \$min_version_major) ||
-     ((\$flex_version_major == \$min_version_major) &&
-      (\$flex_version_minor > \$min_version_minor)) ||
-     ((\$flex_version_major == \$min_version_major) &&
-      (\$flex_version_minor == \$min_version_minor) &&
-      (\$flex_version_micro >= \$min_version_micro)))
-     ? 0 : 1);
-EOF
-  then
-    AC_MSG_RESULT(yes)
-  else
-    AC_MSG_ERROR([no])
-  fi
-])
diff --git a/common/m4/gst-platform.m4 b/common/m4/gst-platform.m4
deleted file mode 100644 (file)
index 40d6faf..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-dnl AG_GST_PLATFORM
-dnl Check for platform specific features and define some variables
-dnl
-dnl GST_EXTRA_MODULE_SUFFIX: contains a platform specific
-dnl   extra module suffix additional to G_MODULE_SUFFIX
-dnl
-dnl HAVE_OSX: Defined if compiling for OS X
-dnl
-dnl GST_HAVE_UNSAFE_FORK: Defined if fork is unsafe (Windows)
-dnl
-dnl HAVE_WIN32: Defined if compiling on Win32
-dnl
-
-AC_DEFUN([AG_GST_PLATFORM],
-[
-  AC_REQUIRE([AC_CANONICAL_HOST])
-
-  case $host_os in
-    rhapsody*)
-      AC_DEFINE_UNQUOTED(GST_EXTRA_MODULE_SUFFIX, [".dylib"], [Extra platform specific plugin suffix])
-      ;;
-    darwin*)
-      AC_DEFINE_UNQUOTED(GST_EXTRA_MODULE_SUFFIX, [".dylib"], [Extra platform specific plugin suffix])
-      AC_DEFINE_UNQUOTED(HAVE_OSX, 1, [Defined if compiling for OSX])
-      ;;
-    cygwin*)
-      AC_DEFINE_UNQUOTED(GST_HAVE_UNSAFE_FORK, 1, [Defined when registry scanning through fork is unsafe])
-      ;;
-    mingw* | msvc* | mks*)
-      dnl HAVE_WIN32 currently means "disable POSIXisms".
-      AC_DEFINE_UNQUOTED(HAVE_WIN32, 1, [Defined if compiling for Windows])
-
-      dnl define __MSVCRT_VERSION__ version if not set already by the
-      dnl compiler (ie. mostly for mingw). This is needed for things like
-      dnl __stat64 to be available. If set by the compiler, ensure it's
-      dnl new enough - we need at least WinXP SP2.
-      AC_TRY_COMPILE([ ], [ return __MSVCRT_VERSION__; ], [
-          AC_TRY_COMPILE([ ], [
-            #if __MSVCRT_VERSION__ < 0x0601
-            #error "MSVCRT too old"
-            #endif
-          ], [
-            AC_MSG_NOTICE([MSVCRT version looks ok])
-          ], [
-            AC_MSG_ERROR([MSVCRT version too old, need at least WinXP SP2])
-          ])
-      ], [
-        AC_MSG_NOTICE([Setting MSVCRT version to 0x0601])
-        AC_DEFINE_UNQUOTED(__MSVCRT_VERSION__, 0x0601, [We need at least WinXP SP2 for __stat64])
-      ])
-      ;;
-     *)
-      ;;
-  esac
-])
-
-AC_DEFUN([AG_GST_LIBTOOL_PREPARE],
-[
-  dnl Persuade libtool to also link (-l) a 'pure' (DirectX) static lib,
-  dnl i.e. as opposed to only import lib with dll counterpart.
-  dnl Needs to be tweaked before libtool's checks.
-  case $host_os in
-  cygwin* | mingw*)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  esac
-])
\ No newline at end of file
diff --git a/common/m4/gst-plugin-docs.m4 b/common/m4/gst-plugin-docs.m4
deleted file mode 100644 (file)
index 0e2ab6e..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-dnl AG_GST_PLUGIN_DOCS([MINIMUM-GTK-DOC-VERSION])
-dnl
-dnl checks for prerequisites for the common/mangle-tmpl.py script
-dnl used when building the plugin documentation
-
-AC_DEFUN([AG_GST_PLUGIN_DOCS],
-[
-  AC_BEFORE([GTK_DOC_CHECK],[$0])dnl check for gtk-doc first
-  AC_REQUIRE([AM_PATH_PYTHON])dnl find python first
-
-  build_plugin_docs=no
-  AC_MSG_CHECKING([whether to build plugin documentation])
-  if test x$enable_gtk_doc = xyes; then
-    if test x$PYTHON != x; then
-      build_plugin_docs=yes
-      AC_MSG_RESULT([yes])
-    else
-      AC_MSG_RESULT([no (python not found)])
-    fi
-  else
-    AC_MSG_RESULT([no (gtk-doc disabled or not available)])
-  fi
-
-  AM_CONDITIONAL(ENABLE_PLUGIN_DOCS, test x$build_plugin_docs = xyes)
-])
diff --git a/common/m4/gst-plugindir.m4 b/common/m4/gst-plugindir.m4
deleted file mode 100644 (file)
index c9e1301..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-dnl AG_GST_SET_PLUGINDIR
-
-dnl AC_DEFINE PLUGINDIR to the full location where plug-ins will be installed
-dnl AC_SUBST plugindir, to be used in Makefile.am's
-
-AC_DEFUN([AG_GST_SET_PLUGINDIR],
-[
-  dnl define location of plugin directory
-  AS_AC_EXPAND(PLUGINDIR, ${libdir}/gstreamer-$GST_API_VERSION)
-  AC_DEFINE_UNQUOTED(PLUGINDIR, "$PLUGINDIR",
-    [directory where plugins are located])
-  AC_MSG_NOTICE([Using $PLUGINDIR as the plugin install location])
-
-  dnl plugin directory configure-time variable for use in Makefile.am
-  plugindir="\$(libdir)/gstreamer-$GST_API_VERSION"
-  AC_SUBST(plugindir)
-])
diff --git a/common/m4/gst-valgrind.m4 b/common/m4/gst-valgrind.m4
deleted file mode 100644 (file)
index 5c0d608..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-AC_DEFUN([AG_GST_VALGRIND_CHECK],
-[
-  dnl valgrind inclusion
-  AC_ARG_ENABLE(valgrind,
-    AC_HELP_STRING([--disable-valgrind], [disable run-time valgrind detection]),
-    [
-      case "${enableval}" in
-        yes) USE_VALGRIND="$USE_DEBUG" ;;
-        no)  USE_VALGRIND=no ;;
-        *) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind) ;;
-      esac],
-    [
-      USE_VALGRIND="$USE_DEBUG"
-    ]) dnl Default value
-
-  VALGRIND_REQ="3.0"
-  if test "x$USE_VALGRIND" = xyes; then
-    PKG_CHECK_MODULES(VALGRIND, valgrind >= $VALGRIND_REQ,
-      USE_VALGRIND="yes",
-      [
-        USE_VALGRIND="no"
-        AC_MSG_RESULT([no])
-      ])
-  fi
-
-  if test "x$USE_VALGRIND" = xyes; then
-    AC_DEFINE(HAVE_VALGRIND, 1, [Define if valgrind should be used])
-    AC_MSG_NOTICE(Using extra code paths for valgrind)
-  fi
-  AC_SUBST(VALGRIND_CFLAGS)
-  AC_SUBST(VALGRIND_LIBS)
-
-  AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
-  AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
-])
diff --git a/common/m4/gst-x11.m4 b/common/m4/gst-x11.m4
deleted file mode 100644 (file)
index 1723ca5..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-dnl macros for X-related detections
-dnl AC_SUBST's HAVE_X, X_CFLAGS, X_LIBS
-AC_DEFUN([AG_GST_CHECK_X],
-[
-  AC_PATH_XTRA
-  ac_cflags_save="$CFLAGS"
-  ac_cppflags_save="$CPPFLAGS"
-  CFLAGS="$CFLAGS $X_CFLAGS"
-  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
-
-  dnl now try to find the HEADER
-  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])
-  ])
-
-  if test "x$HAVE_X" = "xno"
-  then
-    AC_MSG_NOTICE([cannot find X11 development files])
-  else
-    dnl this is much more than we want
-    X_LIBS="$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS"
-    dnl AC_PATH_XTRA only defines the path needed to find the X libs,
-    dnl it does not add the libs; therefore we add them here
-    X_LIBS="$X_LIBS -lX11"
-    AC_SUBST(X_CFLAGS)
-    AC_SUBST(X_LIBS)
-  fi
-  AC_SUBST(HAVE_X)
-
-  CFLAGS="$ac_cflags_save"
-  CPPFLAGS="$ac_cppflags_save"
-])
-
-dnl *** XVideo ***
-dnl Look for the PIC library first, Debian requires it.
-dnl Check debian-devel archives for gory details.
-dnl 20020110:
-dnl At the moment XFree86 doesn't distribute shared libXv due
-dnl to unstable API.  On many platforms you CAN NOT link a shared
-dnl lib to a static non-PIC lib.  This is what the xvideo GStreamer
-dnl plug-in wants to do.  So Debian distributes a PIC compiled
-dnl version of the static lib for plug-ins to link to when it is
-dnl inappropriate to link the main application to libXv directly.
-dnl FIXME: add check if this platform can support linking to a
-dnl        non-PIC libXv, if not then don not use Xv.
-dnl FIXME: perhaps warn user if they have a shared libXv since
-dnl        this is an error until XFree86 starts shipping one
-AC_DEFUN([AG_GST_CHECK_XV],
-[
-  if test x$HAVE_X = xyes; then
-    AC_CHECK_LIB(Xv_pic, XvQueryExtension,
-                 HAVE_XVIDEO="yes", HAVE_XVIDEO="no",
-                 $X_LIBS -lXext)
-
-    if test x$HAVE_XVIDEO = xyes; then
-      XVIDEO_LIBS="-lXv_pic -lXext"
-      AC_SUBST(XVIDEO_LIBS)
-    else
-      dnl try again using something else if we didn't find it first
-      if test x$HAVE_XVIDEO = xno; then
-        AC_CHECK_LIB(Xv, XvQueryExtension,
-                   HAVE_XVIDEO="yes", HAVE_XVIDEO="no",
-                   $X_LIBS -lXext)
-
-        if test x$HAVE_XVIDEO = xyes; then
-          XVIDEO_LIBS="-lXv -lXext"
-          AC_SUBST(XVIDEO_LIBS)
-        fi
-      fi
-    fi
-  fi
-])
diff --git a/common/m4/gst.m4 b/common/m4/gst.m4
deleted file mode 100644 (file)
index d4c53cb..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-dnl AG_GST_INIT
-dnl sets up use of GStreamer configure.ac macros
-dnl all GStreamer autoconf macros are prefixed
-dnl with AG_GST_ for public macros
-dnl with _AG_GST_ for private macros
-dnl
-dnl We call AC_CANONICAL_TARGET and AC_CANONICAL_HOST so that
-dnl it is valid before AC_ARG_PROGRAM is called
-
-AC_DEFUN([AG_GST_INIT],
-[
-  m4_pattern_forbid(^_?AG_GST_)
-  AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use host_ variables
-  AC_REQUIRE([AC_CANONICAL_TARGET]) dnl we use target_ variables
-])
-
-dnl AG_GST_PKG_CONFIG_PATH
-dnl
-dnl sets up a GST_PKG_CONFIG_PATH variable for use in Makefile.am
-dnl which contains the path of the in-tree pkgconfig directory first
-dnl and then any paths specified in PKG_CONFIG_PATH.
-dnl
-dnl We do this mostly so we don't have to use unportable shell constructs
-dnl such as ${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH} in Makefile.am to handle
-dnl the case where the environment variable is not set, but also in order
-dnl to avoid a trailing ':' in the PKG_CONFIG_PATH which apparently causes
-dnl problems with pkg-config on windows with msys/mingw.
-AC_DEFUN([AG_GST_PKG_CONFIG_PATH],
-[
-  GST_PKG_CONFIG_PATH="\$(top_builddir)/pkgconfig"
-  if test "x$PKG_CONFIG_PATH" != "x"; then
-    GST_PKG_CONFIG_PATH="$GST_PKG_CONFIG_PATH:$PKG_CONFIG_PATH"
-  fi
-  AC_SUBST([GST_PKG_CONFIG_PATH])
-  AC_MSG_NOTICE([Using GST_PKG_CONFIG_PATH = $GST_PKG_CONFIG_PATH])
-])
diff --git a/common/m4/gtk-doc.m4 b/common/m4/gtk-doc.m4
deleted file mode 100644 (file)
index b243f1c..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-dnl -*- mode: autoconf -*-
-
-# serial 1
-
-dnl Usage:
-dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
-AC_DEFUN([GTK_DOC_CHECK],
-[
-  AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
-  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
-
-  dnl check for tools we added during development
-  AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
-  AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
-  AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
-
-  dnl for overriding the documentation installation directory
-  AC_ARG_WITH([html-dir],
-    AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
-    [with_html_dir='${datadir}/gtk-doc/html'])
-  HTML_DIR="$with_html_dir"
-  AC_SUBST([HTML_DIR])
-
-  dnl enable/disable documentation building
-  AC_ARG_ENABLE([gtk-doc],
-    AS_HELP_STRING([--enable-gtk-doc],
-                   [use gtk-doc to build documentation [[default=no]]]),,
-    [enable_gtk_doc=no])
-
-  if test x$enable_gtk_doc = xyes; then
-    ifelse([$1],[],
-      [PKG_CHECK_EXISTS([gtk-doc],,
-                        AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
-      [PKG_CHECK_EXISTS([gtk-doc >= $1],,
-                        AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
-    dnl don't check for glib if we build glib
-    if test "x$PACKAGE_NAME" != "xglib"; then
-      dnl don't fail if someone does not have glib
-      PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,)
-    fi
-    dnl don't rely on sed being pulled in implicitly. Fixes Solaris build.
-    if test -z "$SED"; then
-      AC_PROG_SED
-    fi
-  fi
-
-  AC_MSG_CHECKING([whether to build gtk-doc documentation])
-  AC_MSG_RESULT($enable_gtk_doc)
-
-  dnl enable/disable output formats
-  AC_ARG_ENABLE([gtk-doc-html],
-    AS_HELP_STRING([--enable-gtk-doc-html],
-                   [build documentation in html format [[default=yes]]]),,
-    [enable_gtk_doc_html=yes])
-    AC_ARG_ENABLE([gtk-doc-pdf],
-      AS_HELP_STRING([--enable-gtk-doc-pdf],
-                     [build documentation in pdf format [[default=no]]]),,
-      [enable_gtk_doc_pdf=no])
-
-  if test -z "$GTKDOC_MKPDF"; then
-    enable_gtk_doc_pdf=no
-  fi
-
-
-  AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
-  AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
-  AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
-  AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
-])
diff --git a/common/m4/introspection.m4 b/common/m4/introspection.m4
deleted file mode 100644 (file)
index 589721c..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-dnl -*- mode: autoconf -*-
-dnl Copyright 2009 Johan Dahlin
-dnl
-dnl This file is free software; the author(s) gives unlimited
-dnl permission to copy and/or distribute it, with or without
-dnl modifications, as long as this notice is preserved.
-dnl
-
-# serial 1
-
-m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
-[
-    AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
-    AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
-    AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
-
-    dnl enable/disable introspection
-    m4_if([$2], [require],
-    [dnl
-        enable_introspection=yes
-    ],[dnl
-        AC_ARG_ENABLE(introspection,
-                  AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
-                                 [Enable introspection for this build]),, 
-                                 [enable_introspection=auto])
-    ])dnl
-
-    AC_MSG_CHECKING([for gobject-introspection])
-
-    dnl presence/version checking
-    AS_CASE([$enable_introspection],
-    [no], [dnl
-        found_introspection="no (disabled, use --enable-introspection to enable)"
-    ],dnl
-    [yes],[dnl
-        PKG_CHECK_EXISTS([gobject-introspection-1.0],,
-                         AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
-        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
-                         found_introspection=yes,
-                         AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
-    ],dnl
-    [auto],[dnl
-        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
-    ],dnl
-    [dnl       
-        AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
-    ])dnl
-
-    AC_MSG_RESULT([$found_introspection])
-
-    INTROSPECTION_SCANNER=
-    INTROSPECTION_COMPILER=
-    INTROSPECTION_GENERATE=
-    INTROSPECTION_GIRDIR=
-    INTROSPECTION_TYPELIBDIR=
-    if test "x$found_introspection" = "xyes"; then
-       INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
-       INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
-       INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
-       INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
-       INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
-       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
-    fi
-    AC_SUBST(INTROSPECTION_SCANNER)
-    AC_SUBST(INTROSPECTION_COMPILER)
-    AC_SUBST(INTROSPECTION_GENERATE)
-    AC_SUBST(INTROSPECTION_GIRDIR)
-    AC_SUBST(INTROSPECTION_TYPELIBDIR)
-    AC_SUBST(INTROSPECTION_CFLAGS)
-    AC_SUBST(INTROSPECTION_LIBS)
-    AC_SUBST(INTROSPECTION_MAKEFILE)
-
-    AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
-])
-
-
-dnl Usage:
-dnl   GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
-
-AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
-[
-  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
-])
-
-dnl Usage:
-dnl   GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
-
-
-AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
-[
-  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
-])
diff --git a/common/m4/orc.m4 b/common/m4/orc.m4
deleted file mode 100644 (file)
index 26b2459..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-dnl pkg-config-based checks for Orc
-
-dnl specific:
-dnl ORC_CHECK([REQUIRED_VERSION])
-
-AC_DEFUN([ORC_CHECK],
-[
-  ORC_REQ=ifelse([$1], , "0.4.6", [$1])
-
-  AC_ARG_ENABLE(orc,
-  AC_HELP_STRING([--enable-orc],[use Orc if installed]),
-  [case "${enableval}" in
-    auto) enable_orc=auto ;;
-    yes) enable_orc=yes ;;
-    no)  enable_orc=no ;;
-    *) AC_MSG_ERROR(bad value ${enableval} for --enable-orc) ;;
-  esac
-  ],
-  [enable_orc=auto]) dnl Default value
-
-  if test "x$enable_orc" != "xno" ; then
-    PKG_CHECK_MODULES(ORC, orc-0.4 >= $ORC_REQ, [
-      AC_DEFINE(HAVE_ORC, 1, [Use Orc])
-      HAVE_ORC=yes
-      if test "x$ORCC" = "x" ; then
-        AC_MSG_CHECKING(for usable orcc)
-        ORCC=`$PKG_CONFIG --variable=orcc orc-0.4`
-        dnl check whether the orcc found by pkg-config can be run from the build environment
-        dnl if this is not the case (e.g. when cross-compiling) fall back to orcc from PATH
-        AS_IF([$ORCC --version 1> /dev/null 2> /dev/null], [], [ORCC=`which orcc`])
-        AC_MSG_RESULT($ORCC)
-      fi
-      AC_SUBST(ORCC)
-      ORCC_FLAGS="--compat $ORC_REQ"
-      AC_SUBST(ORCC_FLAGS)
-      AS_IF([test "x$ORCC" = "x"], [HAVE_ORCC=no], [HAVE_ORCC=yes])
-    ], [
-      if test "x$enable_orc" = "xyes" ; then
-        AC_MSG_ERROR([--enable-orc specified, but Orc >= $ORC_REQ not found])
-      fi
-      AC_DEFINE(DISABLE_ORC, 1, [Disable Orc])
-      HAVE_ORC=no
-      HAVE_ORCC=no
-    ])
-  else
-    AC_DEFINE(DISABLE_ORC, 1, [Disable Orc])
-    HAVE_ORC=no
-    HAVE_ORCC=no
-  fi
-  AM_CONDITIONAL(HAVE_ORC, [test "x$HAVE_ORC" = "xyes"])
-  AM_CONDITIONAL(HAVE_ORCC, [test "x$HAVE_ORCC" = "xyes"])
-
-]))
-
-AC_DEFUN([ORC_OUTPUT],
-[
-  if test "$HAVE_ORC" = yes ; then
-    printf "configure: *** Orc acceleration enabled.\n"
-  else
-    if test "x$enable_orc" = "xno" ; then
-      printf "configure: *** Orc acceleration disabled by --disable-orc.  Slower code paths\n"
-      printf "               will be used.\n"
-    else
-      printf "configure: *** Orc acceleration disabled.  Requires Orc >= $ORC_REQ, which was\n"
-      printf "               not found.  Slower code paths will be used.\n"
-    fi
-  fi
-  printf "\n"
-])
-
diff --git a/common/m4/pkg.m4 b/common/m4/pkg.m4
deleted file mode 100644 (file)
index 996e294..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-#
-# Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=m4_default([$1], [0.9.0])
-       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_RESULT([no])
-               PKG_CONFIG=""
-       fi
-
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
-    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_ifval([$2], [$2], [:])
-m4_ifvaln([$3], [else
-  $3])dnl
-fi])
-
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$PKG_CONFIG"; then
-    if test -n "$$1"; then
-        pkg_cv_[]$1="$$1"
-    else
-        PKG_CHECK_EXISTS([$3],
-                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-                        [pkg_failed=yes])
-    fi
-else
-       pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
-
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
-
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
-
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
-
-if test $pkg_failed = yes; then
-        _PKG_SHORT_ERRORS_SUPPORTED
-        if test $_pkg_short_errors_supported = yes; then
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
-        else
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
-
-       ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met:
-
-$$1_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-_PKG_TEXT
-])],
-               [AC_MSG_RESULT([no])
-                $4])
-elif test $pkg_failed = untried; then
-       ifelse([$4], , [AC_MSG_FAILURE(dnl
-[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.
-
-_PKG_TEXT
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
-               [$4])
-else
-       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-       ifelse([$3], , :, [$3])
-fi[]dnl
-])# PKG_CHECK_MODULES
index 78f8e7d..5ca8ba6 100755 (executable)
@@ -2,7 +2,7 @@
 type-name=GstOMXMPEG4VideoDec
 core-name=/usr/local/lib/libomxil-bellagio.so.0
 component-name=OMX.st.video_decoder.mpeg4
-rank=256
+rank=257
 in-port-index=0
 out-port-index=1
 hacks=event-port-settings-changed-ndata-parameter-swap;event-port-settings-changed-port-0-to-1
@@ -11,7 +11,7 @@ hacks=event-port-settings-changed-ndata-parameter-swap;event-port-settings-chang
 type-name=GstOMXH264Dec
 core-name=/usr/local/lib/libomxil-bellagio.so.0
 component-name=OMX.st.video_decoder.avc
-rank=256
+rank=257
 in-port-index=0
 out-port-index=1
 hacks=event-port-settings-changed-ndata-parameter-swap;event-port-settings-changed-port-0-to-1
index 0113214..e83ec55 100755 (executable)
@@ -5,7 +5,9 @@ component-name=OMX.Exynos.MPEG2.Decoder
 rank=258
 in-port-index=0
 out-port-index=1
-hacks=no-component-role
+in-port-usebuffer=0
+out-port-usebuffer=1
+hacks=no-component-role;no-disable-outport;no-component-reconfigure
 
 [omxdec_mpeg4]
 type-name=GstOMXMPEG4VideoDec
@@ -14,7 +16,9 @@ component-name=OMX.Exynos.MPEG4.Decoder
 rank=258
 in-port-index=0
 out-port-index=1
-hacks=no-component-role
+in-port-usebuffer=0
+out-port-usebuffer=1
+hacks=no-component-role;no-disable-outport;no-component-reconfigure
 
 [omxdec_h263]
 type-name=GstOMXH263Dec
@@ -23,7 +27,9 @@ component-name=OMX.Exynos.H263.Decoder
 rank=258
 in-port-index=0
 out-port-index=1
-hacks=no-component-role
+in-port-usebuffer=0
+out-port-usebuffer=1
+hacks=no-component-role;no-disable-outport;no-component-reconfigure
 
 [omxdec_h264]
 type-name=GstOMXH264Dec
@@ -32,7 +38,42 @@ component-name=OMX.Exynos.AVC.Decoder
 rank=258
 in-port-index=0
 out-port-index=1
-hacks=no-component-role
+in-port-usebuffer=0
+out-port-usebuffer=1
+hacks=no-component-role;no-disable-outport;no-component-reconfigure
+
+[omxdec_h265]
+type-name=GstOMXH265Dec
+core-name=/usr/lib/libExynosOMX_Core.so
+component-name=OMX.Exynos.HEVC.Decoder
+rank=258
+in-port-index=0
+out-port-index=1
+in-port-usebuffer=0
+out-port-usebuffer=1
+hacks=no-component-role;no-disable-outport;no-component-reconfigure
+
+[omxdec_vp8]
+type-name=GstOMXVP8Dec
+core-name=/usr/lib/libExynosOMX_Core.so
+component-name=OMX.Exynos.VP8.Decoder
+rank=258
+in-port-index=0
+out-port-index=1
+in-port-usebuffer=0
+out-port-usebuffer=1
+hacks=no-component-role;no-disable-outport;no-component-reconfigure
+
+[omxdec_vp9]
+type-name=GstOMXVP9Dec
+core-name=/usr/lib/libExynosOMX_Core.so
+component-name=OMX.Exynos.VP9.Decoder
+rank=258
+in-port-index=0
+out-port-index=1
+in-port-usebuffer=0
+out-port-usebuffer=1
+hacks=no-component-role;no-disable-outport;no-component-reconfigure
 
 [omxdec_vc1]
 type-name=GstOMXWMVDec
@@ -41,7 +82,9 @@ component-name=OMX.Exynos.WMV.Decoder
 rank=256
 in-port-index=0
 out-port-index=1
-hacks=no-component-role
+in-port-usebuffer=0
+out-port-usebuffer=1
+hacks=no-component-role;no-disable-outport
 sink-template-caps=video/x-wmv,wmvversion=(int)3,format=(string){WMV3,WVC1},width=(int)[1,MAX],height=(int)[1,MAX]
 
 [omxenc_h264]
@@ -51,7 +94,22 @@ component-name=OMX.Exynos.AVC.Encoder
 rank=258
 in-port-index=0
 out-port-index=1
-hacks=no-component-role
+in-port-usebuffer=1
+out-port-usebuffer=0
+hacks=no-disable-outport;no-component-role
+sink-template-caps=video/x-raw, format=(string)SN12, width=(int) [1,1920], height=(int) [1,1080], framerate=(fraction)[0/1, MAX]
+src-template-caps=video/x-h264, width=(int) [1,1920], height=(int) [1,1080], framerate=(fraction) [0/1, MAX], alignment=(string) au, stream-format = (string){ avc, byte-stream }
+
+[omxenc_h265]
+type-name=GstOMXH265Enc
+core-name=/usr/lib/libExynosOMX_Core.so
+component-name=OMX.Exynos.HEVC.Encoder
+rank=258
+in-port-index=0
+out-port-index=1
+in-port-usebuffer=1
+out-port-usebuffer=0
+hacks=no-disable-outport;no-component-role
 
 [omxenc_mpeg4]
 type-name=GstOMXMPEG4VideoEnc
@@ -60,7 +118,9 @@ component-name=OMX.Exynos.MPEG4.Encoder
 rank=258
 in-port-index=0
 out-port-index=1
-hacks=no-component-role
+in-port-usebuffer=1
+out-port-usebuffer=0
+hacks=no-component-role;no-disable-outport
 
 [omxenc_h263]
 type-name=GstOMXH263Enc
@@ -69,4 +129,6 @@ component-name=OMX.Exynos.H263.Encoder
 rank=258
 in-port-index=0
 out-port-index=1
-hacks=no-component-role
+in-port-usebuffer=1
+out-port-usebuffer=0
+hacks=no-component-role;no-disable-outport
index f276db0..7726c17 100755 (executable)
@@ -5,7 +5,9 @@ component-name=OMX.Exynos.MPEG2.Decoder
 rank=258
 in-port-index=0
 out-port-index=1
-hacks=no-component-role
+in-port-usebuffer=0
+out-port-usebuffer=1
+hacks=no-component-role;no-disable-outport;no-component-reconfigure
 
 [omxdec_mpeg4]
 type-name=GstOMXMPEG4VideoDec
@@ -14,7 +16,9 @@ component-name=OMX.Exynos.MPEG4.Decoder
 rank=258
 in-port-index=0
 out-port-index=1
-hacks=no-component-role
+in-port-usebuffer=0
+out-port-usebuffer=1
+hacks=no-component-role;no-disable-outport;no-component-reconfigure
 
 [omxdec_h263]
 type-name=GstOMXH263Dec
@@ -23,7 +27,9 @@ component-name=OMX.Exynos.H263.Decoder
 rank=258
 in-port-index=0
 out-port-index=1
-hacks=no-component-role
+in-port-usebuffer=0
+out-port-usebuffer=1
+hacks=no-component-role;no-disable-outport;no-component-reconfigure
 
 [omxdec_h264]
 type-name=GstOMXH264Dec
@@ -32,7 +38,20 @@ component-name=OMX.Exynos.AVC.Decoder
 rank=258
 in-port-index=0
 out-port-index=1
-hacks=no-component-role
+in-port-usebuffer=0
+out-port-usebuffer=1
+hacks=no-component-role;no-disable-outport;no-component-reconfigure
+
+[omxdec_vp8]
+type-name=GstOMXVP8Dec
+core-name=/usr/lib/libExynosOMX_Core.so
+component-name=OMX.Exynos.VP8.Decoder
+rank=258
+in-port-index=0
+out-port-index=1
+in-port-usebuffer=0
+out-port-usebuffer=1
+hacks=no-component-role;no-disable-outport;no-component-reconfigure
 
 [omxdec_vc1]
 type-name=GstOMXWMVDec
@@ -41,7 +60,9 @@ component-name=OMX.Exynos.WMV.Decoder
 rank=256
 in-port-index=0
 out-port-index=1
-hacks=no-component-role
+in-port-usebuffer=0
+out-port-usebuffer=1
+hacks=no-component-role;no-disable-outport
 sink-template-caps=video/x-wmv,wmvversion=(int)3,format=(string){WMV3,WVC1},width=(int)[1,MAX],height=(int)[1,MAX]
 
 [omxenc_h264]
@@ -51,7 +72,9 @@ component-name=OMX.Exynos.AVC.Encoder
 rank=258
 in-port-index=0
 out-port-index=1
-hacks=no-component-role
+hacks=no-disable-outport;no-component-role
+sink-template-caps=video/x-raw, format=(string)SN12, width=(int) [1,1920], height=(int) [1,1080], framerate=(fraction)[0/1, MAX]
+src-template-caps=video/x-h264, width=(int) [1,1920], height=(int) [1,1080], framerate=(fraction) [0/1, MAX], alignment=(string) au, stream-format = (string){ avc, byte-stream }
 
 [omxenc_mpeg4]
 type-name=GstOMXMPEG4VideoEnc
@@ -60,7 +83,9 @@ component-name=OMX.Exynos.MPEG4.Encoder
 rank=258
 in-port-index=0
 out-port-index=1
-hacks=no-component-role
+in-port-usebuffer=1
+out-port-usebuffer=1
+hacks=no-component-role;no-disable-outport
 
 [omxenc_h263]
 type-name=GstOMXH263Enc
@@ -69,4 +94,6 @@ component-name=OMX.Exynos.H263.Encoder
 rank=258
 in-port-index=0
 out-port-index=1
-hacks=no-component-role
+in-port-usebuffer=1
+out-port-usebuffer=1
+hacks=no-component-role;no-disable-outport
index 9e23d45..21ab304 100755 (executable)
@@ -2,7 +2,7 @@
 type-name=GstOMXMPEG2VideoDec
 core-name=/opt/vc/lib/libopenmaxil.so
 component-name=OMX.broadcom.video_decode
-rank=256
+rank=257
 in-port-index=130
 out-port-index=131
 hacks=no-component-role
@@ -11,7 +11,7 @@ hacks=no-component-role
 type-name=GstOMXMPEG4VideoDec
 core-name=/opt/vc/lib/libopenmaxil.so
 component-name=OMX.broadcom.video_decode
-rank=256
+rank=257
 in-port-index=130
 out-port-index=131
 hacks=no-component-role
@@ -20,7 +20,7 @@ hacks=no-component-role
 type-name=GstOMXH263Dec
 core-name=/opt/vc/lib/libopenmaxil.so
 component-name=OMX.broadcom.video_decode
-rank=256
+rank=257
 in-port-index=130
 out-port-index=131
 hacks=no-component-role
@@ -29,7 +29,7 @@ hacks=no-component-role
 type-name=GstOMXH264Dec
 core-name=/opt/vc/lib/libopenmaxil.so
 component-name=OMX.broadcom.video_decode
-rank=256
+rank=257
 in-port-index=130
 out-port-index=131
 hacks=no-component-role
@@ -38,7 +38,7 @@ hacks=no-component-role
 type-name=GstOMXTheoraDec
 core-name=/opt/vc/lib/libopenmaxil.so
 component-name=OMX.broadcom.video_decode
-rank=256
+rank=257
 in-port-index=130
 out-port-index=131
 hacks=no-component-role
@@ -47,7 +47,7 @@ hacks=no-component-role
 type-name=GstOMXVP8Dec
 core-name=/opt/vc/lib/libopenmaxil.so
 component-name=OMX.broadcom.video_decode
-rank=256
+rank=257
 in-port-index=130
 out-port-index=131
 hacks=no-component-role
@@ -56,7 +56,7 @@ hacks=no-component-role
 type-name=GstOMXMJPEGDec
 core-name=/opt/vc/lib/libopenmaxil.so
 component-name=OMX.broadcom.video_decode
-rank=256
+rank=257
 in-port-index=130
 out-port-index=131
 hacks=no-component-role
@@ -64,8 +64,8 @@ hacks=no-component-role
 [omxvc1dec]
 type-name=GstOMXWMVDec
 core-name=/opt/vc/lib/libopenmaxil.so
-component-name=OMX.broadcom.video_encode
-rank=256
+component-name=OMX.broadcom.video_decode
+rank=257
 in-port-index=130
 out-port-index=131
 hacks=no-component-role
@@ -75,10 +75,30 @@ sink-template-caps=video/x-wmv,wmvversion=(int)3,format=(string){WMV3,WVC1},widt
 type-name=GstOMXH264Enc
 core-name=/opt/vc/lib/libopenmaxil.so
 component-name=OMX.broadcom.video_encode
-rank=256
+rank=257
 in-port-index=200
 out-port-index=201
+hacks=no-component-role;no-component-reconfigure
+
+[omxanalogaudiosink]
+type-name=GstOMXAnalogAudioSink
+core-name=/opt/vc/lib/libopenmaxil.so
+component-name=OMX.broadcom.audio_render
+rank=257
+in-port-index=100
+out-port-index=101
 hacks=no-component-role
+sink-template-caps=audio/x-raw,format=(string){S16LE,S32LE},layout=(string)interleaved,rate=(int){8000,11025,16000,22050,24000,32000,44100,48000,88200,96000,176400,192000},channels=(int)[1,2]
+
+[omxhdmiaudiosink]
+type-name=GstOMXHdmiAudioSink
+core-name=/opt/vc/lib/libopenmaxil.so
+component-name=OMX.broadcom.audio_render
+rank=258
+in-port-index=100
+out-port-index=101
+hacks=no-component-role
+sink-template-caps=audio/x-raw,format=(string){S16LE,S32LE},layout=(string)interleaved,rate=(int){8000,11025,16000,22050,24000,32000,44100,48000,88200,96000,176400,192000},channels=(int)[1,8];audio/x-ac3,framed=(boolean)true;audio/x-dts,framed=(boolean)true,block-size=(int){512,1024,2048}
 
 [omxanalogaudiosink]
 type-name=GstOMXAnalogAudioSink
index f523e32..11108c9 100755 (executable)
@@ -187,23 +187,73 @@ if test "x$HAVE_VIDEO_EXT" = "xyes"; then
 "
 fi
 
-AC_CHECK_DECLS([OMX_VIDEO_CodingVP8],
+dnl check for supporting vp8
+AC_MSG_CHECKING([for supporting vp8])
+AC_ARG_ENABLE(vp8, AC_HELP_STRING([--enable-vp8], [OpenMAX IL has VP8 support]),
   [
-    AC_DEFINE(HAVE_VP8, 1, [OpenMAX IL has VP8 support])
-    HAVE_VP8=yes
-  ], [
-    HAVE_VP8=no
-  ], [[$VIDEO_HEADERS]])
+    case "${enableval}" in
+      yes) HAVE_VP8=yes ;;
+      no)  HAVE_VP8=no ;;
+      *)   AC_MSG_ERROR(bad value ${enableval} for --enable-vp8) ;;
+    esac
+  ],
+  [HAVE_VP8=no])
 AM_CONDITIONAL(HAVE_VP8, test "x$HAVE_VP8" = "xyes")
+AC_MSG_RESULT([$HAVE_VP8])
+if test "x$HAVE_VP8" = "xyes"; then
+  AC_DEFINE(HAVE_VP8, 1, [OpenMAX IL has VP8 support])
+fi
+
+dnl check for supporting vp9
+AC_MSG_CHECKING([for supporting vp9])
+AC_ARG_ENABLE(vp9, AC_HELP_STRING([--enable-vp9], [OpenMAX IL has VP9 support]),
+  [
+    case "${enableval}" in
+      yes) HAVE_VP9=yes ;;
+      no)  HAVE_VP9=no ;;
+      *)   AC_MSG_ERROR(bad value ${enableval} for --enable-vp9) ;;
+    esac
+  ],
+  [HAVE_VP9=no])
+AM_CONDITIONAL(HAVE_VP9, test "x$HAVE_VP9" = "xyes")
+AC_MSG_RESULT([$HAVE_VP9])
+if test "x$HAVE_VP9" = "xyes"; then
+  AC_DEFINE(HAVE_VP9, 1, [OpenMAX IL has VP9 support])
+fi
 
-AC_CHECK_DECLS([OMX_VIDEO_CodingTheora],
+dnl check for supporting theora
+AC_MSG_CHECKING([for supporting theora])
+AC_ARG_ENABLE(theora, AC_HELP_STRING([--enable-theora], [OpenMAX IL has Theora support]),
   [
-    AC_DEFINE(HAVE_THEORA, 1, [OpenMAX IL has Theora support])
-    HAVE_THEORA=yes
-  ], [
-    HAVE_THEORA=no
-  ], [[$VIDEO_HEADERS]])
+    case "${enableval}" in
+      yes) HAVE_THEORA=yes ;;
+      no)  HAVE_THEORA=no ;;
+      *)   AC_MSG_ERROR(bad value ${enableval} for --enable-theora) ;;
+    esac
+  ],
+  [HAVE_THEORA=no])
 AM_CONDITIONAL(HAVE_THEORA, test "x$HAVE_THEORA" = "xyes")
+AC_MSG_RESULT([$HAVE_THEORA])
+if test "x$HAVE_THEORA" = "xyes"; then
+  AC_DEFINE(HAVE_THEORA, 1, [OpenMAX IL has Theora support])
+fi
+
+dnl check for supporting hevc
+AC_MSG_CHECKING([for supporting hevc])
+AC_ARG_ENABLE(hevc, AC_HELP_STRING([--enable-hevc], [OpenMAX IL has HEVC support]),
+  [
+    case "${enableval}" in
+      yes) HAVE_HEVC=yes ;;
+      no)  HAVE_HEVC=no ;;
+      *)   AC_MSG_ERROR(bad value ${enableval} for --enable-hevc) ;;
+    esac
+  ],
+  [HAVE_HEVC=no])
+AM_CONDITIONAL(HAVE_HEVC, test "x$HAVE_HEVC" = "xyes")
+AC_MSG_RESULT([$HAVE_HEVC])
+if test "x$HAVE_HEVC" = "xyes"; then
+  AC_DEFINE(HAVE_HEVC, 1, [OpenMAX IL has HEVC support])
+fi
 
 dnl Check for -Bsymbolic-functions linker flag used to avoid
 dnl intra-library PLT jumps, if available.
@@ -306,7 +356,7 @@ dnl define an ERROR_CFLAGS Makefile variable
 AG_GST_SET_ERROR_CFLAGS($FATAL_WARNINGS, [
     -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef
     -Wwrite-strings -Wformat-nonliteral -Wformat-security -Wformat-nonliteral
-    -Winit-self -Wmissing-include-dirs -Waddress -Waggregate-return
+    -Winit-self -Wmissing-include-dirs -Waddress
     -Wno-multichar -Wnested-externs ])
 
 dnl define correct level for debugging messages
@@ -403,11 +453,6 @@ omx/Makefile
 common/Makefile
 common/m4/Makefile
 tools/Makefile
-config/Makefile
-config/bellagio/Makefile
-config/rpi/Makefile
-config/exynos/Makefile
-config/exynos64/Makefile
 examples/Makefile
 examples/egl/Makefile
 m4/Makefile
old mode 100644 (file)
new mode 100755 (executable)
index bccf6c1..99aa810
@@ -1495,6 +1495,8 @@ main (int argc, char **argv)
   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", GST_STR_NULL (err->message));
+    g_option_context_free (ctx);
+    g_clear_error (&err);
     exit (1);
   }
   g_option_context_free (ctx);
old mode 100644 (file)
new mode 100755 (executable)
index 5462a4b..23742f3
@@ -5,11 +5,23 @@ VP8_C_FILES=gstomxvp8dec.c
 VP8_H_FILES=gstomxvp8dec.h
 endif
 
+if HAVE_VP9
+VP9_C_FILES=gstomxvp9dec.c
+VP9_H_FILES=gstomxvp9dec.h
+endif
+
 if HAVE_THEORA
 THEORA_C_FILES=gstomxtheoradec.c
 THEORA_H_FILES=gstomxtheoradec.h
 endif
 
+if HAVE_HEVC
+HEVC_C_FILES=gstomxh265dec.c   \
+                       gstomxh265enc.c
+HEVC_H_FILES=gstomxh265dec.h   \
+                       gstomxh265enc.h
+endif
+
 libgstomx_la_SOURCES = \
        gstomx.c \
        gstomxbufferpool.c \
@@ -25,7 +37,9 @@ libgstomx_la_SOURCES = \
        gstomxh263dec.c \
        gstomxwmvdec.c \
        $(VP8_C_FILES) \
+       $(VP9_C_FILES) \
        $(THEORA_C_FILES) \
+       $(HEVC_C_FILES) \
        gstomxmpeg4videoenc.c \
        gstomxh264enc.c \
        gstomxh263enc.c \
@@ -35,7 +49,7 @@ libgstomx_la_SOURCES = \
        gstomxamrdec.c \
        gstomxaudiosink.c \
        gstomxanalogaudiosink.c \
-       gstomxhdmiaudiosink.c   
+       gstomxhdmiaudiosink.c
 
 noinst_HEADERS = \
        gstomx.h \
@@ -52,7 +66,9 @@ noinst_HEADERS = \
        gstomxh263dec.h \
        gstomxwmvdec.h \
        $(VP8_H_FILES) \
+       $(VP9_H_FILES) \
        $(THEORA_H_FILES) \
+       $(HEVC_H_FILES) \
        gstomxmpeg4videoenc.h \
        gstomxh264enc.h \
        gstomxh263enc.h \
@@ -70,6 +86,7 @@ endif
 
 libgstomx_la_CFLAGS = \
        -DGST_USE_UNSTABLE_API=1 \
+       $(CFLAGS) \
        $(OMX_INCLUDEPATH) \
        $(GST_GL_CFLAGS) \
        $(GST_PLUGINS_BASE_CFLAGS) \
@@ -95,25 +112,9 @@ libgstomx_la_LDFLAGS = \
        $(TBM_LDFLAGS) \
        $(MM_COMMON_LDFLAGS)
 
-
 EXTRA_DIST = \
        openmax \
        gstomxvp8dec.c \
        gstomxvp8dec.h \
        gstomxtheoradec.c \
        gstomxtheoradec.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-       androgenizer \
-       -:PROJECT libgstomx -:SHARED libgstomx \
-        -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-        -:SOURCES $(libgstomx_la_SOURCES) \
-                  $(nodist_libgstomx_la_SOURCES) \
-        -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstomx_la_CFLAGS) \
-        -:LDFLAGS $(libgstomx_la_LDFLAGS) \
-                  $(libgstomx_la_LIBADD) \
-                  -ldl \
-        -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-                      LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-$(GST_API_VERSION)' \
-       > $@
old mode 100644 (file)
new mode 100755 (executable)
index c315f31..8f1201d
 #include "gstomxmjpegdec.h"
 #include "gstomxmpeg2videodec.h"
 #include "gstomxmpeg4videodec.h"
+#include "gstomxh265dec.h"
 #include "gstomxh264dec.h"
 #include "gstomxh263dec.h"
 #include "gstomxvp8dec.h"
+#include "gstomxvp9dec.h"
 #include "gstomxtheoradec.h"
 #include "gstomxwmvdec.h"
 #include "gstomxmpeg4videoenc.h"
+#include "gstomxh265enc.h"
 #include "gstomxh264enc.h"
 #include "gstomxh263enc.h"
 #include "gstomxaacdec.h"
@@ -830,6 +833,13 @@ gst_omx_component_set_state (GstOMXComponent * comp, OMX_STATETYPE state)
 done:
 
   gst_omx_component_handle_messages (comp);
+
+  if (err != OMX_ErrorNone && comp->last_error == OMX_ErrorNone) {
+    GST_ERROR_OBJECT (comp->parent,
+        "Last operation returned an error. Setting last_error manually.");
+    comp->last_error = err;
+  }
+
   g_mutex_unlock (&comp->lock);
 
   if (err != OMX_ErrorNone) {
@@ -945,6 +955,9 @@ gst_omx_component_add_port (GstOMXComponent * comp, guint32 index)
   g_queue_init (&port->pending_buffers);
   port->flushing = TRUE;
   port->flushed = FALSE;
+#ifdef TIZEN_FEATURE_OMX
+  port->flush_start = FALSE;
+#endif
   port->enabled_pending = FALSE;
   port->disabled_pending = FALSE;
   port->eos = FALSE;
@@ -1001,6 +1014,25 @@ gst_omx_component_get_last_error_string (GstOMXComponent * comp)
   return gst_omx_error_to_string (gst_omx_component_get_last_error (comp));
 }
 
+#ifdef TIZEN_FEATURE_OMX
+OMX_ERRORTYPE
+gst_omx_component_get_extension_index (GstOMXComponent * comp, OMX_STRING name,
+    gpointer index)
+{
+  OMX_ERRORTYPE err;
+
+  g_return_val_if_fail (comp != NULL, OMX_ErrorUndefined);
+
+  GST_DEBUG_OBJECT (comp->parent, "Getting %s parameter index for %s",
+      comp->name, name);
+  err = OMX_GetExtensionIndex (comp->handle, name, index);
+  GST_DEBUG_OBJECT (comp->parent, "Got %s parameter at name %s: %s "
+      "(0x%08x)", comp->name, name, gst_omx_error_to_string (err), err);
+
+  return err;
+}
+#endif
+
 /* comp->lock must be unlocked while calling this */
 OMX_ERRORTYPE
 gst_omx_component_get_parameter (GstOMXComponent * comp, OMX_INDEXTYPE index,
@@ -1228,6 +1260,7 @@ gst_omx_port_acquire_buffer (GstOMXPort * port, GstOMXBuffer ** buf)
   GstOMXComponent *comp;
   OMX_ERRORTYPE err;
   GstOMXBuffer *_buf = NULL;
+  gint64 timeout = GST_CLOCK_TIME_NONE;
 
   g_return_val_if_fail (port != NULL, GST_OMX_ACQUIRE_BUFFER_ERROR);
   g_return_val_if_fail (!port->tunneled, GST_OMX_ACQUIRE_BUFFER_ERROR);
@@ -1244,6 +1277,11 @@ gst_omx_port_acquire_buffer (GstOMXPort * port, GstOMXBuffer ** buf)
 retry:
   gst_omx_component_handle_messages (comp);
 
+  /* If we are in the case where we waited for a buffer after EOS,
+   * make sure we don't do that again */
+  if (timeout != -1)
+    timeout = -2;
+
   /* Check if the component is in an error state */
   if ((err = comp->last_error) != OMX_ErrorNone) {
     GST_ERROR_OBJECT (comp->parent, "Component %s is in error state: %s",
@@ -1253,7 +1291,21 @@ retry:
   }
 
   /* Check if the port is flushing */
+#ifdef TIZEN_FEATURE_OMX
+  if (port->flushing || port->flush_start) {
+    if (!g_queue_is_empty (&port->pending_buffers)) {
+      GST_DEBUG_OBJECT (comp->parent, "%s port %u has pending buffers",
+          comp->name, port->index);
+      _buf = g_queue_pop_head (&port->pending_buffers);
+
+      ret = GST_OMX_ACQUIRE_BUFFER_OK;
+      goto done;
+    }
+#else
   if (port->flushing) {
+#endif
+    GST_DEBUG_OBJECT (comp->parent, "Component %s port %d is %s",
+        comp->name, port->index, (port->flushing ? "flushing" : "flush_start"));
     ret = GST_OMX_ACQUIRE_BUFFER_FLUSHING;
     goto done;
   }
@@ -1279,6 +1331,8 @@ retry:
     /* Only if this port needs to be reconfigured too notify
      * the caller about it */
     if (port->settings_cookie != port->configured_settings_cookie) {
+      GST_DEBUG_OBJECT (comp->parent,
+          "Component %s port %d needs reconfiguring", comp->name, port->index);
       ret = GST_OMX_ACQUIRE_BUFFER_RECONFIGURE;
       goto done;
     }
@@ -1301,6 +1355,8 @@ retry:
       goto done;
     }
 
+    GST_DEBUG_OBJECT (comp->parent, "Component %s port %d needs reconfiguring",
+        comp->name, port->index);
     ret = GST_OMX_ACQUIRE_BUFFER_RECONFIGURE;
     goto done;
   }
@@ -1315,11 +1371,21 @@ retry:
       goto done;
     }
 
-    ret = GST_OMX_ACQUIRE_BUFFER_EOS;
-    goto done;
+    if (comp->hacks & GST_OMX_HACK_SIGNALS_PREMATURE_EOS && timeout != -2) {
+      timeout = 33 * GST_MSECOND;
+
+      GST_DEBUG_OBJECT (comp->parent, "%s output port %u is EOS but waiting "
+          "in case it spits out more buffers", comp->name, port->index);
+    } else {
+      GST_DEBUG_OBJECT (comp->parent, "Component %s port %d signalled EOS",
+          comp->name, port->index);
+      ret = GST_OMX_ACQUIRE_BUFFER_EOS;
+      port->eos = FALSE;
+      goto done;
+    }
   }
 
-  /* 
+  /*
    * At this point we have no error or flushing/eos port
    * and a properly configured port.
    *
@@ -1332,7 +1398,9 @@ retry:
   if (g_queue_is_empty (&port->pending_buffers)) {
     GST_DEBUG_OBJECT (comp->parent, "Queue of %s port %u is empty",
         comp->name, port->index);
-    gst_omx_component_wait_message (comp, GST_CLOCK_TIME_NONE);
+#ifdef TIZEN_FEATURE_OMX
+    gst_omx_component_wait_message (comp, 33 * GST_MSECOND);
+#endif
 
     /* And now check everything again and maybe get a buffer */
     goto retry;
@@ -1374,6 +1442,13 @@ gst_omx_port_release_buffer (GstOMXPort * port, GstOMXBuffer * buf)
 
   g_mutex_lock (&comp->lock);
 
+#ifdef TIZEN_FEATURE_OMX
+  if (!buf->omx_buf) {
+    GST_ERROR_OBJECT (comp->parent, "Component %s has null buffer : %p "
+        , comp->name, buf);
+    goto done;
+  }
+#endif
   GST_DEBUG_OBJECT (comp->parent, "Releasing buffer %p (%p) to %s port %u",
       buf, buf->omx_buf->pBuffer, comp->name, port->index);
 
@@ -1399,7 +1474,11 @@ gst_omx_port_release_buffer (GstOMXPort * port, GstOMXBuffer * buf)
     goto done;
   }
 
+#ifdef TIZEN_FEATURE_OMX
+  if (port->flush_start || port->flushing || port->disabled_pending || !port->port_def.bEnabled) {
+#else
   if (port->flushing || port->disabled_pending || !port->port_def.bEnabled) {
+#endif
     GST_DEBUG_OBJECT (comp->parent,
         "%s port %u is flushing or disabled, not releasing " "buffer",
         comp->name, port->index);
@@ -1415,8 +1494,13 @@ gst_omx_port_release_buffer (GstOMXPort * port, GstOMXBuffer * buf)
   buf->used = TRUE;
 
   if (port->port_def.eDir == OMX_DirInput) {
+    GST_LOG_OBJECT (comp->parent, "Calling OMX_EmptyThisBuffer. dmabuf_fd : [%u(%p)0x%02x, 0x%02x], nFilledLen : %lu\n",
+        buf->mm_vbuffer ? buf->mm_vbuffer->handle.dmabuf_fd[0] : 0, buf, buf->omx_buf->pBuffer[4],
+        buf->omx_buf->pBuffer[10], buf->omx_buf->nFilledLen);
     err = OMX_EmptyThisBuffer (comp->handle, buf->omx_buf);
   } else {
+    GST_LOG_OBJECT (comp->parent, "Calling OMX_FillThisBuffer. dmabuf_fd : [%u(%p)]\n",
+        buf->mm_vbuffer ? buf->mm_vbuffer->handle.dmabuf_fd[0] : 0, buf);
     err = OMX_FillThisBuffer (comp->handle, buf->omx_buf);
   }
   GST_DEBUG_OBJECT (comp->parent, "Released buffer %p to %s port %u: %s "
@@ -1549,6 +1633,25 @@ done:
   return err;
 }
 
+#ifdef TIZEN_FEATURE_OMX
+void
+gst_omx_port_flush_start (GstOMXPort * port, gboolean flush)
+{
+  GstOMXComponent *comp;
+
+  g_return_if_fail (port != NULL);
+
+  comp = port->comp;
+
+  g_mutex_lock (&comp->lock);
+  GST_DEBUG_OBJECT (comp->parent, "Set %s port %d to flush_start: %s",
+      comp->name, port->index, (flush ? "" : "not "));
+
+  port->flush_start = flush;
+  g_mutex_unlock (&comp->lock);
+}
+#endif
+
 /* NOTE: Uses comp->lock and comp->messages_lock */
 gboolean
 gst_omx_port_is_flushing (GstOMXPort * port)
@@ -1581,7 +1684,7 @@ gst_omx_port_allocate_buffers_unlocked (GstOMXPort * port,
 {
   GstOMXComponent *comp;
   OMX_ERRORTYPE err = OMX_ErrorNone;
-  gint i;
+  gint i = 0;
   const GList *l;
 
   g_assert (!port->buffers || port->buffers->len == 0);
@@ -1628,7 +1731,8 @@ gst_omx_port_allocate_buffers_unlocked (GstOMXPort * port,
     buf->used = FALSE;
     buf->settings_cookie = port->settings_cookie;
 
-#ifdef GST_TIZEN_MODIFICATION
+#ifdef TIZEN_FEATURE_OMX
+    if (buffers)
       buf->mm_vbuffer = (MMVideoBuffer*) l->data;
 #endif
 
@@ -1665,7 +1769,10 @@ gst_omx_port_allocate_buffers_unlocked (GstOMXPort * port,
     g_assert (buf->omx_buf->pAppPrivate == buf);
 
     /* In the beginning all buffers are not owned by the component */
+    GST_DEBUG_OBJECT (comp->parent, "Pushing pending_buffers, port:[%d], Buffer:[%p]",
+        port->index, buf);
     g_queue_push_tail (&port->pending_buffers, buf);
+
     if (buffers || images)
       l = l->next;
   }
@@ -1696,121 +1803,214 @@ gst_omx_port_allocate_buffers (GstOMXPort * port)
   return err;
 }
 
-#ifdef GST_TIZEN_MODIFICATION
+#ifdef TIZEN_FEATURE_OMX
 /* NOTE: Uses comp->lock and comp->messages_lock */
 OMX_ERRORTYPE
-gst_omx_port_tbm_allocate_dec_buffers (GstOMXPort * port, tbm_bufmgr bufMgr, int eCompressionFormat)
+gst_omx_port_tbm_allocate_dec_buffers (GstOMXPort * port, tbm_bufmgr bufmgr, gboolean use_buffer)
 {
   guint n = 0;
-  int y_size = 0;
-  int uv_size = 0;
+  gint num = 0;
+  gint i = 0 , j = 0;
+  gint planes[MAX_BUFFER_PLANE] = {0, };
+  gint stride[MAX_BUFFER_PLANE] = {0, };
   GList *buffers = NULL;
-  MMVideoBuffer *ptr = NULL;
+  MMVideoBuffer *mm_vbuffer[MAX_INPUT_BUFFER];
+  tbm_bo_handle handle_bo;
   GstOMXComponent *comp;
   OMX_ERRORTYPE err = OMX_ErrorNone;
+  OMX_CONFIG_RECTTYPE rect;
+  tbm_surface_h surface;
+  tbm_surface_info_s info;
+  int ret;
 
   g_return_val_if_fail (port != NULL, OMX_ErrorUndefined);
 
   comp = port->comp;
 
+  GST_OMX_INIT_STRUCT (&rect);
+  rect.nPortIndex = port->index;
+
+  err =
+      gst_omx_component_get_config (comp, OMX_IndexConfigCommonOutputCrop,
+      &rect);
+  if (err != OMX_ErrorNone) {
+    rect.nLeft = 0;
+    rect.nTop = 0;
+    rect.nWidth = port->port_def.format.video.nFrameWidth;
+    rect.nHeight = port->port_def.format.video.nFrameHeight;
+  }
+
   g_mutex_lock (&port->comp->lock);
 
   /* deallocate previous allocated buffers... */
-  if(port->buffers)
-      gst_omx_port_deallocate_buffers(port);
+  if (port->buffers)
+      gst_omx_port_deallocate_buffers (port);
 
-  n = port->port_def.nBufferCountActual;
+  if (use_buffer) {
+    n = port->port_def.nBufferCountActual;
+
+    if (port->index == 1) {
+      surface = tbm_surface_create (rect.nWidth, rect.nHeight, TBM_FORMAT_NV12);
+      ret = tbm_surface_get_info (surface, &info);
+      if (ret != TBM_SURFACE_ERROR_NONE) {
+        tbm_surface_destroy (surface);
+        g_mutex_unlock (&port->comp->lock);
+        return OMX_ErrorUndefined;
+      }
+
+      planes[0] = info.planes[0].size;
+      stride[0] = info.planes[0].stride;
+      planes[1] = info.planes[1].size;
+      stride[1] = info.planes[1].stride;
+      tbm_surface_destroy (surface);
 
-  for(int i = 0; i < n; i++) {
-      ptr = (MMVideoBuffer*) malloc(sizeof(MMVideoBuffer));
-      memset(ptr,0,sizeof(MMVideoBuffer));
+      if ((planes[0] <= 0) || (planes[1] <= 0) || (stride[0] <= 0) || (stride[1] <= 0))
+        return OMX_ErrorUndefined;
+    }
 
-      if(port->index == 0) {
-          ptr->handle.bo[0] = gst_omx_tbm_allocate_bo(bufMgr, port->port_def.nBufferSize);
-          ptr->handle.dmabuf_fd[0] = gst_omx_tbm_get_bo_fd(ptr->handle.bo[0]);
-          ptr->data[0] = gst_omx_tbm_get_bo_ptr(ptr->handle.bo[0]);
-          ptr->size[0] = port->port_def.nBufferSize;
-          ptr->type = MM_VIDEO_BUFFER_TYPE_TBM_BO;
+    for (i = 0; i < n; i++) {
+      mm_vbuffer[i] = (MMVideoBuffer*) malloc(sizeof (MMVideoBuffer));
+      memset (mm_vbuffer[i], 0, sizeof (MMVideoBuffer));
 
-          GST_INFO_OBJECT (comp->parent,
-                  "Allocating %d buffer[%p] for %s port %u", i,
-                  ptr->handle.bo[0], comp->name, (guint) port->index);
+      if (port->index == 0) {
+        mm_vbuffer[i]->handle.bo[0] = tbm_bo_alloc (bufmgr, port->port_def.nBufferSize, TBM_BO_WC);
+        mm_vbuffer[i]->size[0] = port->port_def.nBufferSize;
+        mm_vbuffer[i]->plane_num = 1;
+      } else {
+        mm_vbuffer[i]->handle.bo[0] = tbm_bo_alloc (bufmgr, planes[0], TBM_BO_WC);
+        mm_vbuffer[i]->size[0] = port->port_def.format.video.nFrameWidth * port->port_def.format.video.nFrameHeight;
+        mm_vbuffer[i]->handle_size[0] = planes[0];
+        mm_vbuffer[i]->width[0] = rect.nWidth;
+        mm_vbuffer[i]->height[0] = rect.nHeight;
+        mm_vbuffer[i]->stride_width[0] = stride[0];
+        mm_vbuffer[i]->stride_height[0] = planes[0] / stride[0];
+
+        mm_vbuffer[i]->handle.bo[1] = tbm_bo_alloc (bufmgr, planes[1], TBM_BO_WC);
+        mm_vbuffer[i]->size[1] = mm_vbuffer[i]->size[0]>>1;
+        mm_vbuffer[i]->handle_size[1] = planes[1];
+        mm_vbuffer[i]->width[1] = rect.nWidth;
+        mm_vbuffer[i]->height[1] = rect.nHeight>>1;
+        mm_vbuffer[i]->stride_width[1] = stride[1];
+        mm_vbuffer[i]->stride_height[1] = planes[1] / stride[1];
+        mm_vbuffer[i]->plane_num = 2;
+        mm_vbuffer[i]->handle_num = 2;
+        mm_vbuffer[i]->type = MM_VIDEO_BUFFER_TYPE_TBM_BO;
+        mm_vbuffer[i]->crop.x = rect.nLeft;
+        mm_vbuffer[i]->crop.y = rect.nTop;
+        mm_vbuffer[i]->crop.width = rect.nWidth;
+        mm_vbuffer[i]->crop.height = rect.nHeight;
       }
-      else { /* output port */
-          y_size = gst_omx_calculate_y_size(eCompressionFormat,
-                  port->port_def.format.video.nStride, port->port_def.format.video.nSliceHeight);
-          ptr->handle.bo[0] = gst_omx_tbm_allocate_bo(bufMgr, y_size);
-          ptr->handle.dmabuf_fd[0] = gst_omx_tbm_get_bo_fd(ptr->handle.bo[0]);
-          ptr->data[0] = gst_omx_tbm_get_bo_ptr(ptr->handle.bo[0]);
-          ptr->handle.paddr[0] = ptr->data[0];
-          ptr->size[0] = y_size;
-
-          uv_size = gst_omx_calculate_uv_size(eCompressionFormat,
-                  port->port_def.format.video.nStride, port->port_def.format.video.nSliceHeight >> 1);
-          ptr->handle.bo[1] = gst_omx_tbm_allocate_bo(bufMgr, uv_size);
-          ptr->handle.dmabuf_fd[1] = gst_omx_tbm_get_bo_fd(ptr->handle.bo[1]);
-          ptr->data[1] = gst_omx_tbm_get_bo_ptr(ptr->handle.bo[1]);
-          ptr->size[1] = uv_size;
-          ptr->type = MM_VIDEO_BUFFER_TYPE_DMABUF_FD;
-          ptr->plane_num = 2;
-          GST_INFO_OBJECT (comp->parent,
-                  "Allocating %d buffer bo[0]:%p bo[1]:%p fd[0]:%d fd[1]:%d size[0]:%d size[1]:%d for %s port %u", i,
-                  ptr->handle.bo[0], ptr->handle.bo[0], ptr->handle.dmabuf_fd[0], ptr->handle.dmabuf_fd[1],
-                  ptr->size[0], ptr->size[1], comp->name, (guint) port->index);
 
+      for (j = 0; j < port->index + 1; j++) {
+        handle_bo = tbm_bo_get_handle (mm_vbuffer[i]->handle.bo[j], TBM_DEVICE_MM);
+        if (handle_bo.ptr == NULL) {
+          g_mutex_unlock (&port->comp->lock);
+          goto error;
+        }
+        mm_vbuffer[i]->handle.dmabuf_fd[j] = handle_bo.u32;
+
+        handle_bo = tbm_bo_get_handle (mm_vbuffer[i]->handle.bo[j], TBM_DEVICE_CPU);
+        if (handle_bo.ptr == NULL) {
+          g_mutex_unlock (&port->comp->lock);
+          goto error;
+        }
+        mm_vbuffer[i]->data[j] = handle_bo.ptr;
       }
-      buffers = g_list_append(buffers,(gpointer)ptr);
+
+      GST_INFO_OBJECT (comp->parent,
+        "Allocating %d buffer bo[0]:%p bo[1]:%p fd[0]:%d fd[1]:%d size[0]:%d size[1]:%d for %s port %u", i,
+        mm_vbuffer[i]->handle.bo[0], mm_vbuffer[i]->handle.bo[1], mm_vbuffer[i]->handle.dmabuf_fd[0], mm_vbuffer[i]->handle.dmabuf_fd[1],
+        mm_vbuffer[i]->size[0], mm_vbuffer[i]->size[1], comp->name, (guint) port->index);
+
+      buffers = g_list_append (buffers, (gpointer) mm_vbuffer[i]);
+    }
   }
 
-  n = g_list_length ((GList *) buffers);
-  err = gst_omx_port_allocate_buffers_unlocked (port, buffers, NULL, n);
+  num = use_buffer ? g_list_length ((GList *) buffers) : -1;
+  err = gst_omx_port_allocate_buffers_unlocked (port, buffers, NULL, num);
+
   g_mutex_unlock (&port->comp->lock);
 
   return err;
+
+error:
+  for (i = 0; i < port->port_def.nBufferCountActual; i++) {
+    for (j = 0; j < port->index + 1; j++) {
+      if (mm_vbuffer[i]->handle.bo[j]) {
+        tbm_bo_unref (mm_vbuffer[i]->handle.bo[j]);
+        mm_vbuffer[i]->handle.bo[j] = NULL;
+        g_free (mm_vbuffer[i]);
+      }
+    }
+  }
+  return OMX_ErrorInsufficientResources;
 }
 
 /* NOTE: Uses comp->lock and comp->messages_lock */
 OMX_ERRORTYPE
-gst_omx_port_tbm_allocate_enc_buffers (GstOMXPort * port, tbm_bufmgr bufMgr, int eCompressionFormat)
+gst_omx_port_tbm_allocate_enc_buffers (GstOMXPort * port, tbm_bufmgr bufmgr, gboolean use_buffer)
 {
-  int y_size = 0;
-  int uv_size = 0;
   OMX_ERRORTYPE err = OMX_ErrorNone;
+  gint i = 0;
   guint n = 0;
+  gint num = 0;
   GList *buffers = NULL;
-  MMVideoBuffer *ptr = NULL;
+  tbm_bo_handle handle_bo;
+  MMVideoBuffer *mm_vbuffer[MAX_INPUT_BUFFER];
 
   g_return_val_if_fail (port != NULL, OMX_ErrorUndefined);
 
   g_mutex_lock (&port->comp->lock);
 
   /*deallocate previous allocated buffers...*/
-  if(port->buffers)
-      gst_omx_port_deallocate_buffers(port);
+  if (port->buffers)
+    gst_omx_port_deallocate_buffers (port);
   n = port->port_def.nBufferCountActual;
 
-  for(int i = 0; i < n; i++) {
-      ptr = (MMVideoBuffer*) malloc(sizeof(MMVideoBuffer));
-      memset(ptr,0,sizeof(MMVideoBuffer));
-      if(port->index == 1) {
-
-          ptr->handle.bo[0] = gst_omx_tbm_allocate_bo(bufMgr, port->port_def.nBufferSize);
-          ptr->handle.dmabuf_fd[0] = gst_omx_tbm_get_bo_fd(ptr->handle.bo[0]);
-          ptr->handle.paddr[0] = gst_omx_tbm_get_bo_ptr(ptr->handle.bo[0]);
-          ptr->type = MM_VIDEO_BUFFER_TYPE_TBM_BO;
-          ptr->size[0] = port->port_def.nBufferSize;
-          ptr->handle_num = 1;
+  if (use_buffer) {
+    for (i = 0; i < n; i++) {
+      mm_vbuffer[i] = (MMVideoBuffer *) malloc (sizeof (MMVideoBuffer));
+      memset (mm_vbuffer[i], 0, sizeof (MMVideoBuffer));
+
+      if (port->index == 1) {
+        mm_vbuffer[i]->handle.bo[0] = tbm_bo_alloc (bufmgr, port->port_def.nBufferSize, TBM_BO_WC);
+        handle_bo = tbm_bo_get_handle (mm_vbuffer[i]->handle.bo[0], TBM_DEVICE_MM);
+        if (handle_bo.ptr == NULL) {
+          g_mutex_unlock (&port->comp->lock);
+          goto error;
+        }
+        mm_vbuffer[i]->handle.dmabuf_fd[0] = handle_bo.u32;
+
+        handle_bo = tbm_bo_get_handle (mm_vbuffer[i]->handle.bo[0], TBM_DEVICE_CPU);
+        if (handle_bo.ptr == NULL) {
+          g_mutex_unlock (&port->comp->lock);
+          goto error;
+        }
+        mm_vbuffer[i]->data[0] = handle_bo.ptr;
+        mm_vbuffer[i]->type = MM_VIDEO_BUFFER_TYPE_TBM_BO;
+        mm_vbuffer[i]->size[0] = port->port_def.nBufferSize;
+        mm_vbuffer[i]->handle_num = 1;
       }
-      buffers = g_list_append(buffers,(gpointer)ptr);
+      buffers = g_list_append (buffers, (gpointer)mm_vbuffer[i]);
+    }
   }
 
-  n = g_list_length ((GList *) buffers);
-  err = gst_omx_port_allocate_buffers_unlocked (port, buffers, NULL, n);
+  num = use_buffer ? g_list_length ((GList *) buffers) : -1;
+  err = gst_omx_port_allocate_buffers_unlocked (port, buffers, NULL, num);
   g_mutex_unlock (&port->comp->lock);
 
   return err;
-}
 
+error:
+  for (i = 0; i < port->port_def.nBufferCountActual; i++) {
+    if (mm_vbuffer[i]->handle.bo[0]) {
+      tbm_bo_unref (mm_vbuffer[i]->handle.bo[0]);
+      mm_vbuffer[i]->handle.bo[0] = NULL;
+      g_free (mm_vbuffer[i]);
+    }
+  }
+  return OMX_ErrorInsufficientResources;
+}
 #endif
 /* NOTE: Uses comp->lock and comp->messages_lock */
 OMX_ERRORTYPE
@@ -1852,7 +2052,7 @@ gst_omx_port_deallocate_buffers_unlocked (GstOMXPort * port)
 {
   GstOMXComponent *comp;
   OMX_ERRORTYPE err = OMX_ErrorNone;
-  gint i, n;
+  gint i = 0, n = 0;
 
   g_return_val_if_fail (!port->tunneled, OMX_ErrorBadParameter);
 
@@ -1889,13 +2089,13 @@ gst_omx_port_deallocate_buffers_unlocked (GstOMXPort * port)
           "port %u", buf, comp->name, port->index);
     }
 
-#ifdef GST_TIZEN_MODIFICATION
+#ifdef TIZEN_FEATURE_OMX
     /* deallocate tbm buffers */
     if(buf->mm_vbuffer != NULL) {
-        gst_omx_tbm_deallocate_bo(buf->mm_vbuffer->handle.bo[0]);
+        tbm_bo_unref(buf->mm_vbuffer->handle.bo[0]);
         if(port->index == 1) /* output port */
-            gst_omx_tbm_deallocate_bo(buf->mm_vbuffer->handle.bo[1]);
-        free(buf->mm_vbuffer);
+            tbm_bo_unref(buf->mm_vbuffer->handle.bo[1]);
+        g_free(buf->mm_vbuffer);
         buf->mm_vbuffer = NULL;
     }
 #endif
@@ -2162,7 +2362,7 @@ gst_omx_port_populate_unlocked (GstOMXPort * port)
        * valid anymore after the buffer was consumed
        */
       buf->omx_buf->nFlags = 0;
-
+      GST_DEBUG_OBJECT(comp->parent,"Calling OMX_FillThisBuffer. buffer[%p]. function:[%s]",buf->omx_buf,__func__);
       err = OMX_FillThisBuffer (comp->handle, buf->omx_buf);
 
       if (err != OMX_ErrorNone) {
@@ -2381,6 +2581,13 @@ static const GGetTypeFunction types[] = {
 #ifdef HAVE_VP8
       , gst_omx_vp8_dec_get_type
 #endif
+#ifdef HAVE_VP9
+      , gst_omx_vp9_dec_get_type
+#endif
+#ifdef HAVE_HEVC
+      , gst_omx_h265_dec_get_type
+      , gst_omx_h265_enc_get_type
+#endif
 #ifdef HAVE_THEORA
       , gst_omx_theora_dec_get_type
 #endif
@@ -2555,7 +2762,7 @@ gst_omx_command_to_string (OMX_COMMANDTYPE cmd)
 }
 
 #if defined(USE_OMX_TARGET_RPI)
-#define DEFAULT_HACKS (GST_OMX_HACK_NO_COMPONENT_ROLE)
+#define DEFAULT_HACKS (GST_OMX_HACK_NO_COMPONENT_ROLE | GST_OMX_HACK_HEIGHT_MULTIPLE_16)
 #else
 #define DEFAULT_HACKS (0)
 #endif
@@ -2589,6 +2796,12 @@ gst_omx_parse_hacks (gchar ** hacks)
       hacks_flags |= GST_OMX_HACK_NO_COMPONENT_ROLE;
     else if (g_str_equal (*hacks, "no-disable-outport"))
       hacks_flags |= GST_OMX_HACK_NO_DISABLE_OUTPORT;
+    else if (g_str_equal (*hacks, "signals-premature-eos"))
+      hacks_flags |= GST_OMX_HACK_SIGNALS_PREMATURE_EOS;
+    else if (g_str_equal (*hacks, "height-multiple-16"))
+      hacks_flags |= GST_OMX_HACK_HEIGHT_MULTIPLE_16;
+    else if (g_str_equal (*hacks, "pass-profile-to-decoder"))
+      hacks_flags |= GST_OMX_HACK_PASS_PROFILE_TO_DECODER;
     else
       GST_WARNING ("Unknown hack: %s", *hacks);
     hacks++;
@@ -2606,144 +2819,6 @@ gst_omx_set_default_role (GstOMXClassData * class_data,
     class_data->component_role = default_role;
 }
 
-#ifdef GST_TIZEN_MODIFICATION
-
-int new_calc_plane(int width, int height)
-{
-    int mbX, mbY;
-
-    mbX = DIV_ROUND_UP(width, S5P_FIMV_NUM_PIXELS_IN_MB_ROW);
-    mbY = DIV_ROUND_UP(height, S5P_FIMV_NUM_PIXELS_IN_MB_COL);
-
-    if (width * height < S5P_FIMV_MAX_FRAME_SIZE)
-      mbY = (mbY + 1) / 2 * 2;
-
-    return ((mbX * S5P_FIMV_NUM_PIXELS_IN_MB_COL) *
-     (mbY * S5P_FIMV_NUM_PIXELS_IN_MB_ROW));
-}
-
-int new_calc_yplane(int width, int height)
-{
-    return (ALIGN_TO_4KB(new_calc_plane(width, height) +
-              S5P_FIMV_D_ALIGN_PLANE_SIZE));
-}
-
-int new_calc_uvplane(int width, int height)
-{
-    return (ALIGN_TO_4KB((new_calc_plane(width, height) >> 1) +
-              S5P_FIMV_D_ALIGN_PLANE_SIZE));
-}
-
-int
-calc_plane(int width, int height)
-{
-    int mbX, mbY;
-
-    mbX = ALIGN(width, S5P_FIMV_NV12MT_HALIGN);
-    mbY = ALIGN(height, S5P_FIMV_NV12MT_VALIGN);
-
-    return ALIGN(mbX * mbY, S5P_FIMV_DEC_BUF_ALIGN);
-}
-
-int
-calc_yplane(int width, int height)
-{
-    int mbX, mbY;
-
-    mbX = ALIGN(width + 24, S5P_FIMV_NV12MT_HALIGN);
-    mbY = ALIGN(height + 16, S5P_FIMV_NV12MT_VALIGN);
-
-    return ALIGN(mbX * mbY, S5P_FIMV_DEC_BUF_ALIGN);
-}
-
-int
-calc_uvplane(int width, int height)
-{
-    int mbX, mbY;
-
-    mbX = ALIGN(width + 16, S5P_FIMV_NV12MT_HALIGN);
-    mbY = ALIGN(height + 4, S5P_FIMV_NV12MT_VALIGN);
-
-    return ALIGN(mbX * mbY, S5P_FIMV_DEC_BUF_ALIGN);
-}
-
-int
-gst_omx_calculate_y_size(int compressionFormat, int width, int height)
-{
-    int size = 0;
-    switch(compressionFormat)
-    {
-    case OMX_VIDEO_CodingH263: /* FALL THROUGH */
-    case OMX_VIDEO_CodingMPEG4:
-        size = CHOOSE_MAX_SIZE(calc_yplane(width,height),new_calc_yplane(width,height));
-        break;
-    case OMX_VIDEO_CodingMPEG2:
-        size = CHOOSE_MAX_SIZE(calc_yplane(width,height),new_calc_yplane(width,height));
-        size = size << 1; /* MFC FIX. double the calculated buffer size */
-        break;
-    case OMX_VIDEO_CodingAVC: /* FALL THROUGH */
-        default:
-        size = CHOOSE_MAX_SIZE(calc_yplane(width,height),new_calc_yplane(width,height));
-    }
-    return size;
-}
-
-int
-gst_omx_calculate_uv_size(int compressionFormat, int width, int height)
-{
-    int size = 0;
-    switch(compressionFormat)
-    {
-    case OMX_VIDEO_CodingH263: /* FALL THROUGH */
-    case OMX_VIDEO_CodingMPEG4:
-          size = CHOOSE_MAX_SIZE(calc_uvplane(width,height),new_calc_uvplane(width,height));
-        break;
-    case OMX_VIDEO_CodingMPEG2:
-        size = CHOOSE_MAX_SIZE(calc_uvplane(width,height),new_calc_uvplane(width,height));
-        size = size << 1; /* MFC FIX. double the calculated buffer size */
-        break;
-    case OMX_VIDEO_CodingAVC: /* FALL THROUGH */
-        default:
-        size = CHOOSE_MAX_SIZE(calc_uvplane(width,height),new_calc_uvplane(width,height));
-    }
-    return size;
-}
-
-tbm_bo
-gst_omx_tbm_allocate_bo(tbm_bufmgr hBufmgr, int size)
-{
-    return tbm_bo_alloc(hBufmgr,size, TBM_BO_WC);
-}
-
-void
-gst_omx_tbm_deallocate_bo(tbm_bo bo)
-{
-    tbm_bo_unmap(bo);
-    tbm_bo_unref(bo);
-}
-
-OMX_U32
-gst_omx_tbm_get_bo_fd(tbm_bo bo)
-{
-  tbm_bo_handle TBMBoHandle;
-  TBMBoHandle = tbm_bo_get_handle(bo, TBM_DEVICE_MM);
-  if(TBMBoHandle.ptr != NULL)
-    return TBMBoHandle.u32;
-  return 0;
-}
-
-OMX_PTR
-gst_omx_tbm_get_bo_ptr(tbm_bo bo)
-{
-  tbm_bo_handle TBMBoHandle;
-  TBMBoHandle = tbm_bo_map(bo, TBM_DEVICE_CPU,TBM_OPTION_WRITE);
-  if(TBMBoHandle.ptr != NULL)
-    return TBMBoHandle.ptr;
-  return NULL;
-}
-
-#endif
-
 static void
 _class_init (gpointer g_class, gpointer data)
 {
@@ -2754,6 +2829,7 @@ _class_init (gpointer g_class, gpointer data)
   GError *err;
   gchar *core_name, *component_name, *component_role;
   gint in_port_index, out_port_index;
+  gint in_port_usebuffer, out_port_usebuffer;
   gchar *template_caps;
   GstPadTemplate *templ;
   GstCaps *caps;
@@ -2820,6 +2896,30 @@ _class_init (gpointer g_class, gpointer data)
   }
   class_data->out_port_index = out_port_index;
 
+#ifdef TIZEN_FEATURE_OMX
+  err = NULL;
+  in_port_usebuffer =
+      g_key_file_get_integer (config, element_name, "in-port-usebuffer", &err);
+  if (err != NULL) {
+    GST_DEBUG ("No 'in-port-usebuffer' set for element '%s', auto-detecting: %s",
+        element_name, err->message);
+    in_port_usebuffer = 0;
+    g_error_free (err);
+  }
+  class_data->in_port_usebuffer = in_port_usebuffer;
+
+  err = NULL;
+  out_port_usebuffer =
+      g_key_file_get_integer (config, element_name, "out-port-usebuffer", &err);
+  if (err != NULL) {
+    GST_DEBUG ("No 'out-port-usebuffer' set for element '%s', auto-detecting: %s",
+        element_name, err->message);
+    out_port_usebuffer = 1;
+    g_error_free (err);
+  }
+  class_data->out_port_usebuffer = out_port_usebuffer;
+#endif
+
   /* Add pad templates */
   err = NULL;
   if (class_data->type != GST_OMX_COMPONENT_TYPE_SOURCE) {
@@ -2846,6 +2946,7 @@ _class_init (gpointer g_class, gpointer data)
     templ = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, caps);
     g_free (template_caps);
     gst_element_class_add_pad_template (element_class, templ);
+    gst_caps_unref (caps);
   }
 
   err = NULL;
@@ -2872,6 +2973,7 @@ _class_init (gpointer g_class, gpointer data)
     templ = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, caps);
     g_free (template_caps);
     gst_element_class_add_pad_template (element_class, templ);
+    gst_caps_unref (caps);
   }
 
   if ((hacks =
@@ -2887,6 +2989,7 @@ _class_init (gpointer g_class, gpointer data)
 #endif
 
     class_data->hacks = gst_omx_parse_hacks (hacks);
+    g_strfreev (hacks);
   }
 }
 
old mode 100644 (file)
new mode 100755 (executable)
index 6e8398f..97141bc
 # endif
 #endif
 
+/* If the component may signal EOS before it has finished pushing
+ * out all of its buffers. Happens with egl_render on the rpi.
+ */
+#define GST_OMX_HACK_SIGNALS_PREMATURE_EOS                            G_GUINT64_CONSTANT (0x0000000000000400)
+
 #include <OMX_Core.h>
 #include <OMX_Component.h>
 
-#ifdef USE_OMX_TARGET_EXYNOS
+#ifdef TIZEN_FEATURE_OMX
 #include <tbm_type.h>
 #include <tbm_surface.h>
 #include <tbm_bufmgr.h>
+#include <unistd.h>
 #endif
 
 #ifdef USE_OMX_TARGET_RPI
@@ -78,6 +84,15 @@ G_BEGIN_DECLS
   (st)->nVersion.s.nStep = OMX_VERSION_STEP; \
 } G_STMT_END
 
+#if defined(USE_OMX_TARGET_EXYNOS) || defined(USE_OMX_TARGET_EXYNOS64)
+#define OMX_INIT_PARAM(param) G_STMT_START { \
+  memset (&(param), 0, sizeof ((param))); \
+  (param).nSize = sizeof (param); \
+  (param).nVersion.s.nVersionMajor = 1; \
+  (param).nVersion.s.nVersionMinor = 1; \
+} G_STMT_END
+#endif
+
 /* Different hacks that are required to work around
  * bugs in different OpenMAX implementations
  */
@@ -123,6 +138,18 @@ G_BEGIN_DECLS
  */
 #define GST_OMX_HACK_NO_DISABLE_OUTPORT                               G_GUINT64_CONSTANT (0x0000000000000100)
 
+/* If the encoder requires input buffers that have a height
+ * which is a multiple of 16 pixels
+ */
+#define GST_OMX_HACK_HEIGHT_MULTIPLE_16             G_GUINT64_CONSTANT (0x0000000000000200)
+
+/* If we should pass the profile/level information from upstream to the
+ * OMX decoder. This is a violation of the OMX spec as
+ * OMX_IndexParamVideoProfileLevelCurrent is supposed to be r-o so
+ * do it as a platform specific hack.
+ */
+#define GST_OMX_HACK_PASS_PROFILE_TO_DECODER        G_GUINT64_CONSTANT (0x0000000000000800)
+
 typedef struct _GstOMXCore GstOMXCore;
 typedef struct _GstOMXPort GstOMXPort;
 typedef enum _GstOMXPortDirection GstOMXPortDirection;
@@ -134,17 +161,21 @@ typedef struct _GstOMXMessage GstOMXMessage;
 /* MODIFICATION */
 typedef enum GOmxVendor GOmxVendor; /* check omx vender */
 
-#ifdef GST_TIZEN_MODIFICATION
+#ifdef TIZEN_FEATURE_OMX
 
 #define MFC_INPUT_BUFFER_PLANE      1
 #define MFC_OUTPUT_BUFFER_PLANE     2
+#define MAX_BUFFER_PLANE            3
 
 #define MAX_INPUT_BUFFER            16
 #define MAX_OUTPUT_BUFFER           16
 
+#define ALIGN(x, a)       (((x) + (a) - 1) & ~((a) - 1))
+
 typedef struct _TBMBuffer TBMBuffer;
 typedef struct _TBMInputBuffer TBMInputBuffer;
 typedef struct _TBMOutputBuffer TBMOutputBuffer;
+typedef struct _EnableGemBuffersParams EnableGemBuffersParams;
 
 struct _TBMBuffer
 {
@@ -168,8 +199,6 @@ struct _TBMOutputBuffer
     GList *buffers;
 };
 
-typedef struct _EnableGemBuffersParams EnableGemBuffersParams;
-
 struct _EnableGemBuffersParams
 {
   OMX_U32 nSize;
@@ -179,40 +208,6 @@ struct _EnableGemBuffersParams
 };
 #endif
 
-enum
-{
-    BUF_SHARE_METHOD_PADDR = 0,
-    BUF_SHARE_METHOD_FD = 1,
-    BUF_SHARE_METHOD_TIZEN_BUFFER = 2,
-    BUF_SHARE_METHOD_FLUSH_BUFFER = 3,
-}; /* buf_share_method */
-
-/* Extended color formats */
-enum {
-    OMX_EXT_COLOR_FormatNV12TPhysicalAddress = 0x7F000001, /**< Reserved region for introducing Vendor Extensions */
-    OMX_EXT_COLOR_FormatNV12LPhysicalAddress = 0x7F000002,
-    OMX_EXT_COLOR_FormatNV12Tiled = 0x7FC00002,
-    OMX_EXT_COLOR_FormatNV12TFdValue = 0x7F000012,
-    OMX_EXT_COLOR_FormatNV12LFdValue = 0x7F000013
-};
-
-#ifdef GST_TIZEN_MODIFICATION
-/* Extended port settings. */
-enum {
-    OMX_IndexParamEnablePlatformSpecificBuffers = 0x7F000011
-};
-#endif
-
-/* modification: Add_component_vendor */
-enum GOmxVendor
-{
-    GOMX_VENDOR_DEFAULT,
-    GOMX_VENDOR_SLSI_SEC,
-    GOMX_VENDOR_SLSI_EXYNOS,
-    GOMX_VENDOR_QCT,
-    GOMX_VENDOR_SPRD
-};
-
 typedef enum {
   /* Everything good and the buffer is valid */
   GST_OMX_ACQUIRE_BUFFER_OK = 0,
@@ -236,7 +231,6 @@ struct _GstOMXCore {
   gint user_count; /* LOCK */
 
   /* MODIFICATION */
-  GOmxVendor component_vendor; /* to check omx vender */
   gboolean secure; /* trust zone */
 
   /* OpenMAX core library functions, protected with LOCK */
@@ -311,6 +305,10 @@ struct _GstOMXPort {
   gboolean enabled_pending;  /* TRUE after OMX_Command{En,Dis}able */
   gboolean disabled_pending; /* was done until it took effect */
   gboolean eos; /* TRUE after a buffer with EOS flag was received */
+#ifdef TIZEN_FEATURE_OMX
+  gboolean use_buffer;
+  gboolean flush_start;
+#endif
 
   /* Increased whenever the settings of these port change.
    * If settings_cookie != configured_settings_cookie
@@ -368,7 +366,7 @@ struct _GstOMXBuffer {
   /* TRUE if this is an EGLImage */
   gboolean eglimage;
 
-#ifdef GST_TIZEN_MODIFICATION
+#ifdef TIZEN_FEATURE_OMX
   /* MMVideoBuffer array to use TBM buffers */
    MMVideoBuffer *mm_vbuffer;
 #endif
@@ -383,6 +381,9 @@ struct _GstOMXClassData {
   const gchar *default_sink_template_caps;
 
   guint32 in_port_index, out_port_index;
+#ifdef TIZEN_FEATURE_OMX
+  guint32 in_port_usebuffer, out_port_usebuffer;
+#endif
 
   guint64 hacks;
 
@@ -433,9 +434,11 @@ OMX_ERRORTYPE     gst_omx_port_set_flushing (GstOMXPort *port, GstClockTime time
 gboolean          gst_omx_port_is_flushing (GstOMXPort *port);
 
 OMX_ERRORTYPE     gst_omx_port_allocate_buffers (GstOMXPort *port);
-#ifdef GST_TIZEN_MODIFICATION
-OMX_ERRORTYPE     gst_omx_port_tbm_allocate_dec_buffers (GstOMXPort * port, tbm_bufmgr  bufMgr, int eCompressionFormat);
-OMX_ERRORTYPE     gst_omx_port_tbm_allocate_enc_buffers (GstOMXPort * port, tbm_bufmgr  bufMgr, int eCompressionFormat);
+#ifdef TIZEN_FEATURE_OMX
+OMX_ERRORTYPE     gst_omx_port_tbm_allocate_dec_buffers (GstOMXPort * port, tbm_bufmgr  bufmgr, gboolean use_buffer);
+OMX_ERRORTYPE     gst_omx_port_tbm_allocate_enc_buffers (GstOMXPort * port, tbm_bufmgr  bufmgr, gboolean use_buffer);
+OMX_ERRORTYPE     gst_omx_component_get_extension_index (GstOMXComponent * comp, OMX_STRING name, gpointer index);
+void              gst_omx_port_flush_start (GstOMXPort * port, gboolean flush);
 #endif
 OMX_ERRORTYPE     gst_omx_port_use_buffers (GstOMXPort *port, const GList *buffers);
 OMX_ERRORTYPE     gst_omx_port_use_eglimages (GstOMXPort *port, const GList *images);
@@ -452,50 +455,6 @@ gboolean          gst_omx_port_is_enabled (GstOMXPort * port);
 
 void              gst_omx_set_default_role (GstOMXClassData *class_data, const gchar *default_role);
 
-#ifdef GST_TIZEN_MODIFICATION
-
-/*MFC Buffer alignment macros*/
-#define S5P_FIMV_DEC_BUF_ALIGN                  (8 * 1024)
-#define S5P_FIMV_ENC_BUF_ALIGN                  (8 * 1024)
-#define S5P_FIMV_NV12M_HALIGN                   16
-#define S5P_FIMV_NV12M_LVALIGN                  16
-#define S5P_FIMV_NV12M_CVALIGN                  8
-#define S5P_FIMV_NV12MT_HALIGN                  128
-#define S5P_FIMV_NV12MT_VALIGN                  64
-#define S5P_FIMV_NV12M_SALIGN                   2048
-#define S5P_FIMV_NV12MT_SALIGN                  8192
-
-#define ALIGN(x, a)       (((x) + (a) - 1) & ~((a) - 1))
-
-/* Buffer alignment defines */
-#define SZ_1M                                   0x00100000
-#define S5P_FIMV_D_ALIGN_PLANE_SIZE             64
-
-#define S5P_FIMV_MAX_FRAME_SIZE                 (2 * SZ_1M)
-#define S5P_FIMV_NUM_PIXELS_IN_MB_ROW           16
-#define S5P_FIMV_NUM_PIXELS_IN_MB_COL           16
-
-/* Macro */
-#define ALIGN_TO_4KB(x)   ((((x) + (1 << 12) - 1) >> 12) << 12)
-#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
-#define CHOOSE_MAX_SIZE(a,b) ((a) > (b) ? (a) : (b))
-
-int new_calc_plane(int width, int height);
-int new_calc_yplane(int width, int height);
-int new_calc_uvplane(int width, int height);
-
-int calc_plane(int width, int height);
-int calc_yplane(int width, int height);
-int calc_uvplane(int width, int height);
-int gst_omx_calculate_y_size(int compressionFormat, int width, int height);
-int gst_omx_calculate_uv_size(int compressionFormat, int width, int height);
-
-tbm_bo            gst_omx_tbm_allocate_bo(tbm_bufmgr hBufmgr, int size);
-void              gst_omx_tbm_deallocate_bo(tbm_bo bo);
-OMX_U32           gst_omx_tbm_get_bo_fd(tbm_bo bo);
-OMX_PTR           gst_omx_tbm_get_bo_ptr(tbm_bo bo);
-
-#endif
 /* refered by plugin_init */
 GST_DEBUG_CATEGORY_EXTERN (gst_omx_video_debug_category);
 
index 9b84555..b6fdf34 100755 (executable)
@@ -599,9 +599,15 @@ component_error:
 flushing:
   {
     GST_DEBUG_OBJECT (self, "Flushing -- stopping task");
+    g_mutex_lock (&self->drain_lock);
+    if (self->draining) {
+      self->draining = FALSE;
+      g_cond_broadcast (&self->drain_cond);
+    }
     gst_pad_pause_task (GST_AUDIO_DECODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_FLUSHING;
     self->started = FALSE;
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 
@@ -673,8 +679,14 @@ flow_error:
       self->started = FALSE;
     } else if (flow_ret == GST_FLOW_FLUSHING) {
       GST_DEBUG_OBJECT (self, "Flushing -- stopping task");
+      g_mutex_lock (&self->drain_lock);
+      if (self->draining) {
+        self->draining = FALSE;
+        g_cond_broadcast (&self->drain_cond);
+      }
       gst_pad_pause_task (GST_AUDIO_DECODER_SRC_PAD (self));
       self->started = FALSE;
+      g_mutex_unlock (&self->drain_lock);
     }
     GST_AUDIO_DECODER_STREAM_UNLOCK (self);
     return;
old mode 100644 (file)
new mode 100755 (executable)
index 8724f5e..a6ba861
@@ -491,9 +491,15 @@ component_error:
 flushing:
   {
     GST_DEBUG_OBJECT (self, "Flushing -- stopping task");
+    g_mutex_lock (&self->drain_lock);
+    if (self->draining) {
+      self->draining = FALSE;
+      g_cond_broadcast (&self->drain_cond);
+    }
     gst_pad_pause_task (GST_AUDIO_ENCODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_FLUSHING;
     self->started = FALSE;
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 eos:
@@ -541,8 +547,14 @@ flow_error:
       self->started = FALSE;
     } else if (flow_ret == GST_FLOW_FLUSHING) {
       GST_DEBUG_OBJECT (self, "Flushing -- stopping task");
+      g_mutex_lock (&self->drain_lock);
+      if (self->draining) {
+        self->draining = FALSE;
+        g_cond_broadcast (&self->drain_cond);
+      }
       gst_pad_pause_task (GST_AUDIO_ENCODER_SRC_PAD (self));
       self->started = FALSE;
+      g_mutex_unlock (&self->drain_lock);
     }
     GST_AUDIO_ENCODER_STREAM_UNLOCK (self);
     return;
index fa3f8e7..460c7c2 100755 (executable)
@@ -395,7 +395,6 @@ gst_omx_buffer_pool_alloc_buffer (GstBufferPool * bpool,
     g_ptr_array_add (pool->buffers, buf);
 
     switch (GST_VIDEO_INFO_FORMAT (&pool->video_info)) {
-        GST_WARNING_OBJECT (pool, "GST_VIDEO_CAPS");
       case GST_VIDEO_FORMAT_ABGR:
       case GST_VIDEO_FORMAT_ARGB:
       case GST_VIDEO_FORMAT_RGB16:
@@ -418,7 +417,6 @@ gst_omx_buffer_pool_alloc_buffer (GstBufferPool * bpool,
         break;
       case GST_VIDEO_FORMAT_SN12:
       case GST_VIDEO_FORMAT_ST12:
-        GST_WARNING_OBJECT (pool, "SN12SN12SN12SN12SN12");
         offset[0] = 0;
         stride[0] = pool->port->port_def.format.video.nStride;
         offset[1] = stride[0] * pool->port->port_def.format.video.nSliceHeight;
@@ -448,9 +446,11 @@ gst_omx_buffer_pool_alloc_buffer (GstBufferPool * bpool,
           break;
         }
       }
-
       pool->need_copy = need_copy;
     }
+#ifdef TIZEN_FEATURE_OMX
+    pool->need_copy = FALSE;
+#endif
 
     if (pool->need_copy || pool->add_videometa) {
       /* We always add the videometa. It's the job of the user
@@ -469,6 +469,8 @@ gst_omx_buffer_pool_alloc_buffer (GstBufferPool * bpool,
 
   *buffer = buf;
 
+  pool->num_buffers++;
+  GST_DEBUG_OBJECT (pool, "alloc buffers : %d %d", pool->num_buffers, pool->current_buffer_index);
   pool->current_buffer_index++;
 
   return GST_FLOW_OK;
@@ -492,6 +494,8 @@ gst_omx_buffer_pool_free_buffer (GstBufferPool * bpool, GstBuffer * buffer)
 
   GST_BUFFER_POOL_CLASS (gst_omx_buffer_pool_parent_class)->free_buffer (bpool,
       buffer);
+  GST_DEBUG_OBJECT (pool, "free buffers : %d %d", pool->num_buffers, pool->current_buffer_index);
+  pool->num_buffers--;
 }
 
 static GstFlowReturn
@@ -509,6 +513,8 @@ gst_omx_buffer_pool_acquire_buffer (GstBufferPool * bpool,
     buf = g_ptr_array_index (pool->buffers, pool->current_buffer_index);
     g_return_val_if_fail (buf != NULL, GST_FLOW_ERROR);
     *buffer = buf;
+    pool->num_buffers--;
+    GST_DEBUG_OBJECT (pool, "acquire buffers : %d %d", pool->num_buffers, pool->current_buffer_index);
     ret = GST_FLOW_OK;
 
     /* If it's our own memory we have to set the sizes */
@@ -545,6 +551,8 @@ gst_omx_buffer_pool_release_buffer (GstBufferPool * bpool, GstBuffer * buffer)
         gst_omx_buffer_data_quark);
     if (pool->port->port_def.eDir == OMX_DirOutput && !omx_buf->used) {
       /* Release back to the port, can be filled again */
+      pool->num_buffers++;
+      GST_DEBUG_OBJECT (pool, "release buffers : %d %d", pool->num_buffers, pool->current_buffer_index);
       err = gst_omx_port_release_buffer (pool->port, omx_buf);
       if (err != OMX_ErrorNone) {
         GST_ELEMENT_ERROR (pool->element, LIBRARY, SETTINGS, (NULL),
index 76f9680..87b27d3 100755 (executable)
@@ -78,6 +78,9 @@ struct _GstOMXBufferPool
    * wrapped
    */
   gint current_buffer_index;
+#ifdef TIZEN_FEATURE_OMX
+  gint num_buffers;
+#endif
 };
 
 struct _GstOMXBufferPoolClass
index 2132d9f..68620da 100644 (file)
@@ -49,6 +49,7 @@ enum
 G_DEFINE_TYPE_WITH_CODE (GstOMXH264Dec, gst_omx_h264_dec,
     GST_TYPE_OMX_VIDEO_DEC, DEBUG_INIT);
 
+
 static void
 gst_omx_h264_dec_class_init (GstOMXH264DecClass * klass)
 {
@@ -60,10 +61,14 @@ gst_omx_h264_dec_class_init (GstOMXH264DecClass * klass)
   videodec_class->set_format = GST_DEBUG_FUNCPTR (gst_omx_h264_dec_set_format);
 
   videodec_class->cdata.default_sink_template_caps = "video/x-h264, "
-      "parsed=(boolean) true, "
       "alignment=(string) au, "
       "stream-format=(string) byte-stream, "
-      "width=(int) [1,MAX], " "height=(int) [1,MAX]";
+      "width=(int) [1,MAX], " "height=(int) [1,MAX],"
+#ifdef TIZEN_FEATURE_OMX
+      "framerate = (fraction) [0/1, MAX]";
+#else
+      "parsed=(boolean) true ";
+#endif
 
   gst_element_class_set_static_metadata (element_class,
       "OpenMAX H.264 Video Decoder",
@@ -124,3 +129,4 @@ gst_omx_h264_dec_set_format (GstOMXVideoDec * dec, GstOMXPort * port,
 
   return ret;
 }
+
index 4c0ea1f..ee206c5 100644 (file)
@@ -42,9 +42,57 @@ G_BEGIN_DECLS
 typedef struct _GstOMXH264Dec GstOMXH264Dec;
 typedef struct _GstOMXH264DecClass GstOMXH264DecClass;
 
+#ifdef TIZEN_FEATURE_OMX
+#define GST_OMX_H264_NAL_START_LEN 4
+#define GST_OMX_H264_SPSPPS_LEN 2
+
+#define GST_OMX_H264_RB16(x) ((((const unsigned char*)(x))[0] << 8) | ((const unsigned char*)(x))[1])
+#define GST_OMX_H264_RB32(x) ((((const unsigned char*)(x))[0] << 24) | \
+                                   (((const unsigned char*)(x))[1] << 16) | \
+                                   (((const unsigned char*)(x))[2] <<  8) | \
+                                   ((const unsigned char*)(x))[3])
+#define GST_OMX_H264_WB32(p, d) \
+  do { \
+      ((unsigned char*)(p))[3] = (d); \
+      ((unsigned char*)(p))[2] = (d)>>8; \
+      ((unsigned char*)(p))[1] = (d)>>16; \
+      ((unsigned char*)(p))[0] = (d)>>24; \
+  } while(0);
+
+typedef enum
+{
+  GST_OMX_H264_NUT_UNKNOWN = 0,
+  GST_OMX_H264_NUT_SLICE = 1,
+  GST_OMX_H264_NUT_DPA = 2,
+  GST_OMX_H264_NUT_DPB = 3,
+  GST_OMX_H264_NUT_DPC = 4,
+  GST_OMX_H264_NUT_IDR = 5,
+  GST_OMX_H264_NUT_SEI = 6,
+  GST_OMX_H264_NUT_SPS = 7,
+  GST_OMX_H264_NUT_PPS = 8,
+  GST_OMX_H264_NUT_AUD = 9,
+  GST_OMX_H264_NUT_EOSEQ = 10,
+  GST_OMX_H264_NUT_EOSTREAM = 11,
+  GST_OMX_H264_NUT_FILL = 12,
+  GST_OMX_H264_NUT_PREFIX = 14,
+  GST_OMX_H264_NUT_MIXED = 24,
+} GSTOMX_H264_NAL_UNIT_TYPE;
+
+typedef enum
+{
+  GST_OMX_H264_FORMAT_UNKNOWN,
+  GST_OMX_H264_FORMAT_PACKETIZED,
+  GST_OMX_H264_FORMAT_BYTE_STREAM,
+} GST_OMX_H264_STREAM_FORMAT;
+#endif
+
 struct _GstOMXH264Dec
 {
   GstOMXVideoDec parent;
+#ifdef TIZEN_FEATURE_OMX
+  GST_OMX_H264_STREAM_FORMAT h264_format;
+  unsigned int h264_nal_length_size;
+#endif
 };
 
 struct _GstOMXH264DecClass
old mode 100644 (file)
new mode 100755 (executable)
index aa33ae5..b055b3c
@@ -54,6 +54,10 @@ enum
 #ifdef USE_OMX_TARGET_RPI
   PROP_INLINESPSPPSHEADERS,
 #endif
+#if defined(USE_OMX_TARGET_EXYNOS) || defined(USE_OMX_TARGET_EXYNOS64)
+  PROP_NUM_REF_FRAME,
+  PROP_NUM_B_FRAME,
+#endif
   PROP_PERIODICITYOFIDRFRAMES,
   PROP_INTERVALOFCODINGINTRAFRAMES
 };
@@ -61,6 +65,12 @@ enum
 #ifdef USE_OMX_TARGET_RPI
 #define GST_OMX_H264_VIDEO_ENC_INLINE_SPS_PPS_HEADERS_DEFAULT      TRUE
 #endif
+#if defined(USE_OMX_TARGET_EXYNOS) || defined(USE_OMX_TARGET_EXYNOS64)
+#define GST_OMX_VIDEO_ENC_NUM_REF_FRAME_DEFAULT (0x00000001)
+#define GST_OMX_VIDEO_ENC_NUM_REF_FRAME_MAX (0x00000002)
+#define GST_OMX_VIDEO_ENC_NUM_B_FRAME_DEFAULT (0x00000001)
+#define GST_OMX_VIDEO_ENC_NUM_B_FRAME_MAX (0x00000002)
+#endif
 #define GST_OMX_H264_VIDEO_ENC_PERIODICITY_OF_IDR_FRAMES_DEFAULT    (0xffffffff)
 #define GST_OMX_H264_VIDEO_ENC_INTERVAL_OF_CODING_INTRA_FRAMES_DEFAULT (0xffffffff)
 
@@ -98,7 +108,23 @@ gst_omx_h264_enc_class_init (GstOMXH264EncClass * klass)
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
           GST_PARAM_MUTABLE_READY));
 #endif
+#if defined(USE_OMX_TARGET_EXYNOS) || defined(USE_OMX_TARGET_EXYNOS64)
+  g_object_class_install_property (gobject_class, PROP_NUM_REF_FRAME,
+      g_param_spec_uint ("reference-frame", "set number of reference frame",
+          "The number of reference frame (0x00000001=component default)",
+          GST_OMX_VIDEO_ENC_NUM_REF_FRAME_DEFAULT, GST_OMX_VIDEO_ENC_NUM_REF_FRAME_MAX,
+          GST_OMX_VIDEO_ENC_NUM_REF_FRAME_DEFAULT,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+          GST_PARAM_MUTABLE_READY));
 
+  g_object_class_install_property (gobject_class, PROP_NUM_B_FRAME,
+      g_param_spec_uint ("b-frame", "set number of b frame",
+          "The number of reference frame (0x00000001=component default)",
+          GST_OMX_VIDEO_ENC_NUM_B_FRAME_DEFAULT, GST_OMX_VIDEO_ENC_NUM_B_FRAME_MAX,
+          GST_OMX_VIDEO_ENC_NUM_B_FRAME_DEFAULT,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+          GST_PARAM_MUTABLE_READY));
+#endif
   g_object_class_install_property (gobject_class, PROP_PERIODICITYOFIDRFRAMES,
       g_param_spec_uint ("periodicty-idr", "Target Bitrate",
           "Periodicity of IDR frames (0xffffffff=component default)",
@@ -146,6 +172,14 @@ gst_omx_h264_enc_set_property (GObject * object, guint prop_id,
       self->inline_sps_pps_headers = g_value_get_boolean (value);
       break;
 #endif
+#if defined(USE_OMX_TARGET_EXYNOS) || defined(USE_OMX_TARGET_EXYNOS64)
+    case PROP_NUM_REF_FRAME:
+      self->reference_frame = g_value_get_int (value);
+      break;
+    case PROP_NUM_B_FRAME:
+      self->b_frame = g_value_get_int (value);
+      break;
+#endif
     case PROP_PERIODICITYOFIDRFRAMES:
       self->periodicty_idr = g_value_get_uint (value);
       break;
@@ -170,6 +204,14 @@ gst_omx_h264_enc_get_property (GObject * object, guint prop_id, GValue * value,
       g_value_set_boolean (value, self->inline_sps_pps_headers);
       break;
 #endif
+#if defined(USE_OMX_TARGET_EXYNOS) || defined(USE_OMX_TARGET_EXYNOS64)
+    case PROP_NUM_REF_FRAME:
+      g_value_set_uint (value, self->reference_frame);
+      break;
+    case PROP_NUM_B_FRAME:
+      g_value_set_uint (value, self->b_frame);
+      break;
+#endif
     case PROP_PERIODICITYOFIDRFRAMES:
       g_value_set_uint (value, self->periodicty_idr);
       break;
@@ -189,6 +231,9 @@ gst_omx_h264_enc_init (GstOMXH264Enc * self)
   self->inline_sps_pps_headers =
       GST_OMX_H264_VIDEO_ENC_INLINE_SPS_PPS_HEADERS_DEFAULT;
 #endif
+#if defined(USE_OMX_TARGET_EXYNOS) || defined(USE_OMX_TARGET_EXYNOS64)
+  self->reference_frame = GST_OMX_VIDEO_ENC_NUM_REF_FRAME_DEFAULT;
+#endif
   self->periodicty_idr =
       GST_OMX_H264_VIDEO_ENC_PERIODICITY_OF_IDR_FRAMES_DEFAULT;
   self->interval_intraframes =
@@ -229,6 +274,9 @@ gst_omx_h264_enc_set_format (GstOMXVideoEnc * enc, GstOMXPort * port,
 #ifdef USE_OMX_TARGET_RPI
   OMX_CONFIG_PORTBOOLEANTYPE config_inline_header;
 #endif
+#if defined(USE_OMX_TARGET_EXYNOS) || defined(USE_OMX_TARGET_EXYNOS64)
+  OMX_VIDEO_PARAM_AVCTYPE avc_param;
+#endif
   OMX_ERRORTYPE err;
   const gchar *profile_string, *level_string;
 
@@ -262,6 +310,36 @@ gst_omx_h264_enc_set_format (GstOMXVideoEnc * enc, GstOMXPort * port,
     return FALSE;
   }
 #endif
+#if defined(USE_OMX_TARGET_EXYNOS) || defined(USE_OMX_TARGET_EXYNOS64)
+  GST_OMX_INIT_STRUCT (&avc_param);
+
+  err =
+      gst_omx_component_get_parameter (GST_OMX_VIDEO_ENC (self)->enc,
+      OMX_IndexParamVideoAvc, &avc_param);
+  if (err != OMX_ErrorNone) {
+    GST_ERROR_OBJECT (self,
+        "can't get OMX_IndexParamVideoAvc %s (0x%08x)",
+        gst_omx_error_to_string (err), err);
+    return FALSE;
+  }
+
+  GST_DEBUG_OBJECT (self, "default nRefFrames:%u, nBFrames:%u",
+      (guint) avc_param.nRefFrames,
+      (guint) avc_param.nBFrames);
+
+  avc_param.nRefFrames = self->reference_frame;
+  avc_param.nBFrames = self->b_frame;
+  err =
+      gst_omx_component_set_parameter (GST_OMX_VIDEO_ENC (self)->enc,
+      OMX_IndexParamVideoAvc, &avc_param);
+  if (err != OMX_ErrorNone) {
+    GST_ERROR_OBJECT (self,
+        "can't set OMX_IndexParamVideoAvc %s (0x%08x)",
+        gst_omx_error_to_string (err), err);
+    return FALSE;
+  }
+
+#endif
 
   if (self->periodicty_idr !=
       GST_OMX_H264_VIDEO_ENC_PERIODICITY_OF_IDR_FRAMES_DEFAULT
old mode 100644 (file)
new mode 100755 (executable)
index 03326e1..8887c84
@@ -49,6 +49,10 @@ struct _GstOMXH264Enc
 #ifdef USE_OMX_TARGET_RPI
   gboolean inline_sps_pps_headers;
 #endif
+#if defined(USE_OMX_TARGET_EXYNOS) || defined(USE_OMX_TARGET_EXYNOS64)
+  guint32 reference_frame;
+  guint32 b_frame;
+#endif
   guint32 periodicty_idr;
   guint32 interval_intraframes;
 
diff --git a/omx/gstomxh265dec.c b/omx/gstomxh265dec.c
new file mode 100644 (file)
index 0000000..e822cd9
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *   Author: Sejun Park <sejun79.park@samsung.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gst/gst.h>
+
+#include "gstomxh265dec.h"
+
+GST_DEBUG_CATEGORY_STATIC (gst_omx_h265_dec_debug_category);
+#define GST_CAT_DEFAULT gst_omx_h265_dec_debug_category
+
+/* prototypes */
+static gboolean gst_omx_h265_dec_is_format_change (GstOMXVideoDec * dec,
+    GstOMXPort * port, GstVideoCodecState * state);
+static gboolean gst_omx_h265_dec_set_format (GstOMXVideoDec * dec,
+    GstOMXPort * port, GstVideoCodecState * state);
+
+enum
+{
+  PROP_0
+};
+
+/* class initialization */
+
+#define DEBUG_INIT \
+  GST_DEBUG_CATEGORY_INIT (gst_omx_h265_dec_debug_category, "omxh265dec", 0, \
+      "debug category for gst-omx video decoder base class");
+
+G_DEFINE_TYPE_WITH_CODE (GstOMXH265Dec, gst_omx_h265_dec,
+    GST_TYPE_OMX_VIDEO_DEC, DEBUG_INIT);
+
+static void
+gst_omx_h265_dec_class_init (GstOMXH265DecClass * klass)
+{
+  GstOMXVideoDecClass *videodec_class = GST_OMX_VIDEO_DEC_CLASS (klass);
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+
+  videodec_class->is_format_change =
+      GST_DEBUG_FUNCPTR (gst_omx_h265_dec_is_format_change);
+  videodec_class->set_format = GST_DEBUG_FUNCPTR (gst_omx_h265_dec_set_format);
+
+  videodec_class->cdata.default_sink_template_caps = "video/x-h265, "
+      "alignment=(string) { au }, "
+      "stream-format=(string) byte-stream, "
+      "width=(int) [1,MAX], " "height=(int) [1,MAX],"
+      "framerate = (fraction) [0/1, MAX]";
+
+  gst_element_class_set_static_metadata (element_class,
+      "OpenMAX HEVC Video Decoder",
+      "Codec/Decoder/Video",
+      "Decode HEVC video streams",
+      "Sejun Park <sejun79.park@samsung.com>");
+
+  gst_omx_set_default_role (&videodec_class->cdata, "video_decoder.hevc");
+}
+
+static void
+gst_omx_h265_dec_init (GstOMXH265Dec * self)
+{
+}
+
+static gboolean
+gst_omx_h265_dec_is_format_change (GstOMXVideoDec * dec,
+    GstOMXPort * port, GstVideoCodecState * state)
+{
+  GstCaps *old_caps = NULL;
+  GstCaps *new_caps = state->caps;
+  GstStructure *old_structure, *new_structure;
+  const gchar *old_profile, *old_level, *new_profile, *new_level;
+
+  if (dec->input_state) {
+    old_caps = dec->input_state->caps;
+  }
+
+  if (!old_caps) {
+    return FALSE;
+  }
+
+  old_structure = gst_caps_get_structure (old_caps, 0);
+  new_structure = gst_caps_get_structure (new_caps, 0);
+  old_profile = gst_structure_get_string (old_structure, "profile");
+  old_level = gst_structure_get_string (old_structure, "level");
+  new_profile = gst_structure_get_string (new_structure, "profile");
+  new_level = gst_structure_get_string (new_structure, "level");
+
+  if (g_strcmp0 (old_profile, new_profile) != 0
+      || g_strcmp0 (old_level, new_level) != 0) {
+    return TRUE;
+  }
+
+  return FALSE;
+}
+
+static gboolean
+gst_omx_h265_dec_set_format (GstOMXVideoDec * dec, GstOMXPort * port,
+    GstVideoCodecState * state)
+{
+  gboolean ret;
+  OMX_PARAM_PORTDEFINITIONTYPE port_def;
+
+  gst_omx_port_get_port_definition (port, &port_def);
+  port_def.format.video.eCompressionFormat = OMX_VIDEO_CodingHEVC;
+  ret = gst_omx_port_update_port_definition (port, &port_def) == OMX_ErrorNone;
+
+  return ret;
+}
diff --git a/omx/gstomxh265dec.h b/omx/gstomxh265dec.h
new file mode 100644 (file)
index 0000000..9c74474
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *   Author: Sejun Park <sejun79.park@samsung.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+ *
+ */
+
+#ifndef __GST_OMX_H265_DEC_H__
+#define __GST_OMX_H265_DEC_H__
+
+#include <gst/gst.h>
+#include "gstomxvideodec.h"
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_OMX_H265_DEC \
+  (gst_omx_h265_dec_get_type())
+#define GST_OMX_H265_DEC(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OMX_H265_DEC,GstOMXH265Dec))
+#define GST_OMX_H265_DEC_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OMX_H265_DEC,GstOMXH265DecClass))
+#define GST_OMX_H265_DEC_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_OMX_H265_DEC,GstOMXH265DecClass))
+#define GST_IS_OMX_H265_DEC(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OMX_H265_DEC))
+#define GST_IS_OMX_H265_DEC_CLASS(obj) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OMX_H265_DEC))
+
+typedef struct _GstOMXH265Dec GstOMXH265Dec;
+typedef struct _GstOMXH265DecClass GstOMXH265DecClass;
+
+struct _GstOMXH265Dec
+{
+  GstOMXVideoDec parent;
+};
+
+struct _GstOMXH265DecClass
+{
+  GstOMXVideoDecClass parent_class;
+};
+
+GType gst_omx_h265_dec_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_OMX_H265_DEC_H__ */
+
diff --git a/omx/gstomxh265enc.c b/omx/gstomxh265enc.c
new file mode 100644 (file)
index 0000000..d86e3bb
--- /dev/null
@@ -0,0 +1,613 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *   Author: Sejun Park <sejun79.park@samsung.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gst/gst.h>
+
+#include "gstomxh265enc.h"
+
+#ifdef USE_OMX_TARGET_RPI
+#include <OMX_Broadcom.h>
+#include <OMX_Index.h>
+#endif
+
+GST_DEBUG_CATEGORY_STATIC (gst_omx_h265_enc_debug_category);
+#define GST_CAT_DEFAULT gst_omx_h265_enc_debug_category
+
+/* prototypes */
+static gboolean gst_omx_h265_enc_set_format (GstOMXVideoEnc * enc,
+    GstOMXPort * port, GstVideoCodecState * state);
+static GstCaps *gst_omx_h265_enc_get_caps (GstOMXVideoEnc * enc,
+    GstOMXPort * port, GstVideoCodecState * state);
+static GstFlowReturn gst_omx_h265_enc_handle_output_frame (GstOMXVideoEnc *
+    self, GstOMXPort * port, GstOMXBuffer * buf, GstVideoCodecFrame * frame);
+static gboolean gst_omx_h265_enc_flush (GstVideoEncoder * enc);
+static gboolean gst_omx_h265_enc_stop (GstVideoEncoder * enc);
+static void gst_omx_h265_enc_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_omx_h265_enc_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+
+enum
+{
+  PROP_0,
+#ifdef USE_OMX_TARGET_RPI
+  PROP_INLINESPSPPSHEADERS,
+#endif
+  PROP_PERIODICITYOFIDRFRAMES,
+  PROP_INTERVALOFCODINGINTRAFRAMES
+};
+
+#ifdef USE_OMX_TARGET_RPI
+#define GST_OMX_H265_VIDEO_ENC_INLINE_SPS_PPS_HEADERS_DEFAULT      TRUE
+#endif
+#define GST_OMX_H265_VIDEO_ENC_PERIODICITY_OF_IDR_FRAMES_DEFAULT    (0xffffffff)
+#define GST_OMX_H265_VIDEO_ENC_INTERVAL_OF_CODING_INTRA_FRAMES_DEFAULT (0xffffffff)
+
+
+/* class initialization */
+
+#define DEBUG_INIT \
+  GST_DEBUG_CATEGORY_INIT (gst_omx_h265_enc_debug_category, "omxh265enc", 0, \
+      "debug category for gst-omx video encoder base class");
+
+#define parent_class gst_omx_h265_enc_parent_class
+G_DEFINE_TYPE_WITH_CODE (GstOMXH265Enc, gst_omx_h265_enc,
+    GST_TYPE_OMX_VIDEO_ENC, DEBUG_INIT);
+
+static void
+gst_omx_h265_enc_class_init (GstOMXH265EncClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+  GstVideoEncoderClass *basevideoenc_class = GST_VIDEO_ENCODER_CLASS (klass);
+  GstOMXVideoEncClass *videoenc_class = GST_OMX_VIDEO_ENC_CLASS (klass);
+
+  videoenc_class->set_format = GST_DEBUG_FUNCPTR (gst_omx_h265_enc_set_format);
+  videoenc_class->get_caps = GST_DEBUG_FUNCPTR (gst_omx_h265_enc_get_caps);
+
+  gobject_class->set_property = gst_omx_h265_enc_set_property;
+  gobject_class->get_property = gst_omx_h265_enc_get_property;
+
+#ifdef USE_OMX_TARGET_RPI
+  g_object_class_install_property (gobject_class, PROP_INLINESPSPPSHEADERS,
+      g_param_spec_boolean ("inline-header",
+          "Inline SPS/PPS headers before IDR",
+          "Inline SPS/PPS header before IDR",
+          GST_OMX_H265_VIDEO_ENC_INLINE_SPS_PPS_HEADERS_DEFAULT,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+          GST_PARAM_MUTABLE_READY));
+#endif
+
+  g_object_class_install_property (gobject_class, PROP_PERIODICITYOFIDRFRAMES,
+      g_param_spec_uint ("periodicty-idr", "Target Bitrate",
+          "Periodicity of IDR frames (0xffffffff=component default)",
+          0, G_MAXUINT,
+          GST_OMX_H265_VIDEO_ENC_PERIODICITY_OF_IDR_FRAMES_DEFAULT,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+          GST_PARAM_MUTABLE_READY));
+
+  g_object_class_install_property (gobject_class,
+      PROP_INTERVALOFCODINGINTRAFRAMES,
+      g_param_spec_uint ("interval-intraframes",
+          "Interval of coding Intra frames",
+          "Interval of coding Intra frames (0xffffffff=component default)", 0,
+          G_MAXUINT,
+          GST_OMX_H265_VIDEO_ENC_INTERVAL_OF_CODING_INTRA_FRAMES_DEFAULT,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+          GST_PARAM_MUTABLE_READY));
+
+  basevideoenc_class->flush = gst_omx_h265_enc_flush;
+  basevideoenc_class->stop = gst_omx_h265_enc_stop;
+
+  videoenc_class->cdata.default_src_template_caps = "video/x-h265, "
+      "width=(int) [ 1, MAX ], " "height=(int) [ 1, MAX ],"
+         "framerate = (fraction) [0, MAX], "
+         "stream-format=(string) { byte-stream }, "
+         "alignment=(string) au ";
+  videoenc_class->handle_output_frame =
+      GST_DEBUG_FUNCPTR (gst_omx_h265_enc_handle_output_frame);
+
+  gst_element_class_set_static_metadata (element_class,
+      "OpenMAX H.265 Video Encoder",
+      "Codec/Encoder/Video",
+      "Encode H.265 video streams",
+      "Sejun Park <sejun79.park@samsung.com>");
+
+  gst_omx_set_default_role (&videoenc_class->cdata, "video_encoder.hevc");
+}
+
+static void
+gst_omx_h265_enc_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstOMXH265Enc *self = GST_OMX_H265_ENC (object);
+
+  switch (prop_id) {
+#ifdef USE_OMX_TARGET_RPI
+    case PROP_INLINESPSPPSHEADERS:
+      self->inline_sps_pps_headers = g_value_get_boolean (value);
+      break;
+#endif
+    case PROP_PERIODICITYOFIDRFRAMES:
+      self->periodicty_idr = g_value_get_uint (value);
+      break;
+    case PROP_INTERVALOFCODINGINTRAFRAMES:
+      self->interval_intraframes = g_value_get_uint (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_omx_h265_enc_get_property (GObject * object, guint prop_id, GValue * value,
+    GParamSpec * pspec)
+{
+  GstOMXH265Enc *self = GST_OMX_H265_ENC (object);
+
+  switch (prop_id) {
+#ifdef USE_OMX_TARGET_RPI
+    case PROP_INLINESPSPPSHEADERS:
+      g_value_set_boolean (value, self->inline_sps_pps_headers);
+      break;
+#endif
+    case PROP_PERIODICITYOFIDRFRAMES:
+      g_value_set_uint (value, self->periodicty_idr);
+      break;
+    case PROP_INTERVALOFCODINGINTRAFRAMES:
+      g_value_set_uint (value, self->interval_intraframes);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_omx_h265_enc_init (GstOMXH265Enc * self)
+{
+#ifdef USE_OMX_TARGET_RPI
+  self->inline_sps_pps_headers =
+      GST_OMX_H265_VIDEO_ENC_INLINE_SPS_PPS_HEADERS_DEFAULT;
+#endif
+  self->periodicty_idr =
+      GST_OMX_H265_VIDEO_ENC_PERIODICITY_OF_IDR_FRAMES_DEFAULT;
+  self->interval_intraframes =
+      GST_OMX_H265_VIDEO_ENC_INTERVAL_OF_CODING_INTRA_FRAMES_DEFAULT;
+}
+
+static gboolean
+gst_omx_h265_enc_flush (GstVideoEncoder * enc)
+{
+  GstOMXH265Enc *self = GST_OMX_H265_ENC (enc);
+
+  g_list_free_full (self->headers, (GDestroyNotify) gst_buffer_unref);
+  self->headers = NULL;
+
+  return GST_VIDEO_ENCODER_CLASS (parent_class)->flush (enc);
+}
+
+static gboolean
+gst_omx_h265_enc_stop (GstVideoEncoder * enc)
+{
+  GstOMXH265Enc *self = GST_OMX_H265_ENC (enc);
+
+  g_list_free_full (self->headers, (GDestroyNotify) gst_buffer_unref);
+  self->headers = NULL;
+
+  return GST_VIDEO_ENCODER_CLASS (parent_class)->stop (enc);
+}
+
+static gboolean
+gst_omx_h265_enc_set_format (GstOMXVideoEnc * enc, GstOMXPort * port,
+    GstVideoCodecState * state)
+{
+  GstOMXH265Enc *self = GST_OMX_H265_ENC (enc);
+  GstCaps *peercaps;
+  OMX_PARAM_PORTDEFINITIONTYPE port_def;
+  OMX_VIDEO_PARAM_PROFILELEVELTYPE param;
+  OMX_VIDEO_CONFIG_AVCINTRAPERIOD config_avcintraperiod;
+#ifdef USE_OMX_TARGET_RPI
+  OMX_CONFIG_PORTBOOLEANTYPE config_inline_header;
+#endif
+  OMX_ERRORTYPE err;
+  const gchar *profile_string, *level_string;
+
+#ifdef USE_OMX_TARGET_RPI
+  GST_OMX_INIT_STRUCT (&config_inline_header);
+  config_inline_header.nPortIndex =
+      GST_OMX_VIDEO_ENC (self)->enc_out_port->index;
+  err =
+      gst_omx_component_get_parameter (GST_OMX_VIDEO_ENC (self)->enc,
+      OMX_IndexParamBrcmVideoAVCInlineHeaderEnable, &config_inline_header);
+  if (err != OMX_ErrorNone) {
+    GST_ERROR_OBJECT (self,
+        "can't get OMX_IndexParamBrcmVideoAVCInlineHeaderEnable %s (0x%08x)",
+        gst_omx_error_to_string (err), err);
+    return FALSE;
+  }
+
+  if (self->inline_sps_pps_headers) {
+    config_inline_header.bEnabled = OMX_TRUE;
+  } else {
+    config_inline_header.bEnabled = OMX_FALSE;
+  }
+
+  err =
+      gst_omx_component_set_parameter (GST_OMX_VIDEO_ENC (self)->enc,
+      OMX_IndexParamBrcmVideoAVCInlineHeaderEnable, &config_inline_header);
+  if (err != OMX_ErrorNone) {
+    GST_ERROR_OBJECT (self,
+        "can't set OMX_IndexParamBrcmVideoAVCInlineHeaderEnable %s (0x%08x)",
+        gst_omx_error_to_string (err), err);
+    return FALSE;
+  }
+#endif
+
+  if (self->periodicty_idr !=
+      GST_OMX_H265_VIDEO_ENC_PERIODICITY_OF_IDR_FRAMES_DEFAULT
+      || self->interval_intraframes !=
+      GST_OMX_H265_VIDEO_ENC_INTERVAL_OF_CODING_INTRA_FRAMES_DEFAULT) {
+
+
+    GST_OMX_INIT_STRUCT (&config_avcintraperiod);
+    config_avcintraperiod.nPortIndex =
+        GST_OMX_VIDEO_ENC (self)->enc_out_port->index;
+    err =
+        gst_omx_component_get_parameter (GST_OMX_VIDEO_ENC (self)->enc,
+        OMX_IndexConfigVideoAVCIntraPeriod, &config_avcintraperiod);
+    if (err != OMX_ErrorNone) {
+      GST_ERROR_OBJECT (self,
+          "can't get OMX_IndexConfigVideoAVCIntraPeriod %s (0x%08x)",
+          gst_omx_error_to_string (err), err);
+      return FALSE;
+    }
+
+    GST_DEBUG_OBJECT (self, "default nPFrames:%u, nIDRPeriod:%u",
+        (guint) config_avcintraperiod.nPFrames,
+        (guint) config_avcintraperiod.nIDRPeriod);
+
+    if (self->periodicty_idr !=
+        GST_OMX_H265_VIDEO_ENC_PERIODICITY_OF_IDR_FRAMES_DEFAULT) {
+      config_avcintraperiod.nIDRPeriod = self->periodicty_idr;
+    }
+
+    if (self->interval_intraframes !=
+        GST_OMX_H265_VIDEO_ENC_INTERVAL_OF_CODING_INTRA_FRAMES_DEFAULT) {
+      config_avcintraperiod.nPFrames = self->interval_intraframes;
+    }
+
+    err =
+        gst_omx_component_set_parameter (GST_OMX_VIDEO_ENC (self)->enc,
+        OMX_IndexConfigVideoAVCIntraPeriod, &config_avcintraperiod);
+    if (err != OMX_ErrorNone) {
+      GST_ERROR_OBJECT (self,
+          "can't set OMX_IndexConfigVideoAVCIntraPeriod %s (0x%08x)",
+          gst_omx_error_to_string (err), err);
+      return FALSE;
+    }
+  }
+
+  gst_omx_port_get_port_definition (GST_OMX_VIDEO_ENC (self)->enc_out_port,
+      &port_def);
+  port_def.format.video.eCompressionFormat = OMX_VIDEO_CodingAVC;
+  err =
+      gst_omx_port_update_port_definition (GST_OMX_VIDEO_ENC
+      (self)->enc_out_port, &port_def);
+  if (err != OMX_ErrorNone)
+    return FALSE;
+
+  GST_OMX_INIT_STRUCT (&param);
+  param.nPortIndex = GST_OMX_VIDEO_ENC (self)->enc_out_port->index;
+
+  err =
+      gst_omx_component_get_parameter (GST_OMX_VIDEO_ENC (self)->enc,
+      OMX_IndexParamVideoProfileLevelCurrent, &param);
+  if (err != OMX_ErrorNone) {
+    GST_WARNING_OBJECT (self,
+        "Setting profile/level not supported by component");
+    return TRUE;
+  }
+
+  peercaps = gst_pad_peer_query_caps (GST_VIDEO_ENCODER_SRC_PAD (enc),
+      gst_pad_get_pad_template_caps (GST_VIDEO_ENCODER_SRC_PAD (enc)));
+  if (peercaps) {
+    GstStructure *s;
+
+    if (gst_caps_is_empty (peercaps)) {
+      gst_caps_unref (peercaps);
+      GST_ERROR_OBJECT (self, "Empty caps");
+      return FALSE;
+    }
+
+    s = gst_caps_get_structure (peercaps, 0);
+    profile_string = gst_structure_get_string (s, "profile");
+    if (profile_string) {
+      if (g_str_equal (profile_string, "main")) {
+        param.eProfile = OMX_VIDEO_HEVCProfileMain;
+      } else if (g_str_equal (profile_string, "main-10")) {
+        param.eProfile = OMX_VIDEO_HEVCProfileMain10;
+      } else {
+        goto unsupported_profile;
+      }
+    }
+    level_string = gst_structure_get_string (s, "level");
+    if (level_string) {
+      if (g_str_equal (level_string, "main1")) {
+        param.eLevel = OMX_VIDEO_HEVCMainTierLevel1;
+      } else if (g_str_equal (level_string, "high1")) {
+        param.eLevel = OMX_VIDEO_HEVCHighTierLevel1;
+      } else if (g_str_equal (level_string, "main2")) {
+        param.eLevel = OMX_VIDEO_HEVCMainTierLevel2;
+      } else if (g_str_equal (level_string, "high2")) {
+        param.eLevel = OMX_VIDEO_HEVCHighTierLevel2;
+      } else if (g_str_equal (level_string, "main2.1")) {
+        param.eLevel = OMX_VIDEO_HEVCMainTierLevel21;
+      } else if (g_str_equal (level_string, "high2.1")) {
+        param.eLevel = OMX_VIDEO_HEVCHighTierLevel21;
+      } else if (g_str_equal (level_string, "main3")) {
+        param.eLevel = OMX_VIDEO_HEVCMainTierLevel3;
+      } else if (g_str_equal (level_string, "high3")) {
+        param.eLevel = OMX_VIDEO_HEVCHighTierLevel3;
+      } else if (g_str_equal (level_string, "main3.1")) {
+        param.eLevel = OMX_VIDEO_HEVCMainTierLevel31;
+      } else if (g_str_equal (level_string, "high3.1")) {
+        param.eLevel = OMX_VIDEO_HEVCHighTierLevel31;
+      } else if (g_str_equal (level_string, "main4")) {
+        param.eLevel = OMX_VIDEO_HEVCMainTierLevel4;
+      } else if (g_str_equal (level_string, "high4")) {
+        param.eLevel = OMX_VIDEO_HEVCHighTierLevel4;
+      } else if (g_str_equal (level_string, "main4.1")) {
+        param.eLevel = OMX_VIDEO_HEVCMainTierLevel41;
+      } else if (g_str_equal (level_string, "high4.1")) {
+        param.eLevel = OMX_VIDEO_HEVCHighTierLevel41;
+      } else if (g_str_equal (level_string, "main5")) {
+        param.eLevel = OMX_VIDEO_HEVCMainTierLevel5;
+      } else if (g_str_equal (level_string, "high5")) {
+        param.eLevel = OMX_VIDEO_HEVCHighTierLevel5;
+      } else if (g_str_equal (level_string, "main5.1")) {
+        param.eLevel = OMX_VIDEO_HEVCMainTierLevel51;
+      } else if (g_str_equal (level_string, "high5.1")) {
+        param.eLevel = OMX_VIDEO_HEVCHighTierLevel51;
+      } else if (g_str_equal (level_string, "main5.2")) {
+        param.eLevel = OMX_VIDEO_HEVCMainTierLevel52;
+      } else if (g_str_equal (level_string, "high5.2")) {
+        param.eLevel = OMX_VIDEO_HEVCHighTierLevel52;
+      } else if (g_str_equal (level_string, "main6")) {
+        param.eLevel = OMX_VIDEO_HEVCMainTierLevel6;
+      } else if (g_str_equal (level_string, "high6")) {
+        param.eLevel = OMX_VIDEO_HEVCHighTierLevel6;
+      } else if (g_str_equal (level_string, "main61")) {
+        param.eLevel = OMX_VIDEO_HEVCMainTierLevel61;
+      } else if (g_str_equal (level_string, "high61")) {
+        param.eLevel = OMX_VIDEO_HEVCHighTierLevel61;
+      } else if (g_str_equal (level_string, "main62")) {
+        param.eLevel = OMX_VIDEO_HEVCMainTierLevel62;
+      } else if (g_str_equal (level_string, "high62")) {
+        param.eLevel = OMX_VIDEO_HEVCHighTierLevel62;
+      } else {
+        goto unsupported_level;
+      }
+    }
+    gst_caps_unref (peercaps);
+  }
+
+  err =
+      gst_omx_component_set_parameter (GST_OMX_VIDEO_ENC (self)->enc,
+      OMX_IndexParamVideoProfileLevelCurrent, &param);
+  if (err == OMX_ErrorUnsupportedIndex) {
+    GST_WARNING_OBJECT (self,
+        "Setting profile/level not supported by component");
+  } else if (err != OMX_ErrorNone) {
+    GST_ERROR_OBJECT (self,
+        "Error setting profile %u and level %u: %s (0x%08x)",
+        (guint) param.eProfile, (guint) param.eLevel,
+        gst_omx_error_to_string (err), err);
+    return FALSE;
+  }
+
+  return TRUE;
+
+unsupported_profile:
+  GST_ERROR_OBJECT (self, "Unsupported profile %s", profile_string);
+  gst_caps_unref (peercaps);
+  return FALSE;
+
+unsupported_level:
+  GST_ERROR_OBJECT (self, "Unsupported level %s", level_string);
+  gst_caps_unref (peercaps);
+  return FALSE;
+}
+
+static GstCaps *
+gst_omx_h265_enc_get_caps (GstOMXVideoEnc * enc, GstOMXPort * port,
+    GstVideoCodecState * state)
+{
+  GstOMXH265Enc *self = GST_OMX_H265_ENC (enc);
+  GstCaps *caps;
+  OMX_ERRORTYPE err;
+  OMX_VIDEO_PARAM_PROFILELEVELTYPE param;
+  const gchar *profile, *level;
+
+  caps = gst_caps_new_simple ("video/x-h265",
+      "stream-format", G_TYPE_STRING, "byte-stream",
+      "alignment", G_TYPE_STRING, "au", NULL);
+
+  GST_OMX_INIT_STRUCT (&param);
+  param.nPortIndex = GST_OMX_VIDEO_ENC (self)->enc_out_port->index;
+
+  err =
+      gst_omx_component_get_parameter (GST_OMX_VIDEO_ENC (self)->enc,
+      OMX_IndexParamVideoProfileLevelCurrent, &param);
+  if (err != OMX_ErrorNone && err != OMX_ErrorUnsupportedIndex)
+    return NULL;
+
+  if (err == OMX_ErrorNone) {
+    switch (param.eProfile) {
+      case OMX_VIDEO_HEVCProfileMain:
+        profile = "main";
+        break;
+      case OMX_VIDEO_HEVCProfileMain10:
+        profile = "main-10";
+        break;
+      default:
+        g_assert_not_reached ();
+        return NULL;
+    }
+
+    switch (param.eLevel) {
+      case OMX_VIDEO_HEVCMainTierLevel1:
+        level = "main1";
+        break;
+      case OMX_VIDEO_HEVCHighTierLevel1:
+        level = "high1";
+        break;
+      case OMX_VIDEO_HEVCMainTierLevel2:
+        level = "main2";
+        break;
+      case OMX_VIDEO_HEVCHighTierLevel2:
+        level = "high2";
+        break;
+      case OMX_VIDEO_HEVCMainTierLevel21:
+        level = "main2.1";
+        break;
+      case OMX_VIDEO_HEVCHighTierLevel21:
+        level = "high2.1";
+        break;
+      case OMX_VIDEO_HEVCMainTierLevel3:
+        level = "main3";
+        break;
+      case OMX_VIDEO_HEVCHighTierLevel3:
+        level = "high3";
+        break;
+      case OMX_VIDEO_HEVCMainTierLevel31:
+        level = "main3.1";
+        break;
+      case OMX_VIDEO_HEVCHighTierLevel31:
+        level = "high3.1";
+        break;
+      case OMX_VIDEO_HEVCMainTierLevel4:
+        level = "main4";
+        break;
+      case OMX_VIDEO_HEVCHighTierLevel4:
+        level = "high4";
+        break;
+      case OMX_VIDEO_HEVCMainTierLevel41:
+        level = "main4.1";
+        break;
+      case OMX_VIDEO_HEVCHighTierLevel41:
+        level = "high4.1";
+        break;
+      case OMX_VIDEO_HEVCMainTierLevel5:
+        level = "main5";
+        break;
+      case OMX_VIDEO_HEVCHighTierLevel5:
+        level = "high5";
+        break;
+      case OMX_VIDEO_HEVCMainTierLevel51:
+        level = "main5.1";
+        break;
+      case OMX_VIDEO_HEVCHighTierLevel51:
+        level = "high5.1";
+        break;
+      case OMX_VIDEO_HEVCMainTierLevel52:
+        level = "main5.2";
+        break;
+      case OMX_VIDEO_HEVCHighTierLevel52:
+        level = "high5.2";
+        break;
+      case OMX_VIDEO_HEVCMainTierLevel6:
+        level = "main6";
+        break;
+      case OMX_VIDEO_HEVCHighTierLevel6:
+        level = "high6";
+        break;
+      case OMX_VIDEO_HEVCMainTierLevel61:
+        level = "main6.1";
+        break;
+      case OMX_VIDEO_HEVCHighTierLevel61:
+        level = "high6.1";
+        break;
+      case OMX_VIDEO_HEVCMainTierLevel62:
+        level = "main6.2";
+        break;
+      case OMX_VIDEO_HEVCHighTierLevel62:
+        level = "high6.2";
+        break;
+      default:
+        g_assert_not_reached ();
+        return NULL;
+    }
+
+    gst_caps_set_simple (caps,
+        "profile", G_TYPE_STRING, profile, "level", G_TYPE_STRING, level, NULL);
+  }
+
+  return caps;
+}
+
+static GstFlowReturn
+gst_omx_h265_enc_handle_output_frame (GstOMXVideoEnc * enc, GstOMXPort * port,
+    GstOMXBuffer * buf, GstVideoCodecFrame * frame)
+{
+  GstOMXH265Enc *self = GST_OMX_H265_ENC (enc);
+
+  if (buf->omx_buf->nFlags & OMX_BUFFERFLAG_CODECCONFIG) {
+    /* The codec data is SPS/PPS with a startcode => bytestream stream format
+     * For bytestream stream format the SPS/PPS is only in-stream and not
+     * in the caps!
+     */
+    if (buf->omx_buf->nFilledLen >= 4 &&
+        GST_READ_UINT32_BE (buf->omx_buf->pBuffer +
+            buf->omx_buf->nOffset) == 0x00000001) {
+      GstBuffer *hdrs;
+      GstMapInfo map = GST_MAP_INFO_INIT;
+
+      GST_DEBUG_OBJECT (self, "got codecconfig in byte-stream format");
+
+      hdrs = gst_buffer_new_and_alloc (buf->omx_buf->nFilledLen);
+
+      gst_buffer_map (hdrs, &map, GST_MAP_WRITE);
+      memcpy (map.data,
+          buf->omx_buf->pBuffer + buf->omx_buf->nOffset,
+          buf->omx_buf->nFilledLen);
+      gst_buffer_unmap (hdrs, &map);
+      self->headers = g_list_append (self->headers, hdrs);
+
+      if (frame)
+        gst_video_codec_frame_unref (frame);
+
+      return GST_FLOW_OK;
+    }
+  } else if (self->headers) {
+    gst_video_encoder_set_headers (GST_VIDEO_ENCODER (self), self->headers);
+    self->headers = NULL;
+  }
+
+  return
+      GST_OMX_VIDEO_ENC_CLASS
+      (gst_omx_h265_enc_parent_class)->handle_output_frame (enc, port, buf,
+      frame);
+}
diff --git a/omx/gstomxh265enc.h b/omx/gstomxh265enc.h
new file mode 100644 (file)
index 0000000..0c34918
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *   Author: Sejun Park <sejun79.park@samsung.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+ *
+ */
+
+#ifndef __GST_OMX_H265_ENC_H__
+#define __GST_OMX_H265_ENC_H__
+
+#include <gst/gst.h>
+#include "gstomxvideoenc.h"
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_OMX_H265_ENC \
+  (gst_omx_h265_enc_get_type())
+#define GST_OMX_H265_ENC(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OMX_H265_ENC,GstOMXH265Enc))
+#define GST_OMX_H265_ENC_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OMX_H265_ENC,GstOMXH265EncClass))
+#define GST_OMX_H265_ENC_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_OMX_H265_ENC,GstOMXH265EncClass))
+#define GST_IS_OMX_H265_ENC(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OMX_H265_ENC))
+#define GST_IS_OMX_H265_ENC_CLASS(obj) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OMX_H265_ENC))
+
+typedef struct _GstOMXH265Enc GstOMXH265Enc;
+typedef struct _GstOMXH265EncClass GstOMXH265EncClass;
+
+struct _GstOMXH265Enc
+{
+  GstOMXVideoEnc parent;
+
+#ifdef USE_OMX_TARGET_RPI
+  gboolean inline_sps_pps_headers;
+#endif
+  guint32 periodicty_idr;
+  guint32 interval_intraframes;
+
+  GList *headers;
+};
+
+struct _GstOMXH265EncClass
+{
+  GstOMXVideoEncClass parent_class;
+};
+
+GType gst_omx_h265_enc_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_OMX_H265_ENC_H__ */
+
index 9eb6769..b4b7247 100755 (executable)
@@ -45,7 +45,11 @@ gst_omx_video_get_format_from_omx (OMX_COLOR_FORMATTYPE omx_colorformat)
       format = GST_VIDEO_FORMAT_I420;
       break;
     case OMX_COLOR_FormatYUV420SemiPlanar:
+#ifdef TIZEN_FEATURE_OMX
+      format = GST_VIDEO_FORMAT_SN12;
+#else
       format = GST_VIDEO_FORMAT_NV12;
+#endif
       break;
     case OMX_COLOR_FormatYUV422SemiPlanar:
       format = GST_VIDEO_FORMAT_NV16;
@@ -75,10 +79,13 @@ gst_omx_video_get_format_from_omx (OMX_COLOR_FORMATTYPE omx_colorformat)
     case OMX_COLOR_Format16bitBGR565:
       format = GST_VIDEO_FORMAT_BGR16;
       break;
-#ifdef GST_TIZEN_MODIFICATION
-    case OMX_EXT_COLOR_FormatNV12TPhysicalAddress:
+#ifdef TIZEN_FEATURE_OMX
+    case OMX_EXT_COLOR_FormatNV12LPhysicalAddress:
       format = GST_VIDEO_FORMAT_SN12;
       break;
+    case OMX_EXT_COLOR_FormatNV12TPhysicalAddress:
+      format = GST_VIDEO_FORMAT_ST12;
+      break;
 #endif
     default:
       format = GST_VIDEO_FORMAT_UNKNOWN;
index 7082bb8..d04daf7 100755 (executable)
@@ -46,6 +46,7 @@
 #pragma GCC diagnostic pop
 #endif
 
+//#define CODEC_DEC_INTPUT_DUMP
 //#define CODEC_DEC_OUTPUT_DUMP
 #include <stdio.h>
 #include <string.h>
@@ -84,6 +85,11 @@ static OMX_ERRORTYPE gst_omx_video_dec_allocate_output_buffers (GstOMXVideoDec *
 static OMX_ERRORTYPE gst_omx_video_dec_deallocate_output_buffers (GstOMXVideoDec
     * self);
 
+#ifdef TIZEN_FEATURE_OMX
+static gboolean gst_omx_video_dec_acquire_request_flush_buffer (GstOMXVideoDec * self, GstBuffer ** flush_request_buffer);
+static gboolean gst_omx_video_dec_handle_event (GstVideoDecoder * decoder, GstEvent *event);
+#endif
+
 enum
 {
   PROP_0
@@ -124,6 +130,10 @@ gst_omx_video_dec_class_init (GstOMXVideoDecClass * klass)
   video_decoder_class->decide_allocation =
       GST_DEBUG_FUNCPTR (gst_omx_video_dec_decide_allocation);
 
+#ifdef TIZEN_FEATURE_OMX
+  video_decoder_class->sink_event = GST_DEBUG_FUNCPTR (gst_omx_video_dec_handle_event);
+#endif
+
   klass->cdata.type = GST_OMX_COMPONENT_TYPE_FILTER;
   klass->cdata.default_src_template_caps =
 #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)
@@ -132,7 +142,8 @@ gst_omx_video_dec_class_init (GstOMXVideoDecClass * klass)
 #endif
       "video/x-raw, "
       "width = " GST_VIDEO_SIZE_RANGE ", "
-      "height = " GST_VIDEO_SIZE_RANGE ", " "framerate = " GST_VIDEO_FPS_RANGE;
+         "height = " GST_VIDEO_SIZE_RANGE ", " "framerate = " GST_VIDEO_FPS_RANGE ", "
+      "format = (string)SN12";
 }
 
 static void
@@ -146,8 +157,8 @@ gst_omx_video_dec_init (GstOMXVideoDec * self)
   g_mutex_init (&self->drain_lock);
   g_cond_init (&self->drain_cond);
 
-#ifdef GST_TIZEN_MODIFICATION
-  self->hTBMBufMgr = NULL;
+#ifdef TIZEN_FEATURE_OMX
+  self->bufmgr = NULL;
   self->drm_fd = -1;
 #endif
 }
@@ -199,20 +210,49 @@ gst_omx_video_dec_open (GstVideoDecoder * decoder)
       out_port_index = param.nStartPortNumber + 1;
     }
   }
+
   self->dec_in_port = gst_omx_component_add_port (self->dec, in_port_index);
   self->dec_out_port = gst_omx_component_add_port (self->dec, out_port_index);
 
   if (!self->dec_in_port || !self->dec_out_port)
     return FALSE;
 
-#ifdef GST_TIZEN_MODIFICATION
-
-   self->hTBMBufMgr = tbm_bufmgr_init(self->drm_fd);
-   if(self->hTBMBufMgr == NULL){
+#ifdef TIZEN_FEATURE_OMX
+  self->bufmgr = tbm_bufmgr_init(self->drm_fd);
+  if (self->bufmgr == NULL) {
     GST_ERROR_OBJECT (self, "TBM initialization failed.");
     return FALSE;
-   }
+  }
+
+#if defined(USE_OMX_TARGET_EXYNOS) || defined(USE_OMX_TARGET_EXYNOS64)
+  {
+    /* set plateform specific gem buffer settings. */
+    OMX_ERRORTYPE err;
+    EnableGemBuffersParams gem_param;
+    OMX_INDEXTYPE index = OMX_IndexComponentStartUnused;
+
+    err = gst_omx_component_get_extension_index (self->dec, (OMX_STRING) EXYNOS_INDEX_PARAM_STORE_METADATA_BUFFER, &index);
+    if (err != OMX_ErrorNone) {
+      GST_WARNING_OBJECT (self, "Failed to get extension index : %s (0x%08x)",
+          gst_omx_error_to_string (err), err);
+    }
+
+    OMX_INIT_PARAM (gem_param);
+    gem_param.enable = OMX_TRUE;
+    gem_param.nPortIndex = 1;
+
+    err = gst_omx_component_set_parameter(self->dec, index, &gem_param);
+    if (err != OMX_ErrorNone) {
+      GST_ERROR_OBJECT (self, "Failed to set platform specific buffer: %s (0x%08x)",
+          gst_omx_error_to_string (err), err);
+    }
+
+    self->dec_in_port->use_buffer = klass->cdata.in_port_usebuffer;
+    self->dec_out_port->use_buffer = klass->cdata.out_port_usebuffer;
+  }
 #endif
+#endif
+
   GST_DEBUG_OBJECT (self, "Opened decoder");
 
 #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)
@@ -293,7 +333,7 @@ gst_omx_video_dec_shutdown (GstOMXVideoDec * self)
     }
   }
 
-  /* Otherwise we didn't use EGL and just fall back to 
+  /* Otherwise we didn't use EGL and just fall back to
    * shutting down the decoder */
 #endif
 
@@ -310,11 +350,11 @@ gst_omx_video_dec_shutdown (GstOMXVideoDec * self)
       gst_omx_component_get_state (self->dec, 5 * GST_SECOND);
   }
 
-#ifdef GST_TIZEN_MODIFICATION
+#ifdef TIZEN_FEATURE_OMX
    /* uninitialize tbm buffer manager */
-   if(self->hTBMBufMgr != NULL){
-    tbm_bufmgr_deinit(self->hTBMBufMgr);
-    self->hTBMBufMgr = NULL;
+   if(self->bufmgr != NULL){
+    tbm_bufmgr_deinit(self->bufmgr);
+    self->bufmgr = NULL;
    }
 
    if(self->drm_fd != -1) {
@@ -410,9 +450,6 @@ gst_omx_video_dec_change_state (GstElement * element, GstStateChange transition)
       break;
   }
 
-  if (ret == GST_STATE_CHANGE_FAILURE)
-    return ret;
-
   ret =
       GST_ELEMENT_CLASS (gst_omx_video_dec_parent_class)->change_state
       (element, transition);
@@ -439,6 +476,25 @@ gst_omx_video_dec_change_state (GstElement * element, GstStateChange transition)
   return ret;
 }
 
+#ifdef CODEC_DEC_INTPUT_DUMP /* for decoder input dump */
+static inline void
+decoder_input_dump (GstOMXBuffer * buf, gboolean use_buffer)
+{
+  gchar *temp;
+  gchar filename[100]={0};
+  FILE *fp = NULL;
+
+  temp = use_buffer ? buf->mm_vbuffer->data[0] : buf->omx_buf->pBuffer;
+
+  sprintf(filename, "/tmp/dec_input_dump.out");
+  fp = fopen(filename, "ab");
+
+  fwrite(temp, buf->omx_buf->nFilledLen, 1, fp);
+
+  fclose(fp);
+}
+#endif
+
 #ifdef CODEC_DEC_OUTPUT_DUMP /* for decoder output dump */
 static inline void
 decoder_output_dump(GstOMXVideoDec *self, MMVideoBuffer *outbuf)
@@ -451,7 +507,7 @@ decoder_output_dump(GstOMXVideoDec *self, MMVideoBuffer *outbuf)
 
   GST_ERROR_OBJECT (self, "codec dec output dump start. w = %d, h = %d", outbuf->width[0], outbuf->height[0]);
 
-  sprintf(filename, "/tmp/dec_output_dump_%d_%d.yuv", outbuf->stride_width[0], outbuf->height[0]);
+  sprintf(filename, "/tmp/dec_output_dump_%d_%d.yuv", outbuf->width[0], outbuf->height[0]);
   fp = fopen(filename, "ab");
 
   for (i = 0; i < outbuf->height[0]; i++) {
@@ -480,7 +536,9 @@ gst_omx_video_dec_fill_buffer (GstOMXVideoDec * self,
   GstVideoInfo *vinfo = &state->info;
   OMX_PARAM_PORTDEFINITIONTYPE *port_def = &self->dec_out_port->port_def;
   gboolean ret = FALSE;
+#ifndef TIZEN_FEATURE_OMX
   GstVideoFrame frame;
+#endif
 
   if (vinfo->width != port_def->format.video.nFrameWidth ||
       vinfo->height != port_def->format.video.nFrameHeight) {
@@ -492,7 +550,7 @@ gst_omx_video_dec_fill_buffer (GstOMXVideoDec * self,
   }
 
   /* Same strides and everything */
-#if 0  //ENS:a
+#ifndef TIZEN_FEATURE_OMX
   if (gst_buffer_get_size (outbuf) == inbuf->omx_buf->nFilledLen) {
     GstMapInfo map = GST_MAP_INFO_INIT;
 
@@ -511,102 +569,105 @@ gst_omx_video_dec_fill_buffer (GstOMXVideoDec * self,
 #endif  //ENS:a
 
   /* Different strides */
+#ifndef TIZEN_FEATURE_OMX
   if (gst_video_frame_map (&frame, vinfo, outbuf, GST_MAP_WRITE)) {
-    const guint nstride = port_def->format.video.nStride;
-    const guint nslice = port_def->format.video.nSliceHeight;
-    guint src_stride[GST_VIDEO_MAX_PLANES] = { nstride, 0, };
-    guint src_size[GST_VIDEO_MAX_PLANES] = { nstride * nslice, 0, };
-    gint dst_width[GST_VIDEO_MAX_PLANES] = { 0, };
-    gint dst_height[GST_VIDEO_MAX_PLANES] =
-        { GST_VIDEO_INFO_HEIGHT (vinfo), 0, };
-    const guint8 *src;
-    guint p;
-
-    switch (GST_VIDEO_INFO_FORMAT (vinfo)) {
-      case GST_VIDEO_FORMAT_ABGR:
-      case GST_VIDEO_FORMAT_ARGB:
-        dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo) * 4;
-        break;
-      case GST_VIDEO_FORMAT_RGB16:
-      case GST_VIDEO_FORMAT_BGR16:
-      case GST_VIDEO_FORMAT_YUY2:
-      case GST_VIDEO_FORMAT_UYVY:
-      case GST_VIDEO_FORMAT_YVYU:
-        dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo) * 2;
-        break;
-      case GST_VIDEO_FORMAT_GRAY8:
-        dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo);
-        break;
-      case GST_VIDEO_FORMAT_I420:
-        dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo);
-        src_stride[1] = nstride / 2;
-        src_size[1] = (src_stride[1] * nslice) / 2;
-        dst_width[1] = GST_VIDEO_INFO_WIDTH (vinfo) / 2;
-        dst_height[1] = GST_VIDEO_INFO_HEIGHT (vinfo) / 2;
-        src_stride[2] = nstride / 2;
-        src_size[2] = (src_stride[1] * nslice) / 2;
-        dst_width[2] = GST_VIDEO_INFO_WIDTH (vinfo) / 2;
-        dst_height[2] = GST_VIDEO_INFO_HEIGHT (vinfo) / 2;
-        break;
-      case GST_VIDEO_FORMAT_NV12:
-        dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo);
-        src_stride[1] = nstride;
-        src_size[1] = src_stride[1] * nslice / 2;
-        dst_width[1] = GST_VIDEO_INFO_WIDTH (vinfo);
-        dst_height[1] = GST_VIDEO_INFO_HEIGHT (vinfo) / 2;
-        break;
-      case GST_VIDEO_FORMAT_NV16:
-        dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo);
-        src_stride[1] = nstride;
-        src_size[1] = src_stride[1] * nslice;
-        dst_width[1] = GST_VIDEO_INFO_WIDTH (vinfo);
-        dst_height[1] = GST_VIDEO_INFO_HEIGHT (vinfo);
-        break;
-      case GST_VIDEO_FORMAT_SN12:
-      case GST_VIDEO_FORMAT_ST12:{
-        GstMemory *mem_imgb = NULL;
-        void *imgb_data = NULL;
-#ifdef GST_TIZEN_MODIFICATION
-        MMVideoBuffer *mm_vbuffer = NULL;
-        mm_vbuffer = (MMVideoBuffer*)(inbuf->omx_buf->pBuffer);
-        mm_vbuffer->type = MM_VIDEO_BUFFER_TYPE_TBM_BO;
-
-        if (mm_vbuffer->type == MM_VIDEO_BUFFER_TYPE_TBM_BO) {
-          GST_LOG_OBJECT (self, "dec output buf: fd[0]:%d  fd[1]:%d fd[2]:%d  w[0]:%d h[0]:%d  buf_share_method:%d",
-                  mm_vbuffer->handle.dmabuf_fd[0], mm_vbuffer->handle.dmabuf_fd[1], mm_vbuffer->handle.dmabuf_fd[2],
-                  mm_vbuffer->width[0], mm_vbuffer->height[0], mm_vbuffer->type);
-        } else if (mm_vbuffer->type == MM_VIDEO_BUFFER_TYPE_PHYSICAL_ADDRESS) {
-          GST_LOG_OBJECT (self, "dec output uses hw addr");
-        } else {
-          GST_WARNING_OBJECT (self, "dec output buf has TBM_BO buf_share_method");
-        }
+  const guint nstride = port_def->format.video.nStride;
+  const guint nslice = port_def->format.video.nSliceHeight;
+  guint src_stride[GST_VIDEO_MAX_PLANES] = { nstride, 0, };
+  guint src_size[GST_VIDEO_MAX_PLANES] = { nstride * nslice, 0, };
+  gint dst_width[GST_VIDEO_MAX_PLANES] = { 0, };
+  gint dst_height[GST_VIDEO_MAX_PLANES] =
+      { GST_VIDEO_INFO_HEIGHT (vinfo), 0, };
+  const guint8 *src;
+  guint p;
+#endif
+
+  switch (GST_VIDEO_INFO_FORMAT (vinfo)) {
+#ifndef TIZEN_FEATURE_OMX
+    case GST_VIDEO_FORMAT_ABGR:
+    case GST_VIDEO_FORMAT_ARGB:
+      dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo) * 4;
+      break;
+    case GST_VIDEO_FORMAT_RGB16:
+    case GST_VIDEO_FORMAT_BGR16:
+    case GST_VIDEO_FORMAT_YUY2:
+    case GST_VIDEO_FORMAT_UYVY:
+    case GST_VIDEO_FORMAT_YVYU:
+      dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo) * 2;
+      break;
+    case GST_VIDEO_FORMAT_GRAY8:
+      dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo);
+      break;
+    case GST_VIDEO_FORMAT_I420:
+      dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo);
+      src_stride[1] = nstride / 2;
+      src_size[1] = (src_stride[1] * nslice) / 2;
+      dst_width[1] = GST_VIDEO_INFO_WIDTH (vinfo) / 2;
+      dst_height[1] = GST_VIDEO_INFO_HEIGHT (vinfo) / 2;
+      src_stride[2] = nstride / 2;
+      src_size[2] = (src_stride[1] * nslice) / 2;
+      dst_width[2] = GST_VIDEO_INFO_WIDTH (vinfo) / 2;
+      dst_height[2] = GST_VIDEO_INFO_HEIGHT (vinfo) / 2;
+      break;
+    case GST_VIDEO_FORMAT_NV12:
+      dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo);
+      src_stride[1] = nstride;
+      src_size[1] = src_stride[1] * nslice / 2;
+      dst_width[1] = GST_VIDEO_INFO_WIDTH (vinfo);
+      dst_height[1] = GST_VIDEO_INFO_HEIGHT (vinfo) / 2;
+      break;
+    case GST_VIDEO_FORMAT_NV16:
+      dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo);
+      src_stride[1] = nstride;
+      src_size[1] = src_stride[1] * nslice;
+      dst_width[1] = GST_VIDEO_INFO_WIDTH (vinfo);
+      dst_height[1] = GST_VIDEO_INFO_HEIGHT (vinfo);
+      break;
+#endif
+#ifdef TIZEN_FEATURE_OMX
+    case GST_VIDEO_FORMAT_SN12:
+    case GST_VIDEO_FORMAT_ST12: {
+      GstMemory *mem = NULL;
+      void *data = NULL;
+      MMVideoBuffer *mm_vbuffer = NULL;
+      mm_vbuffer = (MMVideoBuffer*)(inbuf->omx_buf->pBuffer);
+
+      if (mm_vbuffer->type == MM_VIDEO_BUFFER_TYPE_TBM_BO) {
+        GST_LOG_OBJECT (self, "dec output buf: bo[0] :%p, bo[1] : %p, fd[0]:%d  fd[1]:%d fd[2]:%d  w[0]:%d h[0]:%d  buf_share_method:%d",
+            mm_vbuffer->handle.bo[0], mm_vbuffer->handle.bo[1], mm_vbuffer->handle.dmabuf_fd[0], mm_vbuffer->handle.dmabuf_fd[1], mm_vbuffer->handle.dmabuf_fd[2],
+            mm_vbuffer->width[0], mm_vbuffer->height[0], mm_vbuffer->type);
+      } else if (mm_vbuffer->type == MM_VIDEO_BUFFER_TYPE_PHYSICAL_ADDRESS) {
+        GST_LOG_OBJECT (self, "dec output uses hw addr");
+      } else {
+        GST_WARNING_OBJECT (self, "dec output buf has TBM_BO buf_share_method");
+      }
 #ifdef CODEC_DEC_OUTPUT_DUMP
-       decoder_output_dump(self, mm_vbuffer);
-#endif
-#endif
-        if (gst_buffer_n_memory(outbuf) < 2) {
-            imgb_data = g_malloc0(sizeof(*mm_vbuffer));
-            mem_imgb = gst_memory_new_wrapped(0, imgb_data, sizeof(*mm_vbuffer), 0, sizeof(*mm_vbuffer), imgb_data, g_free);
-            gst_buffer_append_memory(outbuf, mem_imgb);
-        } else {
-            GstMapInfo imgb_info = GST_MAP_INFO_INIT;
-            mem_imgb = gst_buffer_peek_memory(outbuf, 1);
-            gst_memory_map(mem_imgb, &imgb_info, GST_MAP_WRITE);
-            imgb_data = imgb_info.data;
-            gst_memory_unmap(mem_imgb, &imgb_info);
-        }
-#ifdef GST_TIZEN_MODIFICATION
-        memcpy(imgb_data, mm_vbuffer, sizeof(MMVideoBuffer));
+     decoder_output_dump(self, mm_vbuffer);
 #endif
-        ret = TRUE;
-        break;
+      if (gst_buffer_n_memory (outbuf) < 2) {
+        data = g_malloc0 (sizeof (MMVideoBuffer));
+        mem = gst_memory_new_wrapped (0, data, sizeof (MMVideoBuffer), 0, sizeof (MMVideoBuffer), data, g_free);
+        gst_buffer_append_memory (outbuf, mem);
+      } else {
+        GstMapInfo info = GST_MAP_INFO_INIT;
+
+        mem = gst_buffer_peek_memory (outbuf, 1);
+        gst_memory_map (mem, &info, GST_MAP_WRITE);
+        data = info.data;
+        gst_memory_unmap (mem, &info);
+      }
+      memcpy (data, mm_vbuffer, sizeof (MMVideoBuffer));
+
+      ret = TRUE;
+      break;
     }
+#endif
 
       default:
         g_assert_not_reached ();
         break;
     }
-
+#ifndef TIZEN_FEATURE_OMX
     src = inbuf->omx_buf->pBuffer + inbuf->omx_buf->nOffset;
     for (p = 0; p < GST_VIDEO_INFO_N_PLANES (vinfo); p++) {
       const guint8 *data;
@@ -622,13 +683,16 @@ gst_omx_video_dec_fill_buffer (GstOMXVideoDec * self,
       }
       src += src_size[p];
     }
+#endif
 
+#ifndef TIZEN_FEATURE_OMX
     gst_video_frame_unmap (&frame);
     ret = TRUE;
   } else {
     GST_ERROR_OBJECT (self, "Can't map output buffer to frame");
     goto done;
   }
+#endif
 
 done:
   if (ret) {
@@ -890,9 +954,8 @@ gst_omx_video_dec_allocate_output_buffers (GstOMXVideoDec * self)
       }
       was_enabled = FALSE;
     }
-#ifdef GST_TIZEN_MODIFICATION
-    err = gst_omx_port_tbm_allocate_dec_buffers(port, self->hTBMBufMgr,
-      self->dec_in_port->port_def.format.video.eCompressionFormat);
+#ifdef TIZEN_FEATURE_OMX
+    err = gst_omx_port_tbm_allocate_dec_buffers (port, self->bufmgr, port->use_buffer);
 #else
     err = gst_omx_port_allocate_buffers (port);
 #endif
@@ -926,9 +989,8 @@ gst_omx_video_dec_allocate_output_buffers (GstOMXVideoDec * self)
           goto done;
         }
       }
-#ifdef GST_TIZEN_MODIFICATION
-      err = gst_omx_port_tbm_allocate_dec_buffers(port, self->hTBMBufMgr,
-          self->dec_in_port->port_def.format.video.eCompressionFormat);
+#ifdef TIZEN_FEATURE_OMX
+      err = gst_omx_port_tbm_allocate_dec_buffers (port, self->bufmgr, port->use_buffer);
 #else
       err = gst_omx_port_allocate_buffers (port);
 #endif
@@ -1359,6 +1421,16 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
   GstOMXAcquireBufferReturn acq_return;
   GstClockTimeDiff deadline;
   OMX_ERRORTYPE err;
+#ifdef TIZEN_FEATURE_OMX
+  GstBuffer *flush_request_buffer = NULL;
+  GstMessage *msg = NULL;
+#endif
+
+#if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)
+  port = self->eglimage ? self->egl_out_port : self->dec_out_port;
+#else
+  port = self->dec_out_port;
+#endif
 
 #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)
   port = self->eglimage ? self->egl_out_port : self->dec_out_port;
@@ -1386,6 +1458,17 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
     /* Reallocate all buffers */
     if (acq_return == GST_OMX_ACQUIRE_BUFFER_RECONFIGURE
         && gst_omx_port_is_enabled (port)) {
+#ifdef TIZEN_FEATURE_OMX
+      if (gst_omx_video_dec_acquire_request_flush_buffer (self, &flush_request_buffer)) {
+        flow_ret = gst_pad_push (GST_VIDEO_DECODER_SRC_PAD (self), flush_request_buffer);
+
+        if (flow_ret != GST_FLOW_OK) {
+          gst_buffer_unref (flush_request_buffer);
+          flush_request_buffer = NULL;
+          goto reconfigure_error;
+        }
+      }
+#endif
       err = gst_omx_port_set_enabled (port, FALSE);
       if (err != OMX_ErrorNone)
         goto reconfigure_error;
@@ -1408,6 +1491,13 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
       err = gst_omx_video_dec_reconfigure_output_port (self);
       if (err != OMX_ErrorNone)
         goto reconfigure_error;
+#ifdef TIZEN_FEATURE_OMX
+      msg = gst_message_new_element (GST_OBJECT_CAST (self), gst_structure_new ("prepare-decode-buffers",
+                                 "num_buffers", G_TYPE_INT, self->dec_out_port->port_def.nBufferCountActual,
+                                 "extra_num_buffers", G_TYPE_INT, EXTRA_DECODER_OUTPUT_BUF, NULL));
+
+      gst_element_post_message (GST_ELEMENT_CAST (self), msg);
+#endif
     } else {
       /* Just update caps */
       GST_VIDEO_DECODER_STREAM_LOCK (self);
@@ -1533,7 +1623,6 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
             copy_frame (&GST_OMX_BUFFER_POOL (self->out_port_pool)->video_info,
             outbuf);
 
-      buf = NULL;
     } else {
       outbuf =
           gst_video_decoder_allocate_output_buffer (GST_VIDEO_DECODER (self));
@@ -1543,12 +1632,43 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
         goto invalid_buffer;
       }
     }
+#ifdef TIZEN_FEATURE_OMX
+    {
+      MMVideoBuffer *mm_vbuffer = NULL;
+      GstMemory *mem = NULL;
+      guint8 *data = NULL;
+      mm_vbuffer = (MMVideoBuffer*)(buf->omx_buf->pBuffer);
+
+      if (gst_buffer_n_memory (outbuf) < 2) {
+        data = g_malloc0 (sizeof (MMVideoBuffer));
+        mem = gst_memory_new_wrapped (0, data, sizeof(MMVideoBuffer), 0, sizeof(MMVideoBuffer), data, g_free);
+        gst_buffer_append_memory (outbuf, mem);
+      } else {
+        GstMapInfo info = GST_MAP_INFO_INIT;
+        mem = gst_buffer_peek_memory (outbuf, 1);
+        gst_memory_map (mem, &info, GST_MAP_WRITE);
+        data = info.data;
+        gst_memory_unmap (mem, &info);
+      }
+      memcpy(data, mm_vbuffer, sizeof(MMVideoBuffer));
+      buf = NULL;
 
+      if (mm_vbuffer->type == MM_VIDEO_BUFFER_TYPE_TBM_BO) {
+        GST_LOG_OBJECT (self, "frame not found: bo[0] :%p, bo[1] : %p, fd[0]:%d  fd[1]:%d fd[2]:%d  w[0]:%d h[0]:%d  buf_share_method:%d",
+            mm_vbuffer->handle.bo[0], mm_vbuffer->handle.bo[1], mm_vbuffer->handle.dmabuf_fd[0], mm_vbuffer->handle.dmabuf_fd[1], mm_vbuffer->handle.dmabuf_fd[2],
+            mm_vbuffer->width[0], mm_vbuffer->height[0], mm_vbuffer->type);
+      } else if (mm_vbuffer->type == MM_VIDEO_BUFFER_TYPE_PHYSICAL_ADDRESS) {
+        GST_LOG_OBJECT (self, "dec output uses hw addr");
+      } else {
+        GST_WARNING_OBJECT (self, "dec output buf has TBM_BO buf_share_method");
+      }
+    }
+#endif
     flow_ret = gst_pad_push (GST_VIDEO_DECODER_SRC_PAD (self), outbuf);
   } else if (buf->omx_buf->nFilledLen > 0 || buf->eglimage) {
     if (self->out_port_pool) {
       gint i, n;
-      GstBuffer *outbuf;
+      GstBuffer *outbuf = NULL;
       GstBufferPoolAcquireParams params = { 0, };
 
       n = port->buffers->len;
@@ -1583,18 +1703,19 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
       frame = NULL;
       buf = NULL;
       } else {
-          if(!gst_omx_video_dec_fill_buffer (self, buf, frame->output_buffer)) {
-              gst_buffer_replace (&frame->output_buffer, NULL);
-              flow_ret =
-                  gst_video_decoder_drop_frame (GST_VIDEO_DECODER (self), frame);
-              frame = NULL;
-              gst_omx_port_release_buffer (port, buf);
-              goto invalid_buffer;
-          }
+        if (!gst_omx_video_dec_fill_buffer (self, buf, frame->output_buffer)) {
+          gst_buffer_replace (&frame->output_buffer, NULL);
+
           flow_ret =
-              gst_video_decoder_finish_frame (GST_VIDEO_DECODER (self), frame);
+              gst_video_decoder_drop_frame (GST_VIDEO_DECODER (self), frame);
           frame = NULL;
-          buf = NULL;
+          gst_omx_port_release_buffer (port, buf);
+          goto invalid_buffer;
+        }
+        flow_ret =
+            gst_video_decoder_finish_frame (GST_VIDEO_DECODER (self), frame);
+        frame = NULL;
+        buf = NULL;
       }
     } else {
       if ((flow_ret =
@@ -1657,9 +1778,15 @@ component_error:
 flushing:
   {
     GST_DEBUG_OBJECT (self, "Flushing -- stopping task");
+    g_mutex_lock (&self->drain_lock);
+    if (self->draining) {
+      self->draining = FALSE;
+      g_cond_broadcast (&self->drain_cond);
+    }
     gst_pad_pause_task (GST_VIDEO_DECODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_FLUSHING;
     self->started = FALSE;
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 
@@ -1717,8 +1844,14 @@ flow_error:
       self->started = FALSE;
     } else if (flow_ret == GST_FLOW_FLUSHING) {
       GST_DEBUG_OBJECT (self, "Flushing -- stopping task");
+      g_mutex_lock (&self->drain_lock);
+      if (self->draining) {
+        self->draining = FALSE;
+        g_cond_broadcast (&self->drain_cond);
+      }
       gst_pad_pause_task (GST_VIDEO_DECODER_SRC_PAD (self));
       self->started = FALSE;
+      g_mutex_unlock (&self->drain_lock);
     }
     GST_VIDEO_DECODER_STREAM_UNLOCK (self);
     return;
@@ -1844,11 +1977,10 @@ gst_omx_video_dec_negotiate (GstOMXVideoDec * self)
   GstCaps *templ_caps, *intersection;
   GstVideoFormat format;
   GstStructure *s;
-  const gchar *format_str;
-#ifdef GST_TIZEN_MODIFICATION
-  gchar *format_tmp;
+  const gchar *format_str = NULL;
+#ifdef TIZEN_FEATURE_OMX
+  const gchar *format_tmp;
   int i;
-  EnableGemBuffersParams gemBuffers;
 #endif
 
   GST_DEBUG_OBJECT (self, "Trying to negotiate a video format with downstream");
@@ -1884,19 +2016,21 @@ gst_omx_video_dec_negotiate (GstOMXVideoDec * self)
     return FALSE;
   }
 
-  for(i=0; i<gst_caps_get_size(intersection); i++)
+#ifdef TIZEN_FEATURE_OMX
+  for(i = 0; i < gst_caps_get_size (intersection); i++)
   {
       s = gst_caps_get_structure (intersection, i);
-      format_tmp = gst_structure_get_string (s, "format");
+      if ((format_tmp = gst_structure_get_string (s, "format"))) {
 
-      if(!strncmp(format_tmp, "S", 1)) {
+        if (!strncmp (format_tmp, "S", 1)) {
           format_str = format_tmp;
           GST_DEBUG_OBJECT (self, "SEC format found");
           break;
+        }
       }
   }
 
-  if(!format_str) {
+  if (!format_str) {
     intersection = gst_caps_truncate (intersection);
     intersection = gst_caps_fixate (intersection);
 
@@ -1904,6 +2038,7 @@ gst_omx_video_dec_negotiate (GstOMXVideoDec * self)
     format_str = gst_structure_get_string (s, "format");
     GST_DEBUG_OBJECT (self, "first structure will be fixated");
   }
+#endif
 
   if (!format_str ||
       (format =
@@ -1944,21 +2079,6 @@ gst_omx_video_dec_negotiate (GstOMXVideoDec * self)
         gst_omx_error_to_string (err), err);
   }
 
-  /* set plateform specific gem buffer settings. */
-
-    /* Set platform specific buffer settings. to avoid plane support error.. */
-#ifdef GST_TIZEN_MODIFICATION
-    OMX_INIT_STRUCTURE(gemBuffers);
-    gemBuffers.enable = OMX_TRUE;
-    gemBuffers.nPortIndex = 1;
-      err =
-      gst_omx_component_set_parameter (self->dec,
-      OMX_IndexParamEnablePlatformSpecificBuffers,&gemBuffers);
-  if (err != OMX_ErrorNone) {
-    GST_ERROR_OBJECT (self, "Failed to set video port format: %s (0x%08x)",
-        gst_omx_error_to_string (err), err);
-  }
-#endif
   gst_caps_unref (intersection);
   return (err == OMX_ErrorNone);
 }
@@ -2034,6 +2154,9 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
       if (!gst_omx_video_dec_open (GST_VIDEO_DECODER (self)))
         return FALSE;
       needs_disable = FALSE;
+#ifdef TIZEN_FEATURE_OMX
+      gst_omx_port_get_port_definition (self->dec_in_port, &port_def);
+#endif
     } else {
 #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)
       if (self->eglimage) {
@@ -2043,27 +2166,33 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
         gst_omx_port_set_flushing (self->egl_out_port, 5 * GST_SECOND, TRUE);
       }
 #endif
-
       if (gst_omx_port_set_enabled (self->dec_in_port, FALSE) != OMX_ErrorNone)
         return FALSE;
-      if (gst_omx_port_set_enabled (out_port, FALSE) != OMX_ErrorNone)
-        return FALSE;
+
       if (gst_omx_port_wait_buffers_released (self->dec_in_port,
               5 * GST_SECOND) != OMX_ErrorNone)
         return FALSE;
-      if (gst_omx_port_wait_buffers_released (out_port,
-              1 * GST_SECOND) != OMX_ErrorNone)
-        return FALSE;
+
       if (gst_omx_port_deallocate_buffers (self->dec_in_port) != OMX_ErrorNone)
         return FALSE;
-      if (gst_omx_video_dec_deallocate_output_buffers (self) != OMX_ErrorNone)
-        return FALSE;
+
       if (gst_omx_port_wait_enabled (self->dec_in_port,
               1 * GST_SECOND) != OMX_ErrorNone)
         return FALSE;
-      if (gst_omx_port_wait_enabled (out_port, 1 * GST_SECOND) != OMX_ErrorNone)
+#ifndef TIZEN_FEATURE_OMX
+      if (gst_omx_port_set_enabled (out_port, FALSE) != OMX_ErrorNone)
+        return FALSE;
+
+      if (gst_omx_port_wait_buffers_released (out_port,
+              1 * GST_SECOND) != OMX_ErrorNone)
         return FALSE;
 
+      if (gst_omx_video_dec_deallocate_output_buffers (self) != OMX_ErrorNone)
+        return FALSE;
+
+      if (gst_omx_port_wait_enabled (out_port, 1 * GST_SECOND) != OMX_ErrorNone)
+        return FALSE;
+#endif
 #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)
       if (self->eglimage) {
         OMX_STATETYPE egl_state;
@@ -2136,14 +2265,15 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
   if (needs_disable) {
     if (gst_omx_port_set_enabled (self->dec_in_port, TRUE) != OMX_ErrorNone)
       return FALSE;
-#ifdef GST_TIZEN_MODIFICATION
-    if(gst_omx_port_tbm_allocate_dec_buffers(self->dec_in_port, self->hTBMBufMgr, 0) != OMX_ErrorNone)
+#ifdef TIZEN_FEATURE_OMX
+    if (gst_omx_port_tbm_allocate_dec_buffers (self->dec_in_port,
+        self->bufmgr, self->dec_in_port->use_buffer) != OMX_ErrorNone)
      return FALSE;
 #else
     if (gst_omx_port_allocate_buffers (self->dec_in_port) != OMX_ErrorNone)
       return FALSE;
 #endif
-
+#ifndef TIZEN_FEATURE_OMX
     if ((klass->cdata.hacks & GST_OMX_HACK_NO_DISABLE_OUTPORT)) {
       if (gst_omx_port_set_enabled (self->dec_out_port, TRUE) != OMX_ErrorNone)
         return FALSE;
@@ -2154,10 +2284,11 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
               5 * GST_SECOND) != OMX_ErrorNone)
         return FALSE;
     }
-
+#endif
     if (gst_omx_port_wait_enabled (self->dec_in_port,
             5 * GST_SECOND) != OMX_ErrorNone)
       return FALSE;
+
     if (gst_omx_port_mark_reconfigured (self->dec_in_port) != OMX_ErrorNone)
       return FALSE;
   } else {
@@ -2165,7 +2296,6 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
       GST_LOG_OBJECT (self, "Negotiation failed, will get output format later");
 
     if (!(klass->cdata.hacks & GST_OMX_HACK_NO_DISABLE_OUTPORT)) {
-#ifndef GST_TIZEN_MODIFICATION
       /* Disable output port */
       if (gst_omx_port_set_enabled (self->dec_out_port, FALSE) != OMX_ErrorNone)
         return FALSE;
@@ -2173,17 +2303,18 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
       if (gst_omx_port_wait_enabled (self->dec_out_port,
               1 * GST_SECOND) != OMX_ErrorNone)
         return FALSE;
-#endif
+
       if (gst_omx_component_set_state (self->dec,
               OMX_StateIdle) != OMX_ErrorNone)
         return FALSE;
 
       /* Need to allocate buffers to reach Idle state */
-#ifdef GST_TIZEN_MODIFICATION
-      if(gst_omx_port_tbm_allocate_dec_buffers(self->dec_in_port, self->hTBMBufMgr, 0) != OMX_ErrorNone)
+#ifdef TIZEN_FEATURE_OMX
+      if (gst_omx_port_tbm_allocate_dec_buffers (self->dec_in_port,
+          self->bufmgr, self->dec_in_port->use_buffer) != OMX_ErrorNone)
           return FALSE;
-      if(gst_omx_port_tbm_allocate_dec_buffers(self->dec_out_port, self->hTBMBufMgr,
-          self->dec_in_port->port_def.format.video.eCompressionFormat) != OMX_ErrorNone)
+      if (gst_omx_port_tbm_allocate_dec_buffers (self->dec_out_port,
+          self->bufmgr, self->dec_out_port->use_buffer) != OMX_ErrorNone)
           return FALSE;
 #else
       if (gst_omx_port_allocate_buffers (self->dec_in_port) != OMX_ErrorNone)
@@ -2198,11 +2329,12 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
         return FALSE;
 
       /* Need to allocate buffers to reach Idle state */
-#ifdef GST_TIZEN_MODIFICATION
-      if(gst_omx_port_tbm_allocate_dec_buffers(self->dec_in_port, self->hTBMBufMgr, 0) != OMX_ErrorNone)
+#ifdef TIZEN_FEATURE_OMX
+      if (gst_omx_port_tbm_allocate_dec_buffers (self->dec_in_port,
+          self->bufmgr, self->dec_in_port->use_buffer) != OMX_ErrorNone)
           return FALSE;
-      if(gst_omx_port_tbm_allocate_dec_buffers(self->dec_out_port, self->hTBMBufMgr,
-          self->dec_in_port->port_def.format.video.eCompressionFormat) != OMX_ErrorNone)
+      if (gst_omx_port_tbm_allocate_dec_buffers (self->dec_out_port,
+          self->bufmgr, self->dec_out_port->use_buffer) != OMX_ErrorNone)
           return FALSE;
 #else
       if (gst_omx_port_allocate_buffers (self->dec_in_port) != OMX_ErrorNone)
@@ -2422,9 +2554,8 @@ gst_omx_video_dec_handle_frame (GstVideoDecoder * decoder,
         GST_VIDEO_DECODER_STREAM_LOCK (self);
         goto reconfigure_error;
       }
-#ifdef GST_TIZEN_MODIFICATION
-      err = gst_omx_port_tbm_allocate_dec_buffers(port, self->hTBMBufMgr,
-          self->dec_in_port->port_def.format.video.eCompressionFormat);
+#ifdef TIZEN_FEATURE_OMX
+      err = gst_omx_port_tbm_allocate_dec_buffers (port, self->bufmgr, port->use_buffer);
 #else
       err = gst_omx_port_allocate_buffers (port);
 #endif
@@ -2478,14 +2609,19 @@ gst_omx_video_dec_handle_frame (GstVideoDecoder * decoder,
       buf->omx_buf->nFlags |= OMX_BUFFERFLAG_ENDOFFRAME;
       buf->omx_buf->nFilledLen = gst_buffer_get_size (codec_data);;
 
-#ifdef GST_TIZEN_MODIFICATION
-      gst_buffer_extract (codec_data, 0,
-          buf->mm_vbuffer->data[0] + buf->omx_buf->nOffset,
-          buf->omx_buf->nFilledLen);
-#else
-      gst_buffer_extract (codec_data, 0,
-          buf->omx_buf->pBuffer + buf->omx_buf->nOffset,
-          buf->omx_buf->nFilledLen);
+#ifdef TIZEN_FEATURE_OMX
+      if (port->use_buffer) {
+        gst_buffer_extract (codec_data, 0,
+            (OMX_U8 *) buf->mm_vbuffer->data[0] + buf->omx_buf->nOffset,
+            buf->omx_buf->nFilledLen);
+      } else {
+        gst_buffer_extract (codec_data, 0,
+            buf->omx_buf->pBuffer + buf->omx_buf->nOffset,
+            buf->omx_buf->nFilledLen);
+      }
+#ifdef CODEC_DEC_INTPUT_DUMP
+      decoder_input_dump (buf, port->use_buffer);
+#endif
 #endif
 
       if (GST_CLOCK_TIME_IS_VALID (timestamp))
@@ -2511,18 +2647,22 @@ gst_omx_video_dec_handle_frame (GstVideoDecoder * decoder,
      * by the port */
     buf->omx_buf->nFilledLen =
         MIN (size - offset, buf->omx_buf->nAllocLen - buf->omx_buf->nOffset);
-    GST_DEBUG_OBJECT (self, "nFilledLen %d, %p", buf->omx_buf->nFilledLen, buf->omx_buf->pBuffer);
+    GST_DEBUG_OBJECT (self, "nFilledLen %lu, %p", buf->omx_buf->nFilledLen, buf->omx_buf->pBuffer);
 
-#ifdef GST_TIZEN_MODIFICATION
-     gst_buffer_extract (frame->input_buffer, offset,
-          buf->mm_vbuffer->data[0] + buf->omx_buf->nOffset,
+#ifdef TIZEN_FEATURE_OMX
+    if (port->use_buffer) {
+      gst_buffer_extract (frame->input_buffer, offset,
+          (OMX_U8 *) buf->mm_vbuffer->data[0] + buf->omx_buf->nOffset,
           buf->omx_buf->nFilledLen);
-#else
-    gst_buffer_extract (frame->input_buffer, offset,
-        buf->omx_buf->pBuffer + buf->omx_buf->nOffset,
-        buf->omx_buf->nFilledLen);
+    } else {
+      gst_buffer_extract (frame->input_buffer, offset,
+          buf->omx_buf->pBuffer + buf->omx_buf->nOffset,
+          buf->omx_buf->nFilledLen);
+    }
+#ifdef CODEC_DEC_INTPUT_DUMP
+      decoder_input_dump (buf, port->use_buffer);
+#endif
 #endif
-
     if (timestamp != GST_CLOCK_TIME_NONE) {
       buf->omx_buf->nTimeStamp =
           gst_util_uint64_scale (timestamp, OMX_TICKS_PER_SECOND, GST_SECOND);
@@ -2780,3 +2920,72 @@ gst_omx_video_dec_decide_allocation (GstVideoDecoder * bdec, GstQuery * query)
 
   return TRUE;
 }
+
+#ifdef TIZEN_FEATURE_OMX
+static gboolean
+gst_omx_video_dec_acquire_request_flush_buffer (GstOMXVideoDec * self, GstBuffer ** flush_request_buffer)
+{
+  guint8 *dummy_data = NULL;
+  GstBuffer *buf = NULL;
+  MMVideoBuffer *mm_vbuffer = NULL;
+
+  GST_DEBUG_OBJECT (self, "flush buffer request");
+
+  if (self->out_port_pool) {
+    if (gst_buffer_pool_is_active(self->out_port_pool)) {
+      dummy_data = g_malloc0(128*128);
+      buf = gst_buffer_new_wrapped(dummy_data, 128*128);
+      mm_vbuffer = g_malloc(sizeof(MMVideoBuffer));
+
+      mm_vbuffer->type = MM_VIDEO_BUFFER_TYPE_TBM_BO;
+      mm_vbuffer->size[0] = 0;
+      mm_vbuffer->flush_request = TRUE;
+
+      gst_buffer_append_memory(buf,
+        gst_memory_new_wrapped(GST_MEMORY_FLAG_READONLY, mm_vbuffer, sizeof(MMVideoBuffer), 0,
+          sizeof(MMVideoBuffer), mm_vbuffer, g_free));
+
+      *flush_request_buffer = buf;
+
+      GST_DEBUG_OBJECT (self, "flush buffer requested");
+      return TRUE;
+    } else {
+        GST_DEBUG_OBJECT (self, "the out port pool has not yet been activated");
+        return FALSE;
+    }
+  } else {
+    GST_DEBUG_OBJECT (self, "the output port has not yet been activated");
+    return FALSE;
+  }
+}
+
+static gboolean
+gst_omx_video_dec_handle_event (GstVideoDecoder * decoder,
+    GstEvent * event)
+{
+  GstOMXVideoDec *self;
+
+  self = GST_OMX_VIDEO_DEC (decoder);
+
+  GST_DEBUG_OBJECT (self, "event: %s", GST_EVENT_TYPE_NAME (event));
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_FLUSH_START:
+    {
+      gst_omx_port_flush_start (self->dec_in_port, TRUE);
+      gst_omx_port_flush_start (self->dec_out_port, TRUE);
+      break;
+    }
+    case GST_EVENT_FLUSH_STOP:
+    {
+      gst_omx_port_flush_start (self->dec_in_port, FALSE);
+      gst_omx_port_flush_start (self->dec_out_port, FALSE);
+      break;
+    }
+    default:
+      break;
+  }
+
+  return GST_VIDEO_DECODER_CLASS (gst_omx_video_dec_parent_class)->sink_event (decoder, event);
+}
+#endif
old mode 100644 (file)
new mode 100755 (executable)
index 4e41796..fd08a83
 
 #include "gstomx.h"
 
-#define OMX_VERSION_MAJOR 1
-#define OMX_VERSION_MINOR 1
-#define OMX_VERSION_REVISION 2
-#define OMX_VERSION_STEP 0
-
-#define OMX_VERSION ((OMX_VERSION_STEP<<24) | (OMX_VERSION_REVISION<<16) | (OMX_VERSION_MINOR<<8) | OMX_VERSION_MAJOR)
-
-#define OMX_INIT_STRUCTURE(a) \
-    memset(&(a), 0, sizeof(a)); \
-    (a).nSize = sizeof(a); \
-    (a).nVersion.nVersion = OMX_VERSION; \
-    (a).nVersion.s.nVersionMajor = OMX_VERSION_MAJOR; \
-    (a).nVersion.s.nVersionMinor = OMX_VERSION_MINOR; \
-    (a).nVersion.s.nRevision = OMX_VERSION_REVISION; \
-    (a).nVersion.s.nStep = OMX_VERSION_STEP
-
 G_BEGIN_DECLS
 
 #define GST_TYPE_OMX_VIDEO_DEC \
@@ -62,6 +46,8 @@ G_BEGIN_DECLS
 #define GST_IS_OMX_VIDEO_DEC_CLASS(obj) \
   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OMX_VIDEO_DEC))
 
+#define EXTRA_DECODER_OUTPUT_BUF 4
+
 typedef struct _GstOMXVideoDec GstOMXVideoDec;
 typedef struct _GstOMXVideoDecClass GstOMXVideoDecClass;
 
@@ -72,7 +58,7 @@ struct _GstOMXVideoDec
   /* < protected > */
   GstOMXComponent *dec;
   GstOMXPort *dec_in_port, *dec_out_port;
-  
+
   GstBufferPool *in_port_pool, *out_port_pool;
 
   /* < private > */
@@ -91,9 +77,9 @@ struct _GstOMXVideoDec
   gboolean draining;
 
   GstFlowReturn downstream_flow_ret;
-#ifdef GST_TIZEN_MODIFICATION
+#ifdef TIZEN_FEATURE_OMX
   gint drm_fd;
-  tbm_bufmgr hTBMBufMgr;
+  tbm_bufmgr bufmgr;
 #endif
 #ifdef USE_OMX_TARGET_RPI
   GstOMXComponent *egl_render;
old mode 100644 (file)
new mode 100755 (executable)
index 5c1d7fc..0c84e6f
 #include <OMX_Index.h>
 #endif
 
+//#define CODEC_ENC_INPUT_DUMP
 GST_DEBUG_CATEGORY_STATIC (gst_omx_video_enc_debug_category);
 #define GST_CAT_DEFAULT gst_omx_video_enc_debug_category
 
 #define GST_TYPE_OMX_VIDEO_ENC_CONTROL_RATE (gst_omx_video_enc_control_rate_get_type ())
+
+#ifdef CODEC_ENC_INPUT_DUMP
+#include <stdio.h>
+#endif
+
 static GType
 gst_omx_video_enc_control_rate_get_type (void)
 {
@@ -110,6 +116,7 @@ enum
 #define GST_OMX_VIDEO_ENC_QUANT_P_FRAMES_DEFAULT (0xffffffff)
 #define GST_OMX_VIDEO_ENC_QUANT_B_FRAMES_DEFAULT (0xffffffff)
 
+
 /* class initialization */
 
 #define DEBUG_INIT \
@@ -204,12 +211,42 @@ gst_omx_video_enc_init (GstOMXVideoEnc * self)
 
   g_mutex_init (&self->drain_lock);
   g_cond_init (&self->drain_cond);
-#ifdef GST_TIZEN_MODIFICATION
-  self->hTBMBufMgr = NULL;
+#ifdef TIZEN_FEATURE_OMX
+  self->bufmgr = NULL;
   self->drm_fd = -1;
 #endif
 }
 
+#ifdef CODEC_ENC_INPUT_DUMP
+static inline void
+gst_omx_video_enc_input_dump (MMVideoBuffer *inbuf)
+{
+  char *temp = (char *)inbuf->data[0];
+  int i = 0;
+  char filename[100]={0};
+  FILE *fp = NULL;
+
+  GST_WARNING ("codec enc input dump start. w = %d, h = %d", inbuf->width[0], inbuf->height[0]);
+
+  sprintf(filename, "/tmp/enc_input_dump_%d_%d.yuv", inbuf->width[0], inbuf->height[0]);
+  fp = fopen(filename, "ab");
+
+  for (i = 0; i < inbuf->height[0]; i++) {
+      fwrite(temp, inbuf->width[0], 1, fp);
+      temp += inbuf->stride_width[0];
+  }
+
+  temp = (char*)inbuf->data[1];
+
+  for(i = 0; i < inbuf->height[1] ; i++) {
+      fwrite(temp, inbuf->width[1], 1, fp);
+      temp += inbuf->stride_width[1];
+  }
+  GST_WARNING ("codec encoder input dumped!!");
+  fclose(fp);
+}
+#endif
+
 static gboolean
 gst_omx_video_enc_open (GstVideoEncoder * encoder)
 {
@@ -259,6 +296,7 @@ gst_omx_video_enc_open (GstVideoEncoder * encoder)
   self->enc_in_port = gst_omx_component_add_port (self->enc, in_port_index);
   self->enc_out_port = gst_omx_component_add_port (self->enc, out_port_index);
 
+
   if (!self->enc_in_port || !self->enc_out_port)
     return FALSE;
 
@@ -354,12 +392,42 @@ gst_omx_video_enc_open (GstVideoEncoder * encoder)
       }
     }
   }
-#ifdef GST_TIZEN_MODIFICATION
-   self->hTBMBufMgr = tbm_bufmgr_init(self->drm_fd);
-   if(self->hTBMBufMgr == NULL){
+#ifdef TIZEN_FEATURE_OMX
+   self->bufmgr = tbm_bufmgr_init (self->drm_fd);
+   if (self->bufmgr == NULL){
     GST_ERROR_OBJECT (self, "TBM initialization failed.");
     return FALSE;
    }
+
+  self->enc_in_port->use_buffer = klass->cdata.in_port_usebuffer;
+  self->enc_out_port->use_buffer = klass->cdata.out_port_usebuffer;
+
+  /* get extension index and set platform specific buffer enable */
+#if defined(USE_OMX_TARGET_EXYNOS) || defined(USE_OMX_TARGET_EXYNOS64)
+  {
+    OMX_ERRORTYPE err;
+    OMX_INDEXTYPE index = OMX_IndexComponentStartUnused;
+    EnableGemBuffersParams gem_param;
+
+    err = gst_omx_component_get_extension_index (self->enc, (OMX_STRING) EXYNOS_INDEX_PARAM_STORE_METADATA_BUFFER, &index);
+    if (err != OMX_ErrorNone) {
+      GST_WARNING_OBJECT (self, "Failed to get extension index : %s (0x%08x)",
+          gst_omx_error_to_string (err), err);
+    }
+
+    OMX_INIT_PARAM (gem_param);
+    gem_param.enable = OMX_TRUE;
+    gem_param.nPortIndex = 0;
+
+
+    err = gst_omx_component_set_parameter (self->enc, index, &gem_param);
+    if (err != OMX_ErrorNone) {
+      GST_ERROR_OBJECT (self, "Failed to set platform specific buffer: %s (0x%08x)",
+          gst_omx_error_to_string (err), err);
+    }
+
+  }
+#endif
 #endif
   return TRUE;
 }
@@ -524,9 +592,6 @@ gst_omx_video_enc_change_state (GstElement * element, GstStateChange transition)
       break;
   }
 
-  if (ret == GST_STATE_CHANGE_FAILURE)
-    return ret;
-
   ret =
       GST_ELEMENT_CLASS (gst_omx_video_enc_parent_class)->change_state (element,
       transition);
@@ -582,11 +647,20 @@ gst_omx_video_enc_handle_output_frame (GstOMXVideoEnc * self, GstOMXPort * port,
         self->input_state);
     state->codec_data = codec_data;
     gst_video_codec_state_unref (state);
+#ifdef TIZEN_FEATURE_OMX
+    /*Modification : codec data already set_caps, so unref frame whenever negotiate ok or not*/
+    if (!gst_video_encoder_negotiate (GST_VIDEO_ENCODER (self)))
+      flow_ret = GST_FLOW_NOT_NEGOTIATED;
+    else
+      flow_ret = GST_FLOW_OK;
+    gst_video_codec_frame_unref (frame);
+#else
     if (!gst_video_encoder_negotiate (GST_VIDEO_ENCODER (self))) {
       gst_video_codec_frame_unref (frame);
       return GST_FLOW_NOT_NEGOTIATED;
     }
     flow_ret = GST_FLOW_OK;
+#endif
   } else if (buf->omx_buf->nFilledLen > 0) {
     GstBuffer *outbuf;
     GstMapInfo map = GST_MAP_INFO_INIT;
@@ -720,9 +794,8 @@ gst_omx_video_enc_loop (GstOMXVideoEnc * self)
       err = gst_omx_port_set_enabled (port, TRUE);
       if (err != OMX_ErrorNone)
         goto reconfigure_error;
-#ifdef GST_TIZEN_MODIFICATION
-    err = gst_omx_port_tbm_allocate_enc_buffers(port, self->hTBMBufMgr,
-        self->enc_in_port->port_def.format.video.eCompressionFormat);
+#ifdef TIZEN_FEATURE_OMX
+    err = gst_omx_port_tbm_allocate_enc_buffers(port, self->bufmgr, port->use_buffer);
 #else
       err = gst_omx_port_allocate_buffers (port);
 #endif
@@ -802,9 +875,15 @@ component_error:
 flushing:
   {
     GST_DEBUG_OBJECT (self, "Flushing -- stopping task");
+    g_mutex_lock (&self->drain_lock);
+    if (self->draining) {
+      self->draining = FALSE;
+      g_cond_broadcast (&self->drain_cond);
+    }
     gst_pad_pause_task (GST_VIDEO_ENCODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_FLUSHING;
     self->started = FALSE;
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 
@@ -853,8 +932,14 @@ flow_error:
       self->started = FALSE;
     } else if (flow_ret == GST_FLOW_FLUSHING) {
       GST_DEBUG_OBJECT (self, "Flushing -- stopping task");
+      g_mutex_lock (&self->drain_lock);
+      if (self->draining) {
+        self->draining = FALSE;
+        g_cond_broadcast (&self->drain_cond);
+      }
       gst_pad_pause_task (GST_VIDEO_ENCODER_SRC_PAD (self));
       self->started = FALSE;
+      g_mutex_unlock (&self->drain_lock);
     }
     GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
     return;
@@ -1024,6 +1109,9 @@ gst_omx_video_enc_set_format (GstVideoEncoder * encoder,
       case GST_VIDEO_FORMAT_NV12:
         port_def.format.video.eColorFormat = OMX_COLOR_FormatYUV420SemiPlanar;
         break;
+      case GST_VIDEO_FORMAT_SN12:
+        port_def.format.video.eColorFormat = OMX_EXT_COLOR_FormatNV12LPhysicalAddress;
+        break;
       default:
         GST_ERROR_OBJECT (self, "Unsupported format %s",
             gst_video_format_to_string (info->finfo->format));
@@ -1044,15 +1132,23 @@ gst_omx_video_enc_set_format (GstVideoEncoder * encoder,
   }
 
   port_def.format.video.nFrameWidth = info->width;
+#ifdef TIZEN_FEATURE_OMX
+  port_def.format.video.nStride = ALIGN(info->width, 16);
+#else
   if (port_def.nBufferAlignment)
     port_def.format.video.nStride =
         (info->width + port_def.nBufferAlignment - 1) &
         (~(port_def.nBufferAlignment - 1));
   else
     port_def.format.video.nStride = GST_ROUND_UP_4 (info->width);       /* safe (?) default */
+#endif
 
   port_def.format.video.nFrameHeight = info->height;
+#ifdef TIZEN_FEATURE_OMX
+  port_def.format.video.nSliceHeight = ALIGN(info->width, 16);
+#else
   port_def.format.video.nSliceHeight = info->height;
+#endif
 
   switch (port_def.format.video.eColorFormat) {
     case OMX_COLOR_FormatYUV420Planar:
@@ -1072,7 +1168,7 @@ gst_omx_video_enc_set_format (GstVideoEncoder * encoder,
 
     case OMX_EXT_COLOR_FormatNV12LPhysicalAddress: /* FALL THROUGH */
     case OMX_EXT_COLOR_FormatNV12TPhysicalAddress:
-#ifdef GST_TIZEN_MODIFICATION
+#ifdef TIZEN_FEATURE_OMX
         port_def.nBufferSize = sizeof(MMVideoBuffer);
 #endif
         break;
@@ -1095,6 +1191,17 @@ gst_omx_video_enc_set_format (GstVideoEncoder * encoder,
           &port_def) != OMX_ErrorNone)
     return FALSE;
 
+#ifdef TIZEN_FEATURE_OMX
+  GST_DEBUG_OBJECT (self, "Updating outport port definition");
+  gst_omx_port_get_port_definition (self->enc_out_port, &port_def);
+
+  port_def.format.video.nFrameWidth = info->width;
+  port_def.format.video.nFrameHeight = info->height;
+
+  if (gst_omx_port_update_port_definition (self->enc_out_port, &port_def) != OMX_ErrorNone)
+    return FALSE;
+#endif
+
 #ifdef USE_OMX_TARGET_RPI
   /* aspect ratio */
   {
@@ -1164,9 +1271,9 @@ gst_omx_video_enc_set_format (GstVideoEncoder * encoder,
   if (needs_disable) {
     if (gst_omx_port_set_enabled (self->enc_in_port, TRUE) != OMX_ErrorNone)
       return FALSE;
-#ifdef GST_TIZEN_MODIFICATION
-    if(gst_omx_port_tbm_allocate_enc_buffers(self->enc_in_port, self->hTBMBufMgr,
-        self->enc_in_port->port_def.format.video.eCompressionFormat) != OMX_ErrorNone)
+#ifdef TIZEN_FEATURE_OMX
+    if (gst_omx_port_tbm_allocate_enc_buffers (self->enc_in_port, self->bufmgr,
+        self->enc_in_port->use_buffer) != OMX_ErrorNone)
         return FALSE;
 #else
     if (gst_omx_port_allocate_buffers (self->enc_in_port) != OMX_ErrorNone)
@@ -1212,18 +1319,18 @@ gst_omx_video_enc_set_format (GstVideoEncoder * encoder,
         return FALSE;
 
       /* Need to allocate buffers to reach Idle state */
-#ifdef GST_TIZEN_MODIFICATION
-    if(gst_omx_port_tbm_allocate_enc_buffers(self->enc_in_port, self->hTBMBufMgr,
-        self->enc_in_port->port_def.format.video.eCompressionFormat) != OMX_ErrorNone)
+#ifdef TIZEN_FEATURE_OMX
+    if (gst_omx_port_tbm_allocate_enc_buffers(self->enc_in_port, self->bufmgr,
+        self->enc_in_port->use_buffer) != OMX_ErrorNone)
         return FALSE;
 #else
       if (gst_omx_port_allocate_buffers (self->enc_in_port) != OMX_ErrorNone)
         return FALSE;
 #endif
 
-#ifdef GST_TIZEN_MODIFICATION
-    if(gst_omx_port_tbm_allocate_enc_buffers(self->enc_out_port, self->hTBMBufMgr,
-        self->enc_out_port->port_def.format.video.eCompressionFormat) != OMX_ErrorNone)
+#ifdef TIZEN_FEATURE_OMX
+    if (gst_omx_port_tbm_allocate_enc_buffers(self->enc_out_port, self->bufmgr,
+        self->enc_out_port->use_buffer) != OMX_ErrorNone)
 #else
       if (gst_omx_port_allocate_buffers (self->enc_out_port) != OMX_ErrorNone)
 #endif
@@ -1318,7 +1425,7 @@ gst_omx_video_enc_fill_buffer (GstOMXVideoEnc * self, GstBuffer * inbuf,
     GST_ERROR_OBJECT (self, "Width or height do not match");
     goto done;
   }
-
+#ifndef TIZEN_FEATURE_OMX
   /* Same strides and everything */
   if (gst_buffer_get_size (inbuf) ==
       outbuf->omx_buf->nAllocLen - outbuf->omx_buf->nOffset) {
@@ -1330,7 +1437,7 @@ gst_omx_video_enc_fill_buffer (GstOMXVideoEnc * self, GstBuffer * inbuf,
     ret = TRUE;
     goto done;
   }
-
+#endif
   /* Different strides */
 
   switch (info->finfo->format) {
@@ -1457,44 +1564,44 @@ gst_omx_video_enc_fill_buffer (GstOMXVideoEnc * self, GstBuffer * inbuf,
       break;
     }
     case GST_VIDEO_FORMAT_ST12:
-    case GST_VIDEO_FORMAT_SN12:{
-        GstMemory* ext_memory = gst_buffer_peek_memory(inbuf, 1);
-        GstMapInfo ext_info =  GST_MAP_INFO_INIT;
-        MMVideoBuffer *ext_buf = NULL;
-
-        if (!ext_memory) {
-          GST_WARNING_OBJECT (self, "null MMVideoBuffer pointer  in hw color format. skip this.");
-          goto done;
-        }
-
-        gst_memory_map(ext_memory, &ext_info, GST_MAP_READ);
-        ext_buf = (MMVideoBuffer*)ext_info.data;
-        gst_memory_unmap(ext_memory, &ext_info);
+    case GST_VIDEO_FORMAT_SN12:
+    {
+      GstMemory* ext_memory = gst_buffer_peek_memory(inbuf, 1);
+      GstMapInfo ext_info =  GST_MAP_INFO_INIT;
+      MMVideoBuffer *mm_vbuffer = NULL;
+
+      if (!ext_memory) {
+        GST_WARNING_OBJECT (self, "null MMVideoBuffer pointer  in hw color format. skip this.");
+        goto done;
+      }
 
-        if (ext_buf != NULL && ext_buf->type == MM_VIDEO_BUFFER_TYPE_TBM_BO) {
+      gst_memory_map(ext_memory, &ext_info, GST_MAP_READ);
+      mm_vbuffer = (MMVideoBuffer*)ext_info.data;
+      gst_memory_unmap(ext_memory, &ext_info);
 
-          if (ext_buf->handle.dmabuf_fd[0] == NULL)
-            gst_omx_tbm_get_bo_fd(ext_buf->handle.bo[0]);
+      if (mm_vbuffer != NULL && mm_vbuffer->type == MM_VIDEO_BUFFER_TYPE_TBM_BO) {
+        mm_vbuffer->handle.dmabuf_fd[0] = tbm_bo_get_handle (mm_vbuffer->handle.bo[0], TBM_DEVICE_MM).u32;
+        mm_vbuffer->handle.dmabuf_fd[1] = tbm_bo_get_handle (mm_vbuffer->handle.bo[1], TBM_DEVICE_MM).u32;
+        mm_vbuffer->data[0] = tbm_bo_get_handle (mm_vbuffer->handle.bo[0], TBM_DEVICE_CPU).ptr;
+        mm_vbuffer->data[1] = tbm_bo_get_handle (mm_vbuffer->handle.bo[1], TBM_DEVICE_CPU).ptr;
 
-          if (ext_buf->handle.dmabuf_fd[1] == NULL)
-            gst_omx_tbm_get_bo_fd(ext_buf->handle.bo[1]);
+        GST_LOG_OBJECT (self, "enc. fd[0]:%d  fd[1]:%d  a[0]:%p, a[1]:%p, w[0]:%d  h[0]:%d   %d, %d, buf_share_method:%d",
+            mm_vbuffer->handle.dmabuf_fd[0], mm_vbuffer->handle.dmabuf_fd[1], mm_vbuffer->data[0], mm_vbuffer->data[1],
+            mm_vbuffer->width[0], mm_vbuffer->height[0], mm_vbuffer->width[1], mm_vbuffer->height[1], mm_vbuffer->type);
 
-          GST_LOG_OBJECT (self, "enc. fd[0]:%d  fd[1]:%d  fd[2]:%d  w[0]:%d  h[0]:%d   buf_share_method:%d",
-              ext_buf->handle.dmabuf_fd[0], ext_buf->handle.dmabuf_fd[1], ext_buf->handle.dmabuf_fd[2], ext_buf->width[0], ext_buf->height[0], ext_buf->type);
-        } else {
-          GST_WARNING_OBJECT (self, "enc input buf has wrong buf_share_method[%d]", ext_buf->type);
-        }
-
-        outbuf->omx_buf->nAllocLen = sizeof(MMVideoBuffer);
-        outbuf->omx_buf->nFilledLen = sizeof(MMVideoBuffer);
-        memcpy (outbuf->omx_buf->pBuffer, ext_buf, sizeof(MMVideoBuffer));
+        outbuf->omx_buf->nAllocLen = sizeof (MMVideoBuffer);
+        outbuf->omx_buf->nFilledLen = sizeof (MMVideoBuffer);
+        memcpy (outbuf->omx_buf->pBuffer, mm_vbuffer, sizeof (MMVideoBuffer));
+      } else {
+        GST_WARNING_OBJECT (self, "enc input has wrong buf");
+      }
 
 #ifdef CODEC_ENC_INPUT_DUMP
-        gst_omx_video_enc_input_dump(ext_buf);
+      gst_omx_video_enc_input_dump(mm_vbuffer);
 #endif
 
-        ret = TRUE;
-        break;
+      ret = TRUE;
+      break;
     }
     default:
       GST_ERROR_OBJECT (self, "Unsupported format");
@@ -1576,9 +1683,8 @@ gst_omx_video_enc_handle_frame (GstVideoEncoder * encoder,
         GST_VIDEO_ENCODER_STREAM_LOCK (self);
         goto reconfigure_error;
       }
-#ifdef GST_TIZEN_MODIFICATION
-    err = gst_omx_port_tbm_allocate_enc_buffers(port, self->hTBMBufMgr,
-        self->enc_in_port->port_def.format.video.eCompressionFormat);
+#ifdef TIZEN_FEATURE_OMX
+    err = gst_omx_port_tbm_allocate_enc_buffers (port, self->bufmgr, port->use_buffer);
 #else
       err = gst_omx_port_allocate_buffers (port);
 #endif
old mode 100644 (file)
new mode 100755 (executable)
index 6dbb1c7..06748c0
@@ -76,9 +76,9 @@ struct _GstOMXVideoEnc
   guint32 quant_b_frames;
 
   GstFlowReturn downstream_flow_ret;
-#ifdef GST_TIZEN_MODIFICATION
+#ifdef TIZEN_FEATURE_OMX
   gint drm_fd;
-  tbm_bufmgr hTBMBufMgr;
+  tbm_bufmgr bufmgr;
 #endif
 };
 
diff --git a/omx/gstomxvp9dec.c b/omx/gstomxvp9dec.c
new file mode 100644 (file)
index 0000000..1989929
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *   Author: Sejun Park <sejun79.park@samsung.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gst/gst.h>
+
+#include "gstomxvp9dec.h"
+
+GST_DEBUG_CATEGORY_STATIC (gst_omx_vp9_dec_debug_category);
+#define GST_CAT_DEFAULT gst_omx_vp9_dec_debug_category
+
+/* prototypes */
+static gboolean gst_omx_vp9_dec_is_format_change (GstOMXVideoDec * dec,
+    GstOMXPort * port, GstVideoCodecState * state);
+static gboolean gst_omx_vp9_dec_set_format (GstOMXVideoDec * dec,
+    GstOMXPort * port, GstVideoCodecState * state);
+
+enum
+{
+  PROP_0
+};
+
+/* class initialization */
+
+#define DEBUG_INIT \
+  GST_DEBUG_CATEGORY_INIT (gst_omx_vp9_dec_debug_category, "omxvp9dec", 0, \
+      "debug category for gst-omx video decoder base class");
+
+G_DEFINE_TYPE_WITH_CODE (GstOMXVP9Dec, gst_omx_vp9_dec,
+    GST_TYPE_OMX_VIDEO_DEC, DEBUG_INIT);
+
+static void
+gst_omx_vp9_dec_class_init (GstOMXVP9DecClass * klass)
+{
+  GstOMXVideoDecClass *videodec_class = GST_OMX_VIDEO_DEC_CLASS (klass);
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+
+  videodec_class->is_format_change =
+      GST_DEBUG_FUNCPTR (gst_omx_vp9_dec_is_format_change);
+  videodec_class->set_format = GST_DEBUG_FUNCPTR (gst_omx_vp9_dec_set_format);
+
+  videodec_class->cdata.default_sink_template_caps = "video/x-vp9, "
+      "width=(int) [1,MAX], " "height=(int) [1,MAX]";
+
+  gst_element_class_set_static_metadata (element_class,
+      "OpenMAX VP9 Video Decoder",
+      "Codec/Decoder/Video",
+      "Decode VP9 video streams",
+      "Sejun Park <sejun79.park@samsung.com>");
+
+  gst_omx_set_default_role (&videodec_class->cdata, "video_decoder.vp9");
+}
+
+static void
+gst_omx_vp9_dec_init (GstOMXVP9Dec * self)
+{
+}
+
+static gboolean
+gst_omx_vp9_dec_is_format_change (GstOMXVideoDec * dec,
+    GstOMXPort * port, GstVideoCodecState * state)
+{
+  return FALSE;
+}
+
+static gboolean
+gst_omx_vp9_dec_set_format (GstOMXVideoDec * dec, GstOMXPort * port,
+    GstVideoCodecState * state)
+{
+  gboolean ret;
+  OMX_PARAM_PORTDEFINITIONTYPE port_def;
+
+  gst_omx_port_get_port_definition (port, &port_def);
+  port_def.format.video.eCompressionFormat = OMX_VIDEO_CodingVP9;
+  ret = gst_omx_port_update_port_definition (port, &port_def) == OMX_ErrorNone;
+
+  return ret;
+}
diff --git a/omx/gstomxvp9dec.h b/omx/gstomxvp9dec.h
new file mode 100644 (file)
index 0000000..b57651d
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *   Author: Sejun Park <sejun79.park@samsung.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+ *
+ */
+
+#ifndef __GST_OMX_VP9_DEC_H__
+#define __GST_OMX_VP9_DEC_H__
+
+#include <gst/gst.h>
+#include "gstomxvideodec.h"
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_OMX_VP9_DEC \
+  (gst_omx_vp9_dec_get_type())
+#define GST_OMX_VP9_DEC(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OMX_VP9_DEC,GstOMXVP9Dec))
+#define GST_OMX_VP9_DEC_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OMX_VP9_DEC,GstOMXVP9DecClass))
+#define GST_OMX_VP9_DEC_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_OMX_VP9_DEC,GstOMXVP9DecClass))
+#define GST_IS_OMX_VP9_DEC(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OMX_VP9_DEC))
+#define GST_IS_OMX_VP9_DEC_CLASS(obj) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OMX_VP9_DEC))
+
+typedef struct _GstOMXVP9Dec GstOMXVP9Dec;
+typedef struct _GstOMXVP9DecClass GstOMXVP9DecClass;
+
+struct _GstOMXVP9Dec
+{
+  GstOMXVideoDec parent;
+};
+
+struct _GstOMXVP9DecClass
+{
+  GstOMXVideoDecClass parent_class;
+};
+
+GType gst_omx_vp9_dec_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_OMX_VP9_DEC_H__ */
+
index 4c4995c..5e44aba 100644 (file)
@@ -1,27 +1,27 @@
 /**
- * Copyright (c) 2008 The Khronos Group Inc. 
- * 
+ * Copyright (c) 2008 The Khronos Group Inc.
+ *
  * Permission is hereby granted, free of charge, to any person obtaining
  * a copy of this software and associated documentation files (the
  * "Software"), to deal in the Software without restriction, including
  * without limitation the rights to use, copy, modify, merge, publish,
  * distribute, sublicense, and/or sell copies of the Software, and to
  * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions: 
+ * to the following conditions:
  * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software. 
- * 
+ * in all copies or substantial portions of the Software.
+ *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  *
  */
 
-/** 
+/**
  * @file OMX_IVCommon.h - OpenMax IL version 1.1.2
  *  The structures needed by Video and Image components to exchange
  *  parameters and configuration data with the components.
@@ -36,7 +36,7 @@ extern "C" {
 /**
  * Each OMX header must include all required header files to allow the header
  * to compile without errors.  The includes below are required for this header
- * file to compile successfully 
+ * file to compile successfully
  */
 
 #include <OMX_Core.h>
@@ -47,8 +47,8 @@ extern "C" {
  */
 
 
-/** 
- * Enumeration defining possible uncompressed image/video formats. 
+/**
+ * Enumeration defining possible uncompressed image/video formats.
  *
  * ENUMS:
  *  Unused                 : Placeholder value when format is N/A
@@ -96,7 +96,7 @@ typedef enum OMX_COLOR_FORMATTYPE {
     OMX_COLOR_Format16bitBGR565,
     OMX_COLOR_Format18bitRGB666,
     OMX_COLOR_Format18bitARGB1665,
-    OMX_COLOR_Format19bitARGB1666, 
+    OMX_COLOR_Format19bitARGB1666,
     OMX_COLOR_Format24bitRGB888,
     OMX_COLOR_Format24bitBGR888,
     OMX_COLOR_Format24bitARGB1887,
@@ -119,53 +119,60 @@ typedef enum OMX_COLOR_FORMATTYPE {
     OMX_COLOR_FormatRawBayer8bit,
     OMX_COLOR_FormatRawBayer10bit,
     OMX_COLOR_FormatRawBayer8bitcompressed,
-    OMX_COLOR_FormatL2, 
-    OMX_COLOR_FormatL4, 
-    OMX_COLOR_FormatL8, 
-    OMX_COLOR_FormatL16, 
-    OMX_COLOR_FormatL24, 
+    OMX_COLOR_FormatL2,
+    OMX_COLOR_FormatL4,
+    OMX_COLOR_FormatL8,
+    OMX_COLOR_FormatL16,
+    OMX_COLOR_FormatL24,
     OMX_COLOR_FormatL32,
     OMX_COLOR_FormatYUV420PackedSemiPlanar,
     OMX_COLOR_FormatYUV422PackedSemiPlanar,
     OMX_COLOR_Format18BitBGR666,
     OMX_COLOR_Format24BitARGB6666,
     OMX_COLOR_Format24BitABGR6666,
-    OMX_COLOR_FormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_COLOR_FormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_COLOR_FormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
+#ifdef TIZEN_FEATURE_OMX
+    OMX_EXT_COLOR_FormatNV12TPhysicalAddress = 0x7F000001, /**< Reserved region for introducing Vendor Extensions */
+    OMX_EXT_COLOR_FormatNV12LPhysicalAddress = 0x7F000002,
+    OMX_EXT_COLOR_FormatNV12Tiled = 0x7FC00002,
+    OMX_EXT_COLOR_FormatNV12TFdValue = 0x7F000012,
+    OMX_EXT_COLOR_FormatNV12LFdValue = 0x7F000013,
+#endif
     OMX_COLOR_FormatMax = 0x7FFFFFFF
 } OMX_COLOR_FORMATTYPE;
 
 
-/** 
+/**
  * Defines the matrix for conversion from RGB to YUV or vice versa.
- * iColorMatrix should be initialized with the fixed point values 
+ * iColorMatrix should be initialized with the fixed point values
  * used in converting between formats.
  */
 typedef struct OMX_CONFIG_COLORCONVERSIONTYPE {
     OMX_U32 nSize;              /**< Size of the structure in bytes */
-    OMX_VERSIONTYPE nVersion;   /**< OMX specification version info */ 
+    OMX_VERSIONTYPE nVersion;   /**< OMX specification version info */
     OMX_U32 nPortIndex;         /**< Port that this struct applies to */
     OMX_S32 xColorMatrix[3][3]; /**< Stored in signed Q16 format */
     OMX_S32 xColorOffset[4];    /**< Stored in signed Q16 format */
 }OMX_CONFIG_COLORCONVERSIONTYPE;
 
 
-/** 
- * Structure defining percent to scale each frame dimension.  For example:  
+/**
+ * Structure defining percent to scale each frame dimension.  For example:
  * To make the width 50% larger, use fWidth = 1.5 and to make the width
  * 1/2 the original size, use fWidth = 0.5
  */
 typedef struct OMX_CONFIG_SCALEFACTORTYPE {
     OMX_U32 nSize;            /**< Size of the structure in bytes */
-    OMX_VERSIONTYPE nVersion; /**< OMX specification version info */ 
+    OMX_VERSIONTYPE nVersion; /**< OMX specification version info */
     OMX_U32 nPortIndex;       /**< Port that this struct applies to */
     OMX_S32 xWidth;           /**< Fixed point value stored as Q16 */
     OMX_S32 xHeight;          /**< Fixed point value stored as Q16 */
 }OMX_CONFIG_SCALEFACTORTYPE;
 
 
-/** 
- * Enumeration of possible image filter types 
+/**
+ * Enumeration of possible image filter types
  */
 typedef enum OMX_IMAGEFILTERTYPE {
     OMX_ImageFilterNone,
@@ -176,23 +183,23 @@ typedef enum OMX_IMAGEFILTERTYPE {
     OMX_ImageFilterOilPaint,
     OMX_ImageFilterHatch,
     OMX_ImageFilterGpen,
-    OMX_ImageFilterAntialias, 
-    OMX_ImageFilterDeRing,       
+    OMX_ImageFilterAntialias,
+    OMX_ImageFilterDeRing,
     OMX_ImageFilterSolarize,
-    OMX_ImageFilterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_ImageFilterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_ImageFilterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_ImageFilterMax = 0x7FFFFFFF
 } OMX_IMAGEFILTERTYPE;
 
 
-/** 
- * Image filter configuration 
+/**
+ * Image filter configuration
  *
  * STRUCT MEMBERS:
- *  nSize        : Size of the structure in bytes       
+ *  nSize        : Size of the structure in bytes
  *  nVersion     : OMX specification version information
- *  nPortIndex   : Port that this structure applies to 
- *  eImageFilter : Image filter type enumeration      
+ *  nPortIndex   : Port that this structure applies to
+ *  eImageFilter : Image filter type enumeration
  */
 typedef struct OMX_CONFIG_IMAGEFILTERTYPE {
     OMX_U32 nSize;
@@ -202,22 +209,22 @@ typedef struct OMX_CONFIG_IMAGEFILTERTYPE {
 } OMX_CONFIG_IMAGEFILTERTYPE;
 
 
-/** 
- * Customized U and V for color enhancement 
+/**
+ * Customized U and V for color enhancement
  *
  * STRUCT MEMBERS:
  *  nSize             : Size of the structure in bytes
- *  nVersion          : OMX specification version information 
+ *  nVersion          : OMX specification version information
  *  nPortIndex        : Port that this structure applies to
  *  bColorEnhancement : Enable/disable color enhancement
- *  nCustomizedU      : Practical values: 16-240, range: 0-255, value set for 
+ *  nCustomizedU      : Practical values: 16-240, range: 0-255, value set for
  *                      U component
- *  nCustomizedV      : Practical values: 16-240, range: 0-255, value set for 
+ *  nCustomizedV      : Practical values: 16-240, range: 0-255, value set for
  *                      V component
  */
 typedef struct OMX_CONFIG_COLORENHANCEMENTTYPE {
     OMX_U32 nSize;
-    OMX_VERSIONTYPE nVersion; 
+    OMX_VERSIONTYPE nVersion;
     OMX_U32 nPortIndex;
     OMX_BOOL bColorEnhancement;
     OMX_U8 nCustomizedU;
@@ -225,12 +232,12 @@ typedef struct OMX_CONFIG_COLORENHANCEMENTTYPE {
 } OMX_CONFIG_COLORENHANCEMENTTYPE;
 
 
-/** 
- * Define color key and color key mask 
+/**
+ * Define color key and color key mask
  *
  * STRUCT MEMBERS:
  *  nSize      : Size of the structure in bytes
- *  nVersion   : OMX specification version information 
+ *  nVersion   : OMX specification version information
  *  nPortIndex : Port that this structure applies to
  *  nARGBColor : 32bit Alpha, Red, Green, Blue Color
  *  nARGBMask  : 32bit Mask for Alpha, Red, Green, Blue channels
@@ -244,12 +251,12 @@ typedef struct OMX_CONFIG_COLORKEYTYPE {
 } OMX_CONFIG_COLORKEYTYPE;
 
 
-/** 
- * List of color blend types for pre/post processing 
+/**
+ * List of color blend types for pre/post processing
  *
  * ENUMS:
  *  None          : No color blending present
- *  AlphaConstant : Function is (alpha_constant * src) + 
+ *  AlphaConstant : Function is (alpha_constant * src) +
  *                  (1 - alpha_constant) * dst)
  *  AlphaPerPixel : Function is (alpha * src) + (1 - alpha) * dst)
  *  Alternate     : Function is alternating pixels from src and dst
@@ -265,21 +272,21 @@ typedef enum OMX_COLORBLENDTYPE {
     OMX_ColorBlendAnd,
     OMX_ColorBlendOr,
     OMX_ColorBlendInvert,
-    OMX_ColorBlendKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_ColorBlendKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_ColorBlendVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_ColorBlendMax = 0x7FFFFFFF
 } OMX_COLORBLENDTYPE;
 
 
-/** 
- * Color blend configuration 
+/**
+ * Color blend configuration
  *
  * STRUCT MEMBERS:
- *  nSize             : Size of the structure in bytes                        
- *  nVersion          : OMX specification version information                
- *  nPortIndex        : Port that this structure applies to                   
+ *  nSize             : Size of the structure in bytes
+ *  nVersion          : OMX specification version information
+ *  nPortIndex        : Port that this structure applies to
  *  nRGBAlphaConstant : Constant global alpha values when global alpha is used
- *  eColorBlend       : Color blend type enumeration                         
+ *  eColorBlend       : Color blend type enumeration
  */
 typedef struct OMX_CONFIG_COLORBLENDTYPE {
     OMX_U32 nSize;
@@ -290,15 +297,15 @@ typedef struct OMX_CONFIG_COLORBLENDTYPE {
 } OMX_CONFIG_COLORBLENDTYPE;
 
 
-/** 
+/**
  * Hold frame dimension
  *
  * STRUCT MEMBERS:
- *  nSize      : Size of the structure in bytes      
+ *  nSize      : Size of the structure in bytes
  *  nVersion   : OMX specification version information
- *  nPortIndex : Port that this structure applies to     
- *  nWidth     : Frame width in pixels                 
- *  nHeight    : Frame height in pixels                
+ *  nPortIndex : Port that this structure applies to
+ *  nWidth     : Frame width in pixels
+ *  nHeight    : Frame height in pixels
  */
 typedef struct OMX_FRAMESIZETYPE {
     OMX_U32 nSize;
@@ -310,69 +317,69 @@ typedef struct OMX_FRAMESIZETYPE {
 
 
 /**
- * Rotation configuration 
+ * Rotation configuration
  *
  * STRUCT MEMBERS:
- *  nSize      : Size of the structure in bytes             
+ *  nSize      : Size of the structure in bytes
  *  nVersion   : OMX specification version information
  *  nPortIndex : Port that this structure applies to
- *  nRotation  : +/- integer rotation value               
+ *  nRotation  : +/- integer rotation value
  */
 typedef struct OMX_CONFIG_ROTATIONTYPE {
     OMX_U32 nSize;
     OMX_VERSIONTYPE nVersion;
     OMX_U32 nPortIndex;
-    OMX_S32 nRotation; 
+    OMX_S32 nRotation;
 } OMX_CONFIG_ROTATIONTYPE;
 
 
-/** 
- * Possible mirroring directions for pre/post processing 
+/**
+ * Possible mirroring directions for pre/post processing
  *
  * ENUMS:
- *  None       : No mirroring                         
- *  Vertical   : Vertical mirroring, flip on X axis   
- *  Horizontal : Horizontal mirroring, flip on Y axis  
+ *  None       : No mirroring
+ *  Vertical   : Vertical mirroring, flip on X axis
+ *  Horizontal : Horizontal mirroring, flip on Y axis
  *  Both       : Both vertical and horizontal mirroring
  */
 typedef enum OMX_MIRRORTYPE {
     OMX_MirrorNone = 0,
     OMX_MirrorVertical,
     OMX_MirrorHorizontal,
-    OMX_MirrorBoth, 
-    OMX_MirrorKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_MirrorBoth,
+    OMX_MirrorKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_MirrorVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
-    OMX_MirrorMax = 0x7FFFFFFF   
+    OMX_MirrorMax = 0x7FFFFFFF
 } OMX_MIRRORTYPE;
 
 
-/** 
- * Mirroring configuration 
+/**
+ * Mirroring configuration
  *
  * STRUCT MEMBERS:
- *  nSize      : Size of the structure in bytes      
+ *  nSize      : Size of the structure in bytes
  *  nVersion   : OMX specification version information
- *  nPortIndex : Port that this structure applies to  
- *  eMirror    : Mirror type enumeration              
+ *  nPortIndex : Port that this structure applies to
+ *  eMirror    : Mirror type enumeration
  */
 typedef struct OMX_CONFIG_MIRRORTYPE {
     OMX_U32 nSize;
-    OMX_VERSIONTYPE nVersion; 
+    OMX_VERSIONTYPE nVersion;
     OMX_U32 nPortIndex;
     OMX_MIRRORTYPE  eMirror;
 } OMX_CONFIG_MIRRORTYPE;
 
 
-/** 
- * Position information only 
+/**
+ * Position information only
  *
  * STRUCT MEMBERS:
- *  nSize      : Size of the structure in bytes               
+ *  nSize      : Size of the structure in bytes
  *  nVersion   : OMX specification version information
  *  nPortIndex : Port that this structure applies to
- *  nX         : X coordinate for the point                     
- *  nY         : Y coordinate for the point 
- */                      
+ *  nX         : X coordinate for the point
+ *  nY         : Y coordinate for the point
+ */
 typedef struct OMX_CONFIG_POINTTYPE {
     OMX_U32 nSize;
     OMX_VERSIONTYPE nVersion;
@@ -382,37 +389,37 @@ typedef struct OMX_CONFIG_POINTTYPE {
 } OMX_CONFIG_POINTTYPE;
 
 
-/** 
- * Frame size plus position 
+/**
+ * Frame size plus position
  *
  * STRUCT MEMBERS:
- *  nSize      : Size of the structure in bytes                    
- *  nVersion   : OMX specification version information      
- *  nPortIndex : Port that this structure applies to    
+ *  nSize      : Size of the structure in bytes
+ *  nVersion   : OMX specification version information
+ *  nPortIndex : Port that this structure applies to
  *  nLeft      : X Coordinate of the top left corner of the rectangle
  *  nTop       : Y Coordinate of the top left corner of the rectangle
- *  nWidth     : Width of the rectangle                              
- *  nHeight    : Height of the rectangle                             
+ *  nWidth     : Width of the rectangle
+ *  nHeight    : Height of the rectangle
  */
 typedef struct OMX_CONFIG_RECTTYPE {
     OMX_U32 nSize;
-    OMX_VERSIONTYPE nVersion;  
-    OMX_U32 nPortIndex; 
-    OMX_S32 nLeft; 
+    OMX_VERSIONTYPE nVersion;
+    OMX_U32 nPortIndex;
+    OMX_S32 nLeft;
     OMX_S32 nTop;
     OMX_U32 nWidth;
     OMX_U32 nHeight;
 } OMX_CONFIG_RECTTYPE;
 
 
-/** 
- * Deblocking state; it is required to be set up before starting the codec 
+/**
+ * Deblocking state; it is required to be set up before starting the codec
  *
  * STRUCT MEMBERS:
- *  nSize       : Size of the structure in bytes      
- *  nVersion    : OMX specification version information 
+ *  nSize       : Size of the structure in bytes
+ *  nVersion    : OMX specification version information
  *  nPortIndex  : Port that this structure applies to
- *  bDeblocking : Enable/disable deblocking mode    
+ *  bDeblocking : Enable/disable deblocking mode
  */
 typedef struct OMX_PARAM_DEBLOCKINGTYPE {
     OMX_U32 nSize;
@@ -422,13 +429,13 @@ typedef struct OMX_PARAM_DEBLOCKINGTYPE {
 } OMX_PARAM_DEBLOCKINGTYPE;
 
 
-/** 
- * Stabilization state 
+/**
+ * Stabilization state
  *
  * STRUCT MEMBERS:
- *  nSize      : Size of the structure in bytes          
- *  nVersion   : OMX specification version information    
- *  nPortIndex : Port that this structure applies to   
+ *  nSize      : Size of the structure in bytes
+ *  nVersion   : OMX specification version information
+ *  nPortIndex : Port that this structure applies to
  *  bStab      : Enable/disable frame stabilization state
  */
 typedef struct OMX_CONFIG_FRAMESTABTYPE {
@@ -439,8 +446,8 @@ typedef struct OMX_CONFIG_FRAMESTABTYPE {
 } OMX_CONFIG_FRAMESTABTYPE;
 
 
-/** 
- * White Balance control type 
+/**
+ * White Balance control type
  *
  * STRUCT MEMBERS:
  *  SunLight : Referenced in JSR-234
@@ -457,20 +464,20 @@ typedef enum OMX_WHITEBALCONTROLTYPE {
     OMX_WhiteBalControlIncandescent,
     OMX_WhiteBalControlFlash,
     OMX_WhiteBalControlHorizon,
-    OMX_WhiteBalControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_WhiteBalControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_WhiteBalControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_WhiteBalControlMax = 0x7FFFFFFF
 } OMX_WHITEBALCONTROLTYPE;
 
 
-/** 
- * White Balance control configuration 
+/**
+ * White Balance control configuration
  *
  * STRUCT MEMBERS:
- *  nSize            : Size of the structure in bytes       
+ *  nSize            : Size of the structure in bytes
  *  nVersion         : OMX specification version information
- *  nPortIndex       : Port that this structure applies to                 
- *  eWhiteBalControl : White balance enumeration            
+ *  nPortIndex       : Port that this structure applies to
+ *  eWhiteBalControl : White balance enumeration
  */
 typedef struct OMX_CONFIG_WHITEBALCONTROLTYPE {
     OMX_U32 nSize;
@@ -480,8 +487,8 @@ typedef struct OMX_CONFIG_WHITEBALCONTROLTYPE {
 } OMX_CONFIG_WHITEBALCONTROLTYPE;
 
 
-/** 
- * Exposure control type 
+/**
+ * Exposure control type
  */
 typedef enum OMX_EXPOSURECONTROLTYPE {
     OMX_ExposureControlOff = 0,
@@ -494,20 +501,20 @@ typedef enum OMX_EXPOSURECONTROLTYPE {
     OMX_ExposureControlBeach,
     OMX_ExposureControlLargeAperture,
     OMX_ExposureControlSmallApperture,
-    OMX_ExposureControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_ExposureControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_ExposureControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_ExposureControlMax = 0x7FFFFFFF
 } OMX_EXPOSURECONTROLTYPE;
 
 
-/** 
- * White Balance control configuration 
+/**
+ * White Balance control configuration
  *
  * STRUCT MEMBERS:
- *  nSize            : Size of the structure in bytes      
+ *  nSize            : Size of the structure in bytes
  *  nVersion         : OMX specification version information
- *  nPortIndex       : Port that this structure applies to                
- *  eExposureControl : Exposure control enumeration         
+ *  nPortIndex       : Port that this structure applies to
+ *  eExposureControl : Exposure control enumeration
  */
 typedef struct OMX_CONFIG_EXPOSURECONTROLTYPE {
     OMX_U32 nSize;
@@ -517,16 +524,16 @@ typedef struct OMX_CONFIG_EXPOSURECONTROLTYPE {
 } OMX_CONFIG_EXPOSURECONTROLTYPE;
 
 
-/** 
- * Defines sensor supported mode. 
+/**
+ * Defines sensor supported mode.
  *
  * STRUCT MEMBERS:
- *  nSize      : Size of the structure in bytes           
+ *  nSize      : Size of the structure in bytes
  *  nVersion   : OMX specification version information
- *  nPortIndex : Port that this structure applies to 
- *  nFrameRate : Single shot mode is indicated by a 0     
+ *  nPortIndex : Port that this structure applies to
+ *  nFrameRate : Single shot mode is indicated by a 0
  *  bOneShot   : Enable for single shot, disable for streaming
- *  sFrameSize : Framesize                                          
+ *  sFrameSize : Framesize
  */
 typedef struct OMX_PARAM_SENSORMODETYPE {
     OMX_U32 nSize;
@@ -538,13 +545,13 @@ typedef struct OMX_PARAM_SENSORMODETYPE {
 } OMX_PARAM_SENSORMODETYPE;
 
 
-/** 
- * Defines contrast level 
+/**
+ * Defines contrast level
  *
  * STRUCT MEMBERS:
- *  nSize      : Size of the structure in bytes                              
- *  nVersion   : OMX specification version information                
- *  nPortIndex : Port that this structure applies to                 
+ *  nSize      : Size of the structure in bytes
+ *  nVersion   : OMX specification version information
+ *  nPortIndex : Port that this structure applies to
  *  nContrast  : Values allowed for contrast -100 to 100, zero means no change
  */
 typedef struct OMX_CONFIG_CONTRASTTYPE {
@@ -555,14 +562,14 @@ typedef struct OMX_CONFIG_CONTRASTTYPE {
 } OMX_CONFIG_CONTRASTTYPE;
 
 
-/** 
- * Defines brightness level 
+/**
+ * Defines brightness level
  *
  * STRUCT MEMBERS:
- *  nSize       : Size of the structure in bytes          
- *  nVersion    : OMX specification version information 
- *  nPortIndex  : Port that this structure applies to 
- *  nBrightness : 0-100%        
+ *  nSize       : Size of the structure in bytes
+ *  nVersion    : OMX specification version information
+ *  nPortIndex  : Port that this structure applies to
+ *  nBrightness : 0-100%
  */
 typedef struct OMX_CONFIG_BRIGHTNESSTYPE {
     OMX_U32 nSize;
@@ -572,16 +579,16 @@ typedef struct OMX_CONFIG_BRIGHTNESSTYPE {
 } OMX_CONFIG_BRIGHTNESSTYPE;
 
 
-/** 
- * Defines backlight level configuration for a video sink, e.g. LCD panel 
+/**
+ * Defines backlight level configuration for a video sink, e.g. LCD panel
  *
  * STRUCT MEMBERS:
  *  nSize      : Size of the structure in bytes
- *  nVersion   : OMX specification version information 
+ *  nVersion   : OMX specification version information
  *  nPortIndex : Port that this structure applies to
  *  nBacklight : Values allowed for backlight 0-100%
- *  nTimeout   : Number of milliseconds before backlight automatically turns 
- *               off.  A value of 0x0 disables backight timeout 
+ *  nTimeout   : Number of milliseconds before backlight automatically turns
+ *               off.  A value of 0x0 disables backight timeout
  */
 typedef struct OMX_CONFIG_BACKLIGHTTYPE {
     OMX_U32 nSize;
@@ -592,12 +599,12 @@ typedef struct OMX_CONFIG_BACKLIGHTTYPE {
 } OMX_CONFIG_BACKLIGHTTYPE;
 
 
-/** 
- * Defines setting for Gamma 
+/**
+ * Defines setting for Gamma
  *
  * STRUCT MEMBERS:
  *  nSize      : Size of the structure in bytes
- *  nVersion   : OMX specification version information 
+ *  nVersion   : OMX specification version information
  *  nPortIndex : Port that this structure applies to
  *  nGamma     : Values allowed for gamma -100 to 100, zero means no change
  */
@@ -609,14 +616,14 @@ typedef struct OMX_CONFIG_GAMMATYPE {
 } OMX_CONFIG_GAMMATYPE;
 
 
-/** 
- * Define for setting saturation 
- * 
+/**
+ * Define for setting saturation
+ *
  * STRUCT MEMBERS:
  *  nSize       : Size of the structure in bytes
  *  nVersion    : OMX specification version information
  *  nPortIndex  : Port that this structure applies to
- *  nSaturation : Values allowed for saturation -100 to 100, zero means 
+ *  nSaturation : Values allowed for saturation -100 to 100, zero means
  *                no change
  */
 typedef struct OMX_CONFIG_SATURATIONTYPE {
@@ -627,14 +634,14 @@ typedef struct OMX_CONFIG_SATURATIONTYPE {
 } OMX_CONFIG_SATURATIONTYPE;
 
 
-/** 
- * Define for setting Lightness 
+/**
+ * Define for setting Lightness
  *
  * STRUCT MEMBERS:
  *  nSize      : Size of the structure in bytes
  *  nVersion   : OMX specification version information
  *  nPortIndex : Port that this structure applies to
- *  nLightness : Values allowed for lightness -100 to 100, zero means no 
+ *  nLightness : Values allowed for lightness -100 to 100, zero means no
  *               change
  */
 typedef struct OMX_CONFIG_LIGHTNESSTYPE {
@@ -645,17 +652,17 @@ typedef struct OMX_CONFIG_LIGHTNESSTYPE {
 } OMX_CONFIG_LIGHTNESSTYPE;
 
 
-/** 
- * Plane blend configuration 
+/**
+ * Plane blend configuration
  *
  * STRUCT MEMBERS:
- *  nSize      : Size of the structure in bytes 
+ *  nSize      : Size of the structure in bytes
  *  nVersion   : OMX specification version information
  *  nPortIndex : Index of input port associated with the plane.
- *  nDepth     : Depth of the plane in relation to the screen. Higher 
- *               numbered depths are "behind" lower number depths.  
+ *  nDepth     : Depth of the plane in relation to the screen. Higher
+ *               numbered depths are "behind" lower number depths.
  *               This number defaults to the Port Index number.
- *  nAlpha     : Transparency blending component for the entire plane.  
+ *  nAlpha     : Transparency blending component for the entire plane.
  *               See blending modes for more detail.
  */
 typedef struct OMX_CONFIG_PLANEBLENDTYPE {
@@ -667,17 +674,17 @@ typedef struct OMX_CONFIG_PLANEBLENDTYPE {
 } OMX_CONFIG_PLANEBLENDTYPE;
 
 
-/** 
+/**
  * Define interlace type
  *
  * STRUCT MEMBERS:
- *  nSize                 : Size of the structure in bytes 
- *  nVersion              : OMX specification version information 
+ *  nSize                 : Size of the structure in bytes
+ *  nVersion              : OMX specification version information
  *  nPortIndex            : Port that this structure applies to
- *  bEnable               : Enable control variable for this functionality 
+ *  bEnable               : Enable control variable for this functionality
  *                          (see below)
- *  nInterleavePortIndex  : Index of input or output port associated with  
- *                          the interleaved plane. 
+ *  nInterleavePortIndex  : Index of input or output port associated with
+ *                          the interleaved plane.
  *  pPlanarPortIndexes[4] : Index of input or output planar ports.
  */
 typedef struct OMX_PARAM_INTERLEAVETYPE {
@@ -689,8 +696,8 @@ typedef struct OMX_PARAM_INTERLEAVETYPE {
 } OMX_PARAM_INTERLEAVETYPE;
 
 
-/** 
- * Defines the picture effect used for an input picture 
+/**
+ * Defines the picture effect used for an input picture
  */
 typedef enum OMX_TRANSITIONEFFECTTYPE {
     OMX_EffectNone,
@@ -700,18 +707,18 @@ typedef enum OMX_TRANSITIONEFFECTTYPE {
     OMX_EffectDissolve,
     OMX_EffectWipe,
     OMX_EffectUnspecifiedMixOfTwoScenes,
-    OMX_EffectKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_EffectKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_EffectVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_EffectMax = 0x7FFFFFFF
 } OMX_TRANSITIONEFFECTTYPE;
 
 
-/** 
- * Structure used to configure current transition effect 
+/**
+ * Structure used to configure current transition effect
  *
  * STRUCT MEMBERS:
  * nSize      : Size of the structure in bytes
- * nVersion   : OMX specification version information 
+ * nVersion   : OMX specification version information
  * nPortIndex : Port that this structure applies to
  * eEffect    : Effect to enable
  */
@@ -723,43 +730,43 @@ typedef struct OMX_CONFIG_TRANSITIONEFFECTTYPE {
 } OMX_CONFIG_TRANSITIONEFFECTTYPE;
 
 
-/** 
- * Defines possible data unit types for encoded video data. The data unit 
+/**
+ * Defines possible data unit types for encoded video data. The data unit
  * types are used both for encoded video input for playback as well as
- * encoded video output from recording. 
+ * encoded video output from recording.
  */
 typedef enum OMX_DATAUNITTYPE {
     OMX_DataUnitCodedPicture,
     OMX_DataUnitVideoSegment,
     OMX_DataUnitSeveralSegments,
     OMX_DataUnitArbitraryStreamSection,
-    OMX_DataUnitKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_DataUnitKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_DataUnitVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_DataUnitMax = 0x7FFFFFFF
 } OMX_DATAUNITTYPE;
 
 
-/** 
- * Defines possible encapsulation types for coded video data unit. The 
- * encapsulation information is used both for encoded video input for 
- * playback as well as encoded video output from recording. 
+/**
+ * Defines possible encapsulation types for coded video data unit. The
+ * encapsulation information is used both for encoded video input for
+ * playback as well as encoded video output from recording.
  */
 typedef enum OMX_DATAUNITENCAPSULATIONTYPE {
     OMX_DataEncapsulationElementaryStream,
     OMX_DataEncapsulationGenericPayload,
     OMX_DataEncapsulationRtpPayload,
-    OMX_DataEncapsulationKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_DataEncapsulationKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_DataEncapsulationVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_DataEncapsulationMax = 0x7FFFFFFF
 } OMX_DATAUNITENCAPSULATIONTYPE;
 
 
-/** 
- * Structure used to configure the type of being decoded/encoded 
+/**
+ * Structure used to configure the type of being decoded/encoded
  */
 typedef struct OMX_PARAM_DATAUNITTYPE {
     OMX_U32 nSize;            /**< Size of the structure in bytes */
-    OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 
+    OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
     OMX_U32 nPortIndex;       /**< Port that this structure applies to */
     OMX_DATAUNITTYPE eUnitType;
     OMX_DATAUNITENCAPSULATIONTYPE eEncapsulationType;
@@ -767,25 +774,25 @@ typedef struct OMX_PARAM_DATAUNITTYPE {
 
 
 /**
- * Defines dither types 
+ * Defines dither types
  */
 typedef enum OMX_DITHERTYPE {
     OMX_DitherNone,
     OMX_DitherOrdered,
     OMX_DitherErrorDiffusion,
     OMX_DitherOther,
-    OMX_DitherKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_DitherKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_DitherVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_DitherMax = 0x7FFFFFFF
 } OMX_DITHERTYPE;
 
 
-/** 
- * Structure used to configure current type of dithering 
+/**
+ * Structure used to configure current type of dithering
  */
 typedef struct OMX_CONFIG_DITHERTYPE {
     OMX_U32 nSize;            /**< Size of the structure in bytes */
-    OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 
+    OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
     OMX_U32 nPortIndex;       /**< Port that this structure applies to */
     OMX_DITHERTYPE eDither;   /**< Type of dithering to use */
 } OMX_CONFIG_DITHERTYPE;
@@ -794,28 +801,28 @@ typedef struct OMX_CONFIG_CAPTUREMODETYPE {
     OMX_U32 nSize;
     OMX_VERSIONTYPE nVersion;
     OMX_U32 nPortIndex;     /**< Port that this structure applies to */
-    OMX_BOOL bContinuous;   /**< If true then ignore frame rate and emit capture 
+    OMX_BOOL bContinuous;   /**< If true then ignore frame rate and emit capture
                              *   data as fast as possible (otherwise obey port's frame rate). */
-    OMX_BOOL bFrameLimited; /**< If true then terminate capture after the port emits the 
-                             *   specified number of frames (otherwise the port does not 
-                             *   terminate the capture until instructed to do so by the client). 
-                             *   Even if set, the client may manually terminate the capture prior 
+    OMX_BOOL bFrameLimited; /**< If true then terminate capture after the port emits the
+                             *   specified number of frames (otherwise the port does not
+                             *   terminate the capture until instructed to do so by the client).
+                             *   Even if set, the client may manually terminate the capture prior
                              *   to reaching the limit. */
     OMX_U32 nFrameLimit;      /**< Limit on number of frames emitted during a capture (only
                                *   valid if bFrameLimited is set). */
 } OMX_CONFIG_CAPTUREMODETYPE;
 
 typedef enum OMX_METERINGTYPE {
+
     OMX_MeteringModeAverage,     /**< Center-weighted average metering. */
     OMX_MeteringModeSpot,            /**< Spot (partial) metering. */
     OMX_MeteringModeMatrix,      /**< Matrix or evaluative metering. */
-    OMX_MeteringKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+
+    OMX_MeteringKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_MeteringVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_EVModeMax = 0x7fffffff
 } OMX_METERINGTYPE;
+
 typedef struct OMX_CONFIG_EXPOSUREVALUETYPE {
     OMX_U32 nSize;
     OMX_VERSIONTYPE nVersion;
@@ -824,14 +831,14 @@ typedef struct OMX_CONFIG_EXPOSUREVALUETYPE {
     OMX_S32 xEVCompensation;      /**< Fixed point value stored as Q16 */
     OMX_U32 nApertureFNumber;     /**< e.g. nApertureFNumber = 2 implies "f/2" - Q16 format */
     OMX_BOOL bAutoAperture;            /**< Whether aperture number is defined automatically */
-    OMX_U32 nShutterSpeedMsec;    /**< Shutterspeed in milliseconds */ 
-    OMX_BOOL bAutoShutterSpeed;        /**< Whether shutter speed is defined automatically */ 
+    OMX_U32 nShutterSpeedMsec;    /**< Shutterspeed in milliseconds */
+    OMX_BOOL bAutoShutterSpeed;        /**< Whether shutter speed is defined automatically */
     OMX_U32 nSensitivity;         /**< e.g. nSensitivity = 100 implies "ISO 100" */
     OMX_BOOL bAutoSensitivity; /**< Whether sensitivity is defined automatically */
 } OMX_CONFIG_EXPOSUREVALUETYPE;
 
-/** 
- * Focus region configuration 
+/**
+ * Focus region configuration
  *
  * STRUCT MEMBERS:
  *  nSize           : Size of the structure in bytes
@@ -862,8 +869,8 @@ typedef struct OMX_CONFIG_FOCUSREGIONTYPE {
     OMX_BOOL bBottomRight;
 } OMX_CONFIG_FOCUSREGIONTYPE;
 
-/** 
- * Focus Status type 
+/**
+ * Focus Status type
  */
 typedef enum OMX_FOCUSSTATUSTYPE {
     OMX_FocusStatusOff = 0,
@@ -871,13 +878,13 @@ typedef enum OMX_FOCUSSTATUSTYPE {
     OMX_FocusStatusReached,
     OMX_FocusStatusUnableToReach,
     OMX_FocusStatusLost,
-    OMX_FocusStatusKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_FocusStatusKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     OMX_FocusStatusVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_FocusStatusMax = 0x7FFFFFFF
 } OMX_FOCUSSTATUSTYPE;
 
-/** 
- * Focus status configuration 
+/**
+ * Focus status configuration
  *
  * STRUCT MEMBERS:
  *  nSize               : Size of the structure in bytes
index 44d4ea7..bf4a9d8 100644 (file)
@@ -1,23 +1,23 @@
 /*
- * Copyright (c) 2008 The Khronos Group Inc. 
- * 
+ * Copyright (c) 2008 The Khronos Group Inc.
+ *
  * Permission is hereby granted, free of charge, to any person obtaining
  * a copy of this software and associated documentation files (the
  * "Software"), to deal in the Software without restriction, including
  * without limitation the rights to use, copy, modify, merge, publish,
  * distribute, sublicense, and/or sell copies of the Software, and to
  * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions: 
+ * to the following conditions:
  * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software. 
- * 
+ * in all copies or substantial portions of the Software.
+ *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  *
  */
 
@@ -37,22 +37,22 @@ extern "C" {
 
 /* Each OMX header must include all required header files to allow the
  *  header to compile without errors.  The includes below are required
- *  for this header file to compile successfully 
+ *  for this header file to compile successfully
  */
 #include <OMX_Types.h>
 
 
 /** The OMX_INDEXTYPE enumeration is used to select a structure when either
- *  getting or setting parameters and/or configuration data.  Each entry in 
- *  this enumeration maps to an OMX specified structure.  When the 
+ *  getting or setting parameters and/or configuration data.  Each entry in
+ *  this enumeration maps to an OMX specified structure.  When the
  *  OMX_GetParameter, OMX_SetParameter, OMX_GetConfig or OMX_SetConfig methods
  *  are used, the second parameter will always be an entry from this enumeration
  *  and the third entry will be the structure shown in the comments for the entry.
- *  For example, if the application is initializing a cropping function, the 
- *  OMX_SetConfig command would have OMX_IndexConfigCommonInputCrop as the second parameter 
- *  and would send a pointer to an initialized OMX_RECTTYPE structure as the 
+ *  For example, if the application is initializing a cropping function, the
+ *  OMX_SetConfig command would have OMX_IndexConfigCommonInputCrop as the second parameter
+ *  and would send a pointer to an initialized OMX_RECTTYPE structure as the
  *  third parameter.
- *  
+ *
  *  The enumeration entries named with the OMX_Config prefix are sent using
  *  the OMX_SetConfig command and the enumeration entries named with the
  *  OMX_PARAM_ prefix are sent using the OMX_SetParameter command.
@@ -69,11 +69,11 @@ typedef enum OMX_INDEXTYPE {
     OMX_IndexParamActiveStream,             /**< reference: OMX_PARAM_U32TYPE */
     OMX_IndexParamSuspensionPolicy,         /**< reference: OMX_PARAM_SUSPENSIONPOLICYTYPE */
     OMX_IndexParamComponentSuspended,       /**< reference: OMX_PARAM_SUSPENSIONTYPE */
-    OMX_IndexConfigCapturing,               /**< reference: OMX_CONFIG_BOOLEANTYPE */ 
-    OMX_IndexConfigCaptureMode,             /**< reference: OMX_CONFIG_CAPTUREMODETYPE */ 
-    OMX_IndexAutoPauseAfterCapture,         /**< reference: OMX_CONFIG_BOOLEANTYPE */ 
+    OMX_IndexConfigCapturing,               /**< reference: OMX_CONFIG_BOOLEANTYPE */
+    OMX_IndexConfigCaptureMode,             /**< reference: OMX_CONFIG_CAPTUREMODETYPE */
+    OMX_IndexAutoPauseAfterCapture,         /**< reference: OMX_CONFIG_BOOLEANTYPE */
     OMX_IndexParamContentURI,               /**< reference: OMX_PARAM_CONTENTURITYPE */
-    OMX_IndexParamCustomContentPipe,        /**< reference: OMX_PARAM_CONTENTPIPETYPE */ 
+    OMX_IndexParamCustomContentPipe,        /**< reference: OMX_PARAM_CONTENTPIPETYPE */
     OMX_IndexParamDisableResourceConcealment, /**< reference: OMX_RESOURCECONCEALMENTTYPE */
     OMX_IndexConfigMetadataItemCount,       /**< reference: OMX_CONFIG_METADATAITEMCOUNTTYPE */
     OMX_IndexConfigContainerNodeCount,      /**< reference: OMX_CONFIG_CONTAINERNODECOUNTTYPE */
@@ -86,7 +86,7 @@ typedef enum OMX_INDEXTYPE {
 
     OMX_IndexPortStartUnused = 0x02000000,
     OMX_IndexParamPortDefinition,           /**< reference: OMX_PARAM_PORTDEFINITIONTYPE */
-    OMX_IndexParamCompBufferSupplier,       /**< reference: OMX_PARAM_BUFFERSUPPLIERTYPE */ 
+    OMX_IndexParamCompBufferSupplier,       /**< reference: OMX_PARAM_BUFFERSUPPLIERTYPE */
     OMX_IndexReservedStartUnused = 0x03000000,
 
     /* Audio parameters and configurations */
@@ -238,13 +238,21 @@ typedef enum OMX_INDEXTYPE {
     OMX_IndexConfigTimeSeekMode,            /**< reference: OMX_TIME_CONFIG_SEEKMODETYPE */
 
 
-    OMX_IndexKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
+    OMX_IndexKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     /* Vendor specific area */
     OMX_IndexVendorStartUnused = 0x7F000000,
-    /* Vendor specific structures should be in the range of 0x7F000000 
+    /* Vendor specific structures should be in the range of 0x7F000000
        to 0x7FFFFFFE.  This range is not broken out by vendor, so
        private indexes are not guaranteed unique and therefore should
        only be sent to the appropriate component. */
+    OMX_IndexParamEnablePlatformSpecificBuffers = 0x7F000011,
+    OMX_IndexParamGetAndroidNativeBuffer = 0x7F000012,
+    OMX_IndexParamUseAndroidNativeBuffer = 0x7F000013,
+#define EXYNOS_INDEX_PARAM_STORE_METADATA_BUFFER "OMX.SEC.index.enablePlatformSpecificBuffers"
+    OMX_IndexParamStoreMetaDataBuffer = 0x7F000014,
+    OMX_IndexParamPrependSPSPPSToIDR = 0x7F000015,
+    OMX_IndexParamEnableTimestampReorder = 0x7F000016,
+    OMX_IndexParamSharedOutputFD = 0x7F000017,
 
     OMX_IndexMax = 0x7FFFFFFF
 
index a9b5d45..5fdbfbf 100644 (file)
@@ -50,7 +50,6 @@ typedef enum OMX_NALUFORMATSTYPE {
     OMX_NaluFormatCodingMax = 0x7FFFFFFF\r
 } OMX_NALUFORMATSTYPE;\r
 \r
-\r
 /** NAL Stream Format */\r
 typedef struct OMX_NALSTREAMFORMATTYPE{\r
     OMX_U32 nSize;\r
@@ -59,7 +58,151 @@ typedef struct OMX_NALSTREAMFORMATTYPE{
     OMX_NALUFORMATSTYPE eNaluFormat;\r
 } OMX_NALSTREAMFORMATTYPE;\r
 \r
+/** Enum for standard video codingtype extensions */\r
+typedef enum OMX_VIDEO_CODINGEXTTYPE {\r
+    OMX_VIDEO_ExtCodingUnused = OMX_VIDEO_CodingKhronosExtensions,\r
+    OMX_VIDEO_CodingVP8,        /**< VP8/WebM */\r
+    OMX_VIDEO_CodingVP9,        /**< VP9/WebM */\r
+    OMX_VIDEO_CodingHEVC,       /**< ITU H.265/HEVC */\r
+} OMX_VIDEO_CODINGEXTTYPE;\r
+\r
+/** VP8 profiles */\r
+typedef enum OMX_VIDEO_VP8PROFILETYPE {\r
+    OMX_VIDEO_VP8ProfileMain = 0x01,\r
+    OMX_VIDEO_VP8ProfileUnknown = 0x6EFFFFFF,\r
+    OMX_VIDEO_VP8ProfileMax = 0x7FFFFFFF\r
+} OMX_VIDEO_VP8PROFILETYPE;\r
+\r
+/** VP8 levels */\r
+typedef enum OMX_VIDEO_VP8LEVELTYPE {\r
+    OMX_VIDEO_VP8Level_Version0 = 0x01,\r
+    OMX_VIDEO_VP8Level_Version1 = 0x02,\r
+    OMX_VIDEO_VP8Level_Version2 = 0x04,\r
+    OMX_VIDEO_VP8Level_Version3 = 0x08,\r
+    OMX_VIDEO_VP8LevelUnknown = 0x6EFFFFFF,\r
+    OMX_VIDEO_VP8LevelMax = 0x7FFFFFFF\r
+} OMX_VIDEO_VP8LEVELTYPE;\r
+\r
+/** VP8 Param */\r
+typedef struct OMX_VIDEO_PARAM_VP8TYPE {\r
+    OMX_U32 nSize;\r
+    OMX_VERSIONTYPE nVersion;\r
+    OMX_U32 nPortIndex;\r
+    OMX_VIDEO_VP8PROFILETYPE eProfile;\r
+    OMX_VIDEO_VP8LEVELTYPE eLevel;\r
+    OMX_U32 nDCTPartitions;\r
+    OMX_BOOL bErrorResilientMode;\r
+} OMX_VIDEO_PARAM_VP8TYPE;\r
+\r
+/** Structure for configuring VP8 reference frames */\r
+typedef struct OMX_VIDEO_VP8REFERENCEFRAMETYPE {\r
+    OMX_U32 nSize;\r
+    OMX_VERSIONTYPE nVersion;\r
+    OMX_U32 nPortIndex;\r
+    OMX_BOOL bPreviousFrameRefresh;\r
+    OMX_BOOL bGoldenFrameRefresh;\r
+    OMX_BOOL bAlternateFrameRefresh;\r
+    OMX_BOOL bUsePreviousFrame;\r
+    OMX_BOOL bUseGoldenFrame;\r
+    OMX_BOOL bUseAlternateFrame;\r
+} OMX_VIDEO_VP8REFERENCEFRAMETYPE;\r
+\r
+/** Structure for querying VP8 reference frame type */\r
+typedef struct OMX_VIDEO_VP8REFERENCEFRAMEINFOTYPE {\r
+    OMX_U32 nSize;\r
+    OMX_VERSIONTYPE nVersion;\r
+    OMX_U32 nPortIndex;\r
+    OMX_BOOL bIsIntraFrame;\r
+    OMX_BOOL bIsGoldenOrAlternateFrame;\r
+} OMX_VIDEO_VP8REFERENCEFRAMEINFOTYPE;\r
+\r
+/** HEVC Profile enum type */\r
+typedef enum OMX_VIDEO_HEVCPROFILETYPE {\r
+    OMX_VIDEO_HEVCProfileUnknown = 0x0,\r
+    OMX_VIDEO_HEVCProfileMain    = 0x1,\r
+    OMX_VIDEO_HEVCProfileMain10  = 0x2,\r
+    OMX_VIDEO_HEVCProfileMax     = 0x7FFFFFFF\r
+} OMX_VIDEO_HEVCPROFILETYPE;\r
+\r
+/** HEVC Level enum type */\r
+typedef enum OMX_VIDEO_HEVCLEVELTYPE {\r
+    OMX_VIDEO_HEVCLevelUnknown    = 0x0,\r
+    OMX_VIDEO_HEVCMainTierLevel1  = 0x1,\r
+    OMX_VIDEO_HEVCHighTierLevel1  = 0x2,\r
+    OMX_VIDEO_HEVCMainTierLevel2  = 0x4,\r
+    OMX_VIDEO_HEVCHighTierLevel2  = 0x8,\r
+    OMX_VIDEO_HEVCMainTierLevel21 = 0x10,\r
+    OMX_VIDEO_HEVCHighTierLevel21 = 0x20,\r
+    OMX_VIDEO_HEVCMainTierLevel3  = 0x40,\r
+    OMX_VIDEO_HEVCHighTierLevel3  = 0x80,\r
+    OMX_VIDEO_HEVCMainTierLevel31 = 0x100,\r
+    OMX_VIDEO_HEVCHighTierLevel31 = 0x200,\r
+    OMX_VIDEO_HEVCMainTierLevel4  = 0x400,\r
+    OMX_VIDEO_HEVCHighTierLevel4  = 0x800,\r
+    OMX_VIDEO_HEVCMainTierLevel41 = 0x1000,\r
+    OMX_VIDEO_HEVCHighTierLevel41 = 0x2000,\r
+    OMX_VIDEO_HEVCMainTierLevel5  = 0x4000,\r
+    OMX_VIDEO_HEVCHighTierLevel5  = 0x8000,\r
+    OMX_VIDEO_HEVCMainTierLevel51 = 0x10000,\r
+    OMX_VIDEO_HEVCHighTierLevel51 = 0x20000,\r
+    OMX_VIDEO_HEVCMainTierLevel52 = 0x40000,\r
+    OMX_VIDEO_HEVCHighTierLevel52 = 0x80000,\r
+    OMX_VIDEO_HEVCMainTierLevel6  = 0x100000,\r
+    OMX_VIDEO_HEVCHighTierLevel6  = 0x200000,\r
+    OMX_VIDEO_HEVCMainTierLevel61 = 0x400000,\r
+    OMX_VIDEO_HEVCHighTierLevel61 = 0x800000,\r
+    OMX_VIDEO_HEVCMainTierLevel62 = 0x1000000,\r
+    OMX_VIDEO_HEVCHighTierLevel62 = 0x2000000,\r
+    OMX_VIDEO_HEVCHighTiermax     = 0x7FFFFFFF\r
+} OMX_VIDEO_HEVCLEVELTYPE;\r
 \r
+/** VP9 profiles */\r
+typedef enum OMX_VIDEO_VP9PROFILETYPE {\r
+    OMX_VIDEO_VP9Profile0 = 0x0,\r
+    OMX_VIDEO_VP9Profile1 = 0x1,\r
+    OMX_VIDEO_VP9Profile2 = 0x2,\r
+    OMX_VIDEO_VP9Profile3 = 0x3,\r
+    OMX_VIDEO_VP9ProfileUnknown = 0x6EFFFFFF,\r
+    OMX_VIDEO_VP9ProfileMax = 0x7FFFFFFF\r
+} OMX_VIDEO_VP9PROFILETYPE;\r
+\r
+/** VP9 levels */\r
+typedef enum OMX_VIDEO_VP9LEVELTYPE {\r
+    OMX_VIDEO_VP9Level1  = 0x0,\r
+    OMX_VIDEO_VP9Level11 = 0x1,\r
+    OMX_VIDEO_VP9Level2  = 0x2,\r
+    OMX_VIDEO_VP9Level21 = 0x4,\r
+    OMX_VIDEO_VP9Level3  = 0x8,\r
+    OMX_VIDEO_VP9Level31 = 0x10,\r
+    OMX_VIDEO_VP9Level4  = 0x20,\r
+    OMX_VIDEO_VP9Level41 = 0x40,\r
+    OMX_VIDEO_VP9Level5  = 0x80,\r
+    OMX_VIDEO_VP9Level51 = 0x100,\r
+    OMX_VIDEO_VP9Level52 = 0x200,\r
+    OMX_VIDEO_VP9Level6  = 0x400,\r
+    OMX_VIDEO_VP9Level61 = 0x800,\r
+    OMX_VIDEO_VP9Level62 = 0x1000,\r
+    OMX_VIDEO_VP9LevelUnknown = 0x6EFFFFFF,\r
+    OMX_VIDEO_VP9LevelMax = 0x7FFFFFFF\r
+} OMX_VIDEO_VP9LEVELTYPE;\r
+\r
+/** Structure for controlling HEVC video encoding and decoding */\r
+typedef struct OMX_VIDEO_PARAM_HEVCTYPE {\r
+    OMX_U32 nSize;\r
+    OMX_VERSIONTYPE nVersion;\r
+    OMX_U32 nPortIndex;\r
+    OMX_VIDEO_HEVCPROFILETYPE eProfile;\r
+    OMX_VIDEO_HEVCLEVELTYPE eLevel;\r
+} OMX_VIDEO_PARAM_HEVCTYPE;\r
+\r
+/** Structure to define if dependent slice segments should be used */\r
+typedef struct OMX_VIDEO_SLICESEGMENTSTYPE {\r
+    OMX_U32 nSize;\r
+    OMX_VERSIONTYPE nVersion;\r
+    OMX_U32 nPortIndex;\r
+    OMX_BOOL bDepedentSegments;\r
+    OMX_BOOL bEnableLoopFilterAcrossSlices;\r
+} OMX_VIDEO_SLICESEGMENTSTYPE;\r
 \r
 #ifdef __cplusplus\r
 }\r
diff --git a/packaging/common.tar.gz b/packaging/common.tar.gz
new file mode 100644 (file)
index 0000000..c3aef17
Binary files /dev/null and b/packaging/common.tar.gz differ
index f251385..2ff2c82 100755 (executable)
@@ -4,30 +4,34 @@ Version:        1.3.0
 Release:        0
 License:        LGPL-2.1+
 Group:          Multimedia/Framework
-Source:        %{name}-%{version}.tar.gz
+Source0:        %{name}-%{version}.tar.gz
+Source100:      common.tar.gz
+Source1001:     gst-omx.manifest
 BuildRequires:  which
 BuildRequires:  pkgconfig(gstreamer-1.0)
 BuildRequires:  pkgconfig(gstreamer-plugins-base-1.0)
 BuildRequires: pkgconfig(libtbm)
 BuildRequires: pkgconfig(mm-common)
+ExclusiveArch: %arm aarch64
 
 %description
 gst-openmax is a GStreamer plug-in that allows communication with OpenMAX IL components.
 Multiple OpenMAX IL implementations can be used.
 
 %prep
-%setup -q -n %{name}-%{version}
+%setup -q
+%setup -q -T -D -a 100
+cp %{SOURCE1001} .
 
 %build
 ./autogen.sh --noconfigure
 
-export CFLAGS+=" -DEXYNOS_SPECIFIC"
-export CFLAGS+=" -DGST_TIZEN_MODIFICATION"
+export CFLAGS+=" -DTIZEN_FEATURE_OMX"
 
 %ifarch aarch64
 %configure --disable-static --prefix=/usr --with-omx-target=exynos64
 %else
-%configure --disable-static --prefix=/usr --with-omx-target=exynos
+%configure --disable-static --prefix=/usr --with-omx-target=exynos --enable-vp8 --enable-hevc
 %endif
 
 make %{?jobs:-j%jobs}
@@ -35,14 +39,11 @@ make %{?jobs:-j%jobs}
 
 %install
 rm -rf %{buildroot}
-mkdir -p %{buildroot}/usr/share/license
-cp COPYING %{buildroot}/usr/share/license/%{name}
 %make_install
 
 %files
 %manifest gst-omx.manifest
 %defattr(-,root,root,-)
 %{_libdir}/gstreamer-1.0/libgstomx.so
-/etc/xdg/gstomx.conf
-/usr/share/license/%{name}
+%license COPYING