improve decoding performance as 10 times than before.
authorKitae Kim <kt920.kim@samsung.com>
Wed, 8 May 2013 14:12:10 +0000 (23:12 +0900)
committerKitae Kim <kt920.kim@samsung.com>
Fri, 21 Jun 2013 13:10:04 +0000 (22:10 +0900)
 - reduce context switching between user and kernel.
 - use device memory region directly as a output buffer instead of memcpy.

30 files changed:
Makefile
config.guess
config.log
config.status
config.sub
configure
libtool
ltmain.sh
src/.deps/libgstplugin_la-gstplugin.Plo [deleted file]
src/.libs/libgstplugin.exp [deleted file]
src/.libs/libgstplugin.la [deleted symlink]
src/.libs/libgstplugin.lai [deleted file]
src/.libs/libgstplugin.so [deleted file]
src/.libs/libgstplugin.ver [deleted file]
src/.libs/libgstplugin_la-gstplugin.o [deleted file]
src/Makefile
src/Makefile.am
src/Makefile.in
src/gstemul.c
src/gstemulapi.c
src/gstemulapi.h
src/gstemulapi2.c
src/gstemulapi2.h
src/gstemulcommon.h
src/gstemuldev.c
src/gstemuldev.h
src/gstemulnewdec.c
src/gstemulnewenc.c
src/gstemulutils.c
src/gstemulutils.h

index b80ab0c..9dc1b35 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -101,16 +101,16 @@ DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
 distcleancheck_listfiles = find . -type f -print
-ACLOCAL = ${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run aclocal-1.11
-AMTAR = ${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run tar
+ACLOCAL = ${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run aclocal-1.11
+AMTAR = ${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run tar
 AR = ar
-AUTOCONF = ${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run autoconf
-AUTOHEADER = ${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run autoheader
-AUTOMAKE = ${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run automake-1.11
+AUTOCONF = ${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run automake-1.11
 AWK = gawk
 CC = gcc
 CCDEPMODE = depmode=gcc3
-CFLAGS = -g -O2 -Wall
+CFLAGS = -Wall -Wall
 CPP = gcc -E
 CPPFLAGS = 
 CYGPATH_W = echo
@@ -125,8 +125,8 @@ EGREP = /bin/grep -E
 EXEEXT = 
 FGREP = /bin/grep -F
 GREP = /bin/grep
-GST_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/gstreamer-0.10 -I/usr/include/libxml2   -Wall
-GST_LIBS = -pthread -L/usr/lib/i386-linux-gnu -lgstbase-0.10 -lgstcontroller-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lxml2 -lgthread-2.0 -lrt -lglib-2.0  
+GST_CFLAGS = -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2   -Wall
+GST_LIBS = -pthread -lgstbase-0.10 -lgstcontroller-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lxml2 -lgthread-2.0 -lrt -lglib-2.0  
 GST_PLUGIN_LDFLAGS = -module -avoid-version -export-symbols-regex _*\(gst_\|Gst\|GST_\).*
 HAVE_PKGCONFIG =  
 INSTALL = /usr/bin/install -c
@@ -143,7 +143,7 @@ LIPO =
 LN_S = ln -s
 LTLIBOBJS = 
 MAINT = 
-MAKEINFO = ${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run makeinfo
+MAKEINFO = ${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run makeinfo
 MKDIR_P = /bin/mkdir -p
 NM = /usr/bin/nm -B
 NMEDIT = 
@@ -161,17 +161,17 @@ PACKAGE_VERSION = 0.10.0
 PATH_SEPARATOR = :
 PKG_CONFIG = /usr/bin/pkg-config
 PKG_CONFIG_LIBDIR = 
-PKG_CONFIG_PATH = 
+PKG_CONFIG_PATH = /home/kt/sbs/target-i386/usr/lib/pkgconfig:/home/kt/sbs/target-i386/usr/share/pkgconfig:/home/kt/sbs/tools/usr/share/pkgconfig
 RANLIB = ranlib
 SED = /bin/sed
 SET_MAKE = 
-SHELL = /bin/bash
+SHELL = /bin/sh
 STRIP = strip
 VERSION = 0.10.0
-abs_builddir = /home/kt/dev/cur_dev/simply/gst-template/gst-plugin
-abs_srcdir = /home/kt/dev/cur_dev/simply/gst-template/gst-plugin
-abs_top_builddir = /home/kt/dev/cur_dev/simply/gst-template/gst-plugin
-abs_top_srcdir = /home/kt/dev/cur_dev/simply/gst-template/gst-plugin
+abs_builddir = /home/kt/codec/dev/gst-emul_20130124
+abs_srcdir = /home/kt/codec/dev/gst-emul_20130124
+abs_top_builddir = /home/kt/codec/dev/gst-emul_20130124
+abs_top_srcdir = /home/kt/codec/dev/gst-emul_20130124
 ac_ct_CC = gcc
 ac_ct_DUMPBIN = 
 am__include = include
@@ -199,7 +199,7 @@ host_vendor = pc
 htmldir = ${docdir}
 includedir = ${prefix}/include
 infodir = ${datarootdir}/info
-install_sh = ${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/install-sh
+install_sh = ${SHELL} /home/kt/codec/dev/gst-emul_20130124/install-sh
 libdir = ${exec_prefix}/lib
 libexecdir = ${exec_prefix}/libexec
 localedir = ${datarootdir}/locale
index c2246a4..40eaed4 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-#   Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011 Free Software Foundation, Inc.
 
-timestamp='2009-12-30'
+timestamp='2011-05-11'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -57,7 +57,7 @@ GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
 Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -181,7 +181,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                fi
                ;;
            *)
-               os=netbsd
+               os=netbsd
                ;;
        esac
        # The OS release
@@ -224,7 +224,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
                ;;
        *5.*)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
                ;;
        esac
        # According to Compaq, /usr/sbin/psrinfo has been available on
@@ -270,7 +270,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # A Xn.n version is an unreleased experimental baselevel.
        # 1.2 uses "1.2" for uname -r.
        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-       exit ;;
+       # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+       exitcode=$?
+       trap '' 0
+       exit $exitcode ;;
     Alpha\ *:Windows_NT*:*)
        # How do we know it's Interix rather than the generic POSIX subsystem?
        # Should we change UNAME_MACHINE based on the output of uname instead
@@ -296,7 +299,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        echo s390-ibm-zvmoe
        exit ;;
     *:OS400:*:*)
-        echo powerpc-ibm-os400
+       echo powerpc-ibm-os400
        exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
        echo arm-acorn-riscix${UNAME_RELEASE}
@@ -395,23 +398,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # MiNT.  But MiNT is downward compatible to TOS, so this should
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+       echo m68k-atari-mint${UNAME_RELEASE}
        exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
        echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
+       exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+       echo m68k-atari-mint${UNAME_RELEASE}
        exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
+       echo m68k-milan-mint${UNAME_RELEASE}
+       exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
+       echo m68k-hades-mint${UNAME_RELEASE}
+       exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
+       echo m68k-unknown-mint${UNAME_RELEASE}
+       exit ;;
     m68k:machten:*:*)
        echo m68k-apple-machten${UNAME_RELEASE}
        exit ;;
@@ -481,8 +484,8 @@ EOF
        echo m88k-motorola-sysv3
        exit ;;
     AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
+       # DG/UX returns AViiON for all architectures
+       UNAME_PROCESSOR=`/usr/bin/uname -p`
        if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
        then
            if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -495,7 +498,7 @@ EOF
        else
            echo i586-dg-dgux${UNAME_RELEASE}
        fi
-       exit ;;
+       exit ;;
     M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
        echo m88k-dolphin-sysv3
        exit ;;
@@ -552,7 +555,7 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
@@ -595,52 +598,52 @@ EOF
            9000/[678][0-9][0-9])
                if [ -x /usr/bin/getconf ]; then
                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
+                   sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                   case "${sc_cpu_version}" in
+                     523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                     528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                     532)                      # CPU_PA_RISC2_0
+                       case "${sc_kernel_bits}" in
+                         32) HP_ARCH="hppa2.0n" ;;
+                         64) HP_ARCH="hppa2.0w" ;;
                          '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
+                       esac ;;
+                   esac
                fi
                if [ "${HP_ARCH}" = "" ]; then
                    eval $set_cc_for_build
-                   sed 's/^              //' << EOF >$dummy.c
+                   sed 's/^            //' << EOF >$dummy.c
 
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
+               #define _HPUX_SOURCE
+               #include <stdlib.h>
+               #include <unistd.h>
 
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
+               int main ()
+               {
+               #if defined(_SC_KERNEL_BITS)
+                   long bits = sysconf(_SC_KERNEL_BITS);
+               #endif
+                   long cpu  = sysconf (_SC_CPU_VERSION);
 
-                  switch (cpu)
-               {
-               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-               case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-                   switch (bits)
-                       {
-                       case 64: puts ("hppa2.0w"); break;
-                       case 32: puts ("hppa2.0n"); break;
-                       default: puts ("hppa2.0"); break;
-                       } break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-                   puts ("hppa2.0"); break;
-              #endif
-               default: puts ("hppa1.0"); break;
-               }
-                  exit (0);
-              }
+                   switch (cpu)
+                       {
+                       case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+                       case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+                       case CPU_PA_RISC2_0:
+               #if defined(_SC_KERNEL_BITS)
+                           switch (bits)
+                               {
+                               case 64: puts ("hppa2.0w"); break;
+                               case 32: puts ("hppa2.0n"); break;
+                               default: puts ("hppa2.0"); break;
+                               } break;
+               #else  /* !defined(_SC_KERNEL_BITS) */
+                           puts ("hppa2.0"); break;
+               #endif
+                       default: puts ("hppa1.0"); break;
+                       }
+                   exit (0);
+               }
 EOF
                    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
                    test -z "$HP_ARCH" && HP_ARCH=hppa
@@ -731,22 +734,22 @@ EOF
        exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
        echo c1-convex-bsd
-        exit ;;
+       exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
        if getsysinfo -f scalar_acc
        then echo c32-convex-bsd
        else echo c2-convex-bsd
        fi
-        exit ;;
+       exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
        echo c34-convex-bsd
-        exit ;;
+       exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
        echo c38-convex-bsd
-        exit ;;
+       exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
        echo c4-convex-bsd
-        exit ;;
+       exit ;;
     CRAY*Y-MP:*:*:*)
        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
        exit ;;
@@ -770,14 +773,14 @@ EOF
        exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
+       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+       FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+       echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit ;;
     5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+       FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+       echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
        exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@@ -805,14 +808,14 @@ EOF
        echo ${UNAME_MACHINE}-pc-mingw32
        exit ;;
     i*:windows32*:*)
-       # uname -m includes "-pc" on this system.
-       echo ${UNAME_MACHINE}-mingw32
+       # uname -m includes "-pc" on this system.
+       echo ${UNAME_MACHINE}-mingw32
        exit ;;
     i*:PW*:*)
        echo ${UNAME_MACHINE}-pc-pw32
        exit ;;
     *:Interix*:*)
-       case ${UNAME_MACHINE} in
+       case ${UNAME_MACHINE} in
            x86)
                echo i586-pc-interix${UNAME_RELEASE}
                exit ;;
@@ -867,7 +870,7 @@ EOF
          EV6)   UNAME_MACHINE=alphaev6 ;;
          EV67)  UNAME_MACHINE=alphaev67 ;;
          EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
+       esac
        objdump --private-headers /bin/sh | grep -q ld.so.1
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
@@ -879,7 +882,13 @@ EOF
        then
            echo ${UNAME_MACHINE}-unknown-linux-gnu
        else
-           echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+           if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+               | grep -q __ARM_PCS_VFP
+           then
+               echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+           else
+               echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+           fi
        fi
        exit ;;
     avr32*:Linux:*:*)
@@ -892,7 +901,7 @@ EOF
        echo crisv32-axis-linux-gnu
        exit ;;
     frv:Linux:*:*)
-       echo frv-unknown-linux-gnu
+       echo frv-unknown-linux-gnu
        exit ;;
     i*86:Linux:*:*)
        LIBC=gnu
@@ -960,7 +969,7 @@ EOF
        echo ${UNAME_MACHINE}-ibm-linux
        exit ;;
     sh64*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     sh*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -968,6 +977,9 @@ EOF
     sparc:Linux:*:* | sparc64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
+    tile*:Linux:*:*)
+       echo ${UNAME_MACHINE}-tilera-linux-gnu
+       exit ;;
     vax:Linux:*:*)
        echo ${UNAME_MACHINE}-dec-linux-gnu
        exit ;;
@@ -975,7 +987,7 @@ EOF
        echo x86_64-unknown-linux-gnu
        exit ;;
     xtensa*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -984,11 +996,11 @@ EOF
        echo i386-sequent-sysv4
        exit ;;
     i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
+       # Unixware is an offshoot of SVR4, but it has its own version
+       # number series starting with 2...
+       # I am not positive that other SVR4 systems won't match this,
        # I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
+       # Use sysv4.2uw... so that sysv4* matches it.
        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
        exit ;;
     i*86:OS/2:*:*)
@@ -1020,7 +1032,7 @@ EOF
        fi
        exit ;;
     i*86:*:5:[678]*)
-       # UnixWare 7.x, OpenUNIX and OpenServer 6.
+       # UnixWare 7.x, OpenUNIX and OpenServer 6.
        case `/bin/uname -X | grep "^Machine"` in
            *486*)           UNAME_MACHINE=i486 ;;
            *Pentium)        UNAME_MACHINE=i586 ;;
@@ -1048,13 +1060,13 @@ EOF
        exit ;;
     pc:*:*:*)
        # Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i586.
+       # uname -m prints for DJGPP always 'pc', but it prints nothing about
+       # the processor, so we play safe by assuming i586.
        # Note: whatever this is, it MUST be the same as what config.sub
        # prints for the "djgpp" host, or else GDB configury will decide that
        # this is a cross-build.
        echo i586-pc-msdosdjgpp
-        exit ;;
+       exit ;;
     Intel:Mach:3*:*)
        echo i386-pc-mach3
        exit ;;
@@ -1089,8 +1101,8 @@ EOF
        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
          && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+         && { echo i486-ncr-sysv4; exit; } ;;
     NCR*:*:4.2:* | MPRAS*:*:4.2:*)
        OS_REL='.3'
        test -r /etc/.relid \
@@ -1133,10 +1145,10 @@ EOF
                echo ns32k-sni-sysv
        fi
        exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
+    PENTIUM:*:4.0*:*)  # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                       # says <Richard.M.Bartel@ccMail.Census.GOV>
+       echo i586-unisys-sysv4
+       exit ;;
     *:UNIX_System_V:4*:FTX*)
        # From Gerald Hewes <hewes@openmarket.com>.
        # How about differentiating between stratus architectures? -djm
@@ -1162,11 +1174,11 @@ EOF
        exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
        if [ -d /usr/nec ]; then
-               echo mips-nec-sysv${UNAME_RELEASE}
+               echo mips-nec-sysv${UNAME_RELEASE}
        else
-               echo mips-unknown-sysv${UNAME_RELEASE}
+               echo mips-unknown-sysv${UNAME_RELEASE}
        fi
-        exit ;;
+       exit ;;
     BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
        echo powerpc-be-beos
        exit ;;
@@ -1231,6 +1243,9 @@ EOF
     *:QNX:*:4*)
        echo i386-pc-qnx
        exit ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+       echo neo-tandem-nsk${UNAME_RELEASE}
+       exit ;;
     NSE-?:NONSTOP_KERNEL:*:*)
        echo nse-tandem-nsk${UNAME_RELEASE}
        exit ;;
@@ -1276,13 +1291,13 @@ EOF
        echo pdp10-unknown-its
        exit ;;
     SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
+       echo mips-sei-seiux${UNAME_RELEASE}
        exit ;;
     *:DragonFly:*:*)
        echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
        exit ;;
     *:*VMS:*:*)
-       UNAME_MACHINE=`(uname -p) 2>/dev/null`
+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
        case "${UNAME_MACHINE}" in
            A*) echo alpha-dec-vms ; exit ;;
            I*) echo ia64-dec-vms ; exit ;;
@@ -1322,11 +1337,11 @@ main ()
 #include <sys/param.h>
   printf ("m68k-sony-newsos%s\n",
 #ifdef NEWSOS4
-          "4"
+       "4"
 #else
-         ""
+       ""
 #endif
-         ); exit (0);
+       ); exit (0);
 #endif
 #endif
 
index a6ad362..0eaebd4 100644 (file)
@@ -12,9 +12,9 @@ generated by GNU Autoconf 2.67.  Invocation command line was
 
 hostname = kt-score
 uname -m = i686
-uname -r = 2.6.38-10-generic-pae
+uname -r = 3.2.0-40-generic-pae
 uname -s = Linux
-uname -v = #46-Ubuntu SMP Tue Jun 28 16:54:49 UTC 2011
+uname -v = #64-Ubuntu SMP Mon Mar 25 21:44:41 UTC 2013
 
 /usr/bin/uname -p = unknown
 /bin/uname -X     = unknown
@@ -27,7 +27,14 @@ uname -v = #46-Ubuntu SMP Tue Jun 28 16:54:49 UTC 2011
 /usr/bin/oslevel       = unknown
 /bin/universe          = unknown
 
+PATH: /usr/lib/ccache
+PATH: /sb2/wrappers
+PATH: /sb2/scripts
+PATH: /home/kt/.scratchbox2/sbs-i386_home_kt_sbs/bin
+PATH: /home/kt/sbs-install/bin
+PATH: /home/kt/sbs-install/bin
 PATH: /bin
+PATH: /usr/lib/lightdm/lightdm
 PATH: /usr/local/sbin
 PATH: /usr/local/bin
 PATH: /usr/sbin
@@ -35,8 +42,15 @@ PATH: /usr/bin
 PATH: /sbin
 PATH: /bin
 PATH: /usr/games
-PATH: /home/kt/tizen_sdk/SDK/sdb
-PATH: /home/kt/tizen_sdk/SDK/build-system/bin
+PATH: /home/kt/tizen-sdk/tools
+PATH: /usr/local/sbin
+PATH: /usr/sbin
+PATH: /sbin
+PATH: /sbin
+PATH: /usr/sbin
+PATH: /home/kt/sbs/target-i386/bin
+PATH: /home/kt/sbs/target-i386/usr/bin
+PATH: /home/kt/sbs/target-i386/usr/local/bin
 
 
 ## ----------- ##
@@ -57,11 +71,11 @@ configure:2671: result: yes
 configure:2753: checking whether to disable maintainer-specific portions of Makefiles
 configure:2762: result: yes
 configure:2824: checking for gcc
-configure:2840: found /usr/bin/gcc
+configure:2840: found /usr/lib/ccache/gcc
 configure:2851: result: gcc
 configure:3080: checking for C compiler version
 configure:3089: gcc --version >&5
-gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
+gcc (SLP 4.5.3-1ubuntu2slp2+s1) 4.5.3
 Copyright (C) 2010 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -69,42 +83,46 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 configure:3100: $? = 0
 configure:3089: gcc -v >&5
 Using built-in specs.
-COLLECT_GCC=gcc
-COLLECT_LTO_WRAPPER=/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/lto-wrapper
-Target: i686-linux-gnu
-Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --with-multiarch-defaults=i386-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/i386-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib/i386-linux-gnu --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
+Reading specs from /home/kt/sbs-install/share/scratchbox2/../../share/scratchbox2/modeconf/gcc-specs.slp2
+rename spec cpp to old_cpp
+rename spec cc1_options to old_cc1_options
+rename spec link_libgcc to old_link_libgcc
+COLLECT_GCC=/home/kt/sbs/tools/usr/bin/gcc
+COLLECT_LTO_WRAPPER=/usr/lib/gcc/i486-linux-gnu/4.5.3/lto-wrapper
+Target: i486-linux-gnu
+Configured with: ../src/configure -v --with-pkgversion='SLP 4.5.3-1ubuntu2slp2+s1' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --with-multiarch-defaults=i386-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib --enable-nls --disable-bootstrap --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
 Thread model: posix
-gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4) 
+... rest of stderr output deleted ...
 configure:3100: $? = 0
 configure:3089: gcc -V >&5
-gcc: '-V' option must have argument
-configure:3100: $? = 1
+/home/kt/sbs/tools/usr/bin/gcc: error trying to exec '/home/kt/sbs/tools/usr/bin/i486-linux-gnu-gcc--specs=/home/kt/sbs-install/share/scratchbox2/../../share/scratchbox2/modeconf/gcc-specs.slp2': execvp: No such file or directory
+configure:3100: $? = 0
 configure:3089: gcc -qversion >&5
 gcc: unrecognized option '-qversion'
 gcc: no input files
 configure:3100: $? = 1
 configure:3120: checking whether the C compiler works
-configure:3142: gcc    conftest.c  >&5
+configure:3142: gcc -Wall   conftest.c  >&5
 configure:3146: $? = 0
 configure:3194: result: yes
 configure:3197: checking for C compiler default output file name
 configure:3199: result: a.out
 configure:3205: checking for suffix of executables
-configure:3212: gcc -o conftest    conftest.c  >&5
+configure:3212: gcc -o conftest -Wall   conftest.c  >&5
 configure:3216: $? = 0
 configure:3238: result: 
 configure:3260: checking whether we are cross compiling
-configure:3268: gcc -o conftest    conftest.c  >&5
+configure:3268: gcc -o conftest -Wall   conftest.c  >&5
 configure:3272: $? = 0
 configure:3279: ./conftest
 configure:3283: $? = 0
 configure:3298: result: no
 configure:3303: checking for suffix of object files
-configure:3325: gcc -c   conftest.c >&5
+configure:3325: gcc -c -Wall  conftest.c >&5
 configure:3329: $? = 0
 configure:3350: result: o
 configure:3354: checking whether we are using the GNU C compiler
-configure:3373: gcc -c   conftest.c >&5
+configure:3373: gcc -c -Wall  conftest.c >&5
 configure:3373: $? = 0
 configure:3382: result: yes
 configure:3391: checking whether gcc accepts -g
@@ -112,7 +130,7 @@ configure:3411: gcc -c -g  conftest.c >&5
 configure:3411: $? = 0
 configure:3452: result: yes
 configure:3469: checking for gcc option to accept ISO C89
-configure:3533: gcc  -c -g -O2  conftest.c >&5
+configure:3533: gcc  -c -Wall  conftest.c >&5
 configure:3533: $? = 0
 configure:3546: result: none needed
 configure:3577: checking for style of include used by make
@@ -138,7 +156,7 @@ configure:4251: result: yes
 configure:4263: checking for BSD- or MS-compatible name lister (nm)
 configure:4312: result: /usr/bin/nm -B
 configure:4430: checking the name lister (/usr/bin/nm -B) interface
-configure:4437: gcc -c -g -O2  conftest.c >&5
+configure:4437: gcc -c -Wall  conftest.c >&5
 configure:4440: /usr/bin/nm -B "conftest.o"
 configure:4443: output
 00000000 B some_variable
@@ -168,11 +186,11 @@ configure:5252: checking for ranlib
 configure:5268: found /usr/bin/ranlib
 configure:5279: result: ranlib
 configure:5369: checking command to parse /usr/bin/nm -B output from gcc object
-configure:5487: gcc -c -g -O2  conftest.c >&5
+configure:5487: gcc -c -Wall  conftest.c >&5
 configure:5490: $? = 0
 configure:5494: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[  ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[         ][      ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' \> conftest.nm
 configure:5497: $? = 0
-configure:5551: gcc -o conftest -g -O2   conftest.c conftstm.o >&5
+configure:5551: gcc -o conftest -Wall   conftest.c conftstm.o >&5
 configure:5554: $? = 0
 configure:5592: result: ok
 configure:6401: checking how to run the C preprocessor
@@ -214,70 +232,71 @@ configure: failed program was:
 | /* end confdefs.h.  */
 | #include <ac_nonexistent.h>
 configure:6534: checking for ANSI C header files
-configure:6554: gcc -c -g -O2  conftest.c >&5
+configure:6554: gcc -c -Wall  conftest.c >&5
 configure:6554: $? = 0
-configure:6627: gcc -o conftest -g -O2   conftest.c  >&5
+configure:6627: gcc -o conftest -Wall   conftest.c  >&5
 configure:6627: $? = 0
 configure:6627: ./conftest
 configure:6627: $? = 0
 configure:6638: result: yes
 configure:6651: checking for sys/types.h
-configure:6651: gcc -c -g -O2  conftest.c >&5
+configure:6651: gcc -c -Wall  conftest.c >&5
 configure:6651: $? = 0
 configure:6651: result: yes
 configure:6651: checking for sys/stat.h
-configure:6651: gcc -c -g -O2  conftest.c >&5
+configure:6651: gcc -c -Wall  conftest.c >&5
 configure:6651: $? = 0
 configure:6651: result: yes
 configure:6651: checking for stdlib.h
-configure:6651: gcc -c -g -O2  conftest.c >&5
+configure:6651: gcc -c -Wall  conftest.c >&5
 configure:6651: $? = 0
 configure:6651: result: yes
 configure:6651: checking for string.h
-configure:6651: gcc -c -g -O2  conftest.c >&5
+configure:6651: gcc -c -Wall  conftest.c >&5
 configure:6651: $? = 0
 configure:6651: result: yes
 configure:6651: checking for memory.h
-configure:6651: gcc -c -g -O2  conftest.c >&5
+configure:6651: gcc -c -Wall  conftest.c >&5
 configure:6651: $? = 0
 configure:6651: result: yes
 configure:6651: checking for strings.h
-configure:6651: gcc -c -g -O2  conftest.c >&5
+configure:6651: gcc -c -Wall  conftest.c >&5
 configure:6651: $? = 0
 configure:6651: result: yes
 configure:6651: checking for inttypes.h
-configure:6651: gcc -c -g -O2  conftest.c >&5
+configure:6651: gcc -c -Wall  conftest.c >&5
 configure:6651: $? = 0
 configure:6651: result: yes
 configure:6651: checking for stdint.h
-configure:6651: gcc -c -g -O2  conftest.c >&5
+configure:6651: gcc -c -Wall  conftest.c >&5
 configure:6651: $? = 0
 configure:6651: result: yes
 configure:6651: checking for unistd.h
-configure:6651: gcc -c -g -O2  conftest.c >&5
+configure:6651: gcc -c -Wall  conftest.c >&5
 configure:6651: $? = 0
 configure:6651: result: yes
 configure:6665: checking for dlfcn.h
-configure:6665: gcc -c -g -O2  conftest.c >&5
+configure:6665: gcc -c -Wall  conftest.c >&5
 configure:6665: $? = 0
 configure:6665: result: yes
 configure:6849: checking for objdir
 configure:6864: result: .libs
 configure:7156: checking if gcc supports -fno-rtti -fno-exceptions
-configure:7174: gcc -c -g -O2  -fno-rtti -fno-exceptions conftest.c >&5
+configure:7174: gcc -c -Wall  -fno-rtti -fno-exceptions conftest.c >&5
+cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
 cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
 configure:7178: $? = 0
 configure:7191: result: no
 configure:7211: checking for gcc option to produce PIC
 configure:7483: result: -fPIC -DPIC
 configure:7495: checking if gcc PIC flag -fPIC -DPIC works
-configure:7513: gcc -c -g -O2  -fPIC -DPIC -DPIC conftest.c >&5
+configure:7513: gcc -c -Wall  -fPIC -DPIC -DPIC conftest.c >&5
 configure:7517: $? = 0
 configure:7530: result: yes
 configure:7554: checking if gcc static flag -static works
 configure:7582: result: yes
 configure:7597: checking if gcc supports -c -o file.o
-configure:7618: gcc -c -g -O2  -o out/conftest2.o conftest.c >&5
+configure:7618: gcc -c -Wall  -o out/conftest2.o conftest.c >&5
 configure:7622: $? = 0
 configure:7644: result: yes
 configure:7652: checking if gcc supports -c -o file.o
@@ -285,13 +304,13 @@ configure:7699: result: yes
 configure:7732: checking whether the gcc linker (/usr/bin/ld) supports shared libraries
 configure:8723: result: yes
 configure:8760: checking whether -lc should be explicitly linked in
-configure:8765: gcc -c -g -O2  conftest.c >&5
+configure:8765: gcc -c -Wall  conftest.c >&5
 configure:8768: $? = 0
 configure:8783: gcc -shared conftest.o  -v -Wl,-soname -Wl,conftest -o conftest 2\>\&1 \| /bin/grep  -lc  \>/dev/null 2\>\&1
 configure:8786: $? = 0
 configure:8798: result: no
 configure:8962: checking dynamic linker characteristics
-configure:9395: gcc -o conftest -g -O2   -Wl,-rpath -Wl,/foo conftest.c  >&5
+configure:9395: gcc -o conftest -Wall   -Wl,-rpath -Wl,/foo conftest.c  >&5
 configure:9395: $? = 0
 configure:9625: result: GNU/Linux ld.so
 configure:9727: checking how to hardcode library paths into programs
@@ -327,7 +346,7 @@ configure:10582: $PKG_CONFIG --exists --print-errors "
 configure:10589: $? = 0
 configure:10654: result: yes
 configure:10662: checking to see if compiler understands -Wall
-configure:10677: gcc -c -g -O2 -Wall  conftest.c >&5
+configure:10677: gcc -c -Wall -Wall  conftest.c >&5
 configure:10677: $? = 0
 configure:10680: result: yes
 configure:10826: creating ./config.status
@@ -347,11 +366,11 @@ generated by GNU Autoconf 2.67.  Invocation command line was
 
 on kt-score
 
-config.status:1081: creating Makefile
-config.status:1081: creating src/Makefile
-config.status:1081: creating config.h
-config.status:1309: executing depfiles commands
-config.status:1309: executing libtool commands
+config.status:1080: creating Makefile
+config.status:1080: creating src/Makefile
+config.status:1080: creating config.h
+config.status:1308: executing depfiles commands
+config.status:1308: executing libtool commands
 
 ## ---------------- ##
 ## Cache variables. ##
@@ -361,8 +380,8 @@ ac_cv_build=i686-pc-linux-gnu
 ac_cv_c_compiler_gnu=yes
 ac_cv_env_CC_set=
 ac_cv_env_CC_value=
-ac_cv_env_CFLAGS_set=
-ac_cv_env_CFLAGS_value=
+ac_cv_env_CFLAGS_set=set
+ac_cv_env_CFLAGS_value=-Wall
 ac_cv_env_CPPFLAGS_set=
 ac_cv_env_CPPFLAGS_value=
 ac_cv_env_CPP_set=
@@ -377,8 +396,8 @@ ac_cv_env_LIBS_set=
 ac_cv_env_LIBS_value=
 ac_cv_env_PKG_CONFIG_LIBDIR_set=
 ac_cv_env_PKG_CONFIG_LIBDIR_value=
-ac_cv_env_PKG_CONFIG_PATH_set=
-ac_cv_env_PKG_CONFIG_PATH_value=
+ac_cv_env_PKG_CONFIG_PATH_set=set
+ac_cv_env_PKG_CONFIG_PATH_value=/home/kt/sbs/target-i386/usr/lib/pkgconfig:/home/kt/sbs/target-i386/usr/share/pkgconfig:/home/kt/sbs/tools/usr/share/pkgconfig
 ac_cv_env_PKG_CONFIG_set=
 ac_cv_env_PKG_CONFIG_value=
 ac_cv_env_build_alias_set=
@@ -437,26 +456,26 @@ lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\) $/  {\"\
 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \([^ ]*\) $/  {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \(lib[^ ]*\)$/  {"\2", (void *) \&\2},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/  {"lib\2", (void *) \&\2},/p'\'''
 lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\'''
 lt_cv_sys_max_cmd_len=1572864
-pkg_cv_GST_CFLAGS='-pthread -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/gstreamer-0.10 -I/usr/include/libxml2  '
-pkg_cv_GST_LIBS='-pthread -L/usr/lib/i386-linux-gnu -lgstbase-0.10 -lgstcontroller-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lxml2 -lgthread-2.0 -lrt -lglib-2.0  '
+pkg_cv_GST_CFLAGS='-pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2  '
+pkg_cv_GST_LIBS='-pthread -lgstbase-0.10 -lgstcontroller-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lxml2 -lgthread-2.0 -lrt -lglib-2.0  '
 
 ## ----------------- ##
 ## Output variables. ##
 ## ----------------- ##
 
-ACLOCAL='${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run aclocal-1.11'
+ACLOCAL='${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run aclocal-1.11'
 AMDEPBACKSLASH='\'
 AMDEP_FALSE='#'
 AMDEP_TRUE=''
-AMTAR='${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run tar'
+AMTAR='${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run tar'
 AR='ar'
-AUTOCONF='${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run autoconf'
-AUTOHEADER='${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run autoheader'
-AUTOMAKE='${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run automake-1.11'
+AUTOCONF='${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run autoconf'
+AUTOHEADER='${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run autoheader'
+AUTOMAKE='${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run automake-1.11'
 AWK='gawk'
 CC='gcc'
 CCDEPMODE='depmode=gcc3'
-CFLAGS='-g -O2 -Wall'
+CFLAGS='-Wall -Wall'
 CPP='gcc -E'
 CPPFLAGS=''
 CYGPATH_W='echo'
@@ -471,8 +490,8 @@ EGREP='/bin/grep -E'
 EXEEXT=''
 FGREP='/bin/grep -F'
 GREP='/bin/grep'
-GST_CFLAGS='-pthread -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/gstreamer-0.10 -I/usr/include/libxml2   -Wall'
-GST_LIBS='-pthread -L/usr/lib/i386-linux-gnu -lgstbase-0.10 -lgstcontroller-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lxml2 -lgthread-2.0 -lrt -lglib-2.0  '
+GST_CFLAGS='-pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2   -Wall'
+GST_LIBS='-pthread -lgstbase-0.10 -lgstcontroller-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lxml2 -lgthread-2.0 -lrt -lglib-2.0  '
 GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex _*\(gst_\|Gst\|GST_\).*'
 HAVE_PKGCONFIG=' '
 INSTALL_DATA='${INSTALL} -m 644'
@@ -490,7 +509,7 @@ LTLIBOBJS=''
 MAINT=''
 MAINTAINER_MODE_FALSE='#'
 MAINTAINER_MODE_TRUE=''
-MAKEINFO='${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run makeinfo'
+MAKEINFO='${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run makeinfo'
 MKDIR_P='/bin/mkdir -p'
 NM='/usr/bin/nm -B'
 NMEDIT=''
@@ -508,11 +527,11 @@ PACKAGE_VERSION='0.10.0'
 PATH_SEPARATOR=':'
 PKG_CONFIG='/usr/bin/pkg-config'
 PKG_CONFIG_LIBDIR=''
-PKG_CONFIG_PATH=''
+PKG_CONFIG_PATH='/home/kt/sbs/target-i386/usr/lib/pkgconfig:/home/kt/sbs/target-i386/usr/share/pkgconfig:/home/kt/sbs/tools/usr/share/pkgconfig'
 RANLIB='ranlib'
 SED='/bin/sed'
 SET_MAKE=''
-SHELL='/bin/bash'
+SHELL='/bin/sh'
 STRIP='strip'
 VERSION='0.10.0'
 ac_ct_CC='gcc'
@@ -546,7 +565,7 @@ host_vendor='pc'
 htmldir='${docdir}'
 includedir='${prefix}/include'
 infodir='${datarootdir}/info'
-install_sh='${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/install-sh'
+install_sh='${SHELL} /home/kt/codec/dev/gst-emul_20130124/install-sh'
 libdir='${exec_prefix}/lib'
 libexecdir='${exec_prefix}/libexec'
 localedir='${datarootdir}/locale'
index 16c4eb7..89d0ee4 100755 (executable)
@@ -1,4 +1,4 @@
-#! /bin/bash
+#! /bin/sh
 # Generated by configure.
 # Run this file to recreate the current configuration.
 # Compiler output produced by configure, useful for debugging
@@ -8,7 +8,7 @@ debug=false
 ac_cs_recheck=false
 ac_cs_silent=false
 
-SHELL=${CONFIG_SHELL-/bin/bash}
+SHELL=${CONFIG_SHELL-/bin/sh}
 export SHELL
 ## -------------------- ##
 ## M4sh Initialization. ##
@@ -438,7 +438,7 @@ $config_commands
 
 Report bugs to the package provider."
 
-ac_cs_config=""
+ac_cs_config="'CFLAGS=-Wall' 'PKG_CONFIG_PATH=/home/kt/sbs/target-i386/usr/lib/pkgconfig:/home/kt/sbs/target-i386/usr/share/pkgconfig:/home/kt/sbs/tools/usr/share/pkgconfig'"
 ac_cs_version="\
 my-plugin-package config.status 0.10.0
 configured by ./configure, generated by GNU Autoconf 2.67,
@@ -448,7 +448,7 @@ Copyright (C) 2010 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
-ac_pwd='/home/kt/dev/cur_dev/simply/gst-template/gst-plugin'
+ac_pwd='/home/kt/codec/dev/gst-emul_20130124'
 srcdir='.'
 INSTALL='/usr/bin/install -c'
 MKDIR_P='/bin/mkdir -p'
@@ -530,10 +530,10 @@ if $ac_cs_silent; then
 fi
 
 if $ac_cs_recheck; then
-  set X '/bin/bash' './configure'  $ac_configure_extra_args --no-create --no-recursion
+  set X '/bin/sh' './configure'  'CFLAGS=-Wall' 'PKG_CONFIG_PATH=/home/kt/sbs/target-i386/usr/lib/pkgconfig:/home/kt/sbs/target-i386/usr/share/pkgconfig:/home/kt/sbs/tools/usr/share/pkgconfig' $ac_configure_extra_args --no-create --no-recursion
   shift
-  $as_echo "running CONFIG_SHELL=/bin/bash $*" >&6
-  CONFIG_SHELL='/bin/bash'
+  $as_echo "running CONFIG_SHELL=/bin/sh $*" >&6
+  CONFIG_SHELL='/bin/sh'
   export CONFIG_SHELL
   exec "$@"
 fi
@@ -599,7 +599,7 @@ old_postinstall_cmds='chmod 644 $oldlib~$RANLIB $oldlib'
 old_postuninstall_cmds=''
 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs~$RANLIB $oldlib'
 CC='gcc'
-CFLAGS='-g -O2 -Wall'
+CFLAGS='-Wall -Wall'
 compiler='gcc'
 GCC='yes'
 lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[      ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[         ][      ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'''
@@ -607,7 +607,7 @@ lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();
 lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\) $/  {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/  {"\2", (void *) \&\2},/p'\'''
 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \([^ ]*\) $/  {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \(lib[^ ]*\)$/  {"\2", (void *) \&\2},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/  {"lib\2", (void *) \&\2},/p'\'''
 objdir='.libs'
-SHELL='/bin/bash'
+SHELL='/bin/sh'
 ECHO='echo'
 MAGIC_CMD='file'
 lt_prog_compiler_no_builtin_flag=' -fno-builtin'
@@ -673,8 +673,8 @@ postuninstall_cmds=''
 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 finish_eval=''
 hardcode_into_libs='yes'
-sys_lib_search_path_spec='/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2 /usr/lib/i386-linux-gnu /lib /usr/lib'
-sys_lib_dlsearch_path_spec='/lib /usr/lib /usr/lib/nvidia-current /lib/i386-linux-gnu /usr/lib/i386-linux-gnu /lib/i686-linux-gnu /usr/lib/i686-linux-gnu /usr/lib/alsa-lib /usr/local/lib '
+sys_lib_search_path_spec='/usr/lib/gcc/i486-linux-gnu/4.5.3 /usr/lib /lib'
+sys_lib_dlsearch_path_spec='/lib /usr/lib /lib/i486-linux-gnu /usr/lib/i486-linux-gnu /usr/local/lib '
 hardcode_action='immediate'
 enable_dlopen='unknown'
 enable_dlopen_self='unknown'
@@ -683,7 +683,7 @@ old_striplib='strip --strip-debug'
 striplib='strip --strip-unneeded'
 
 LTCC='gcc'
-LTCFLAGS='-g -O2'
+LTCFLAGS='-Wall'
 compiler='gcc'
 
 # Quote evaled strings.
@@ -815,11 +815,10 @@ S["LTLIBOBJS"]=""
 S["LIBOBJS"]=""
 S["GST_PLUGIN_LDFLAGS"]="-module -avoid-version -export-symbols-regex _*\\(gst_\\|Gst\\|GST_\\).*"
 S["plugindir"]="$(libdir)/gstreamer-0.10"
-S["GST_LIBS"]="-pthread -L/usr/lib/i386-linux-gnu -lgstbase-0.10 -lgstcontroller-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lxml2 -lgthread-2.0 -lrt -lglib"\
-"-2.0  "
-S["GST_CFLAGS"]="-pthread -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/gstreamer-0.10 -I/usr/include/libxml2   -Wall"
+S["GST_LIBS"]="-pthread -lgstbase-0.10 -lgstcontroller-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lxml2 -lgthread-2.0 -lrt -lglib-2.0  "
+S["GST_CFLAGS"]="-pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2   -Wall"
 S["PKG_CONFIG_LIBDIR"]=""
-S["PKG_CONFIG_PATH"]=""
+S["PKG_CONFIG_PATH"]="/home/kt/sbs/target-i386/usr/lib/pkgconfig:/home/kt/sbs/target-i386/usr/share/pkgconfig:/home/kt/sbs/tools/usr/share/pkgconfig"
 S["PKG_CONFIG"]="/usr/bin/pkg-config"
 S["HAVE_PKGCONFIG"]=" "
 S["CPP"]="gcc -E"
@@ -864,14 +863,14 @@ S["EXEEXT"]=""
 S["ac_ct_CC"]="gcc"
 S["CPPFLAGS"]=""
 S["LDFLAGS"]=""
-S["CFLAGS"]="-g -O2 -Wall"
+S["CFLAGS"]="-Wall -Wall"
 S["CC"]="gcc"
 S["MAINT"]=""
 S["MAINTAINER_MODE_FALSE"]="#"
 S["MAINTAINER_MODE_TRUE"]=""
 S["am__untar"]="${AMTAR} xf -"
 S["am__tar"]="${AMTAR} chof - \"$$tardir\""
-S["AMTAR"]="${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run tar"
+S["AMTAR"]="${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run tar"
 S["am__leading_dot"]="."
 S["SET_MAKE"]=""
 S["AWK"]="gawk"
@@ -879,12 +878,12 @@ S["mkdir_p"]="/bin/mkdir -p"
 S["MKDIR_P"]="/bin/mkdir -p"
 S["INSTALL_STRIP_PROGRAM"]="$(install_sh) -c -s"
 S["STRIP"]="strip"
-S["install_sh"]="${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/install-sh"
-S["MAKEINFO"]="${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run makeinfo"
-S["AUTOHEADER"]="${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run autoheader"
-S["AUTOMAKE"]="${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run automake-1.11"
-S["AUTOCONF"]="${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run autoconf"
-S["ACLOCAL"]="${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run aclocal-1.11"
+S["install_sh"]="${SHELL} /home/kt/codec/dev/gst-emul_20130124/install-sh"
+S["MAKEINFO"]="${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run makeinfo"
+S["AUTOHEADER"]="${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run autoheader"
+S["AUTOMAKE"]="${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run automake-1.11"
+S["AUTOCONF"]="${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run autoconf"
+S["ACLOCAL"]="${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run aclocal-1.11"
 S["VERSION"]="0.10.0"
 S["PACKAGE"]="my-plugin-package"
 S["CYGPATH_W"]="echo"
@@ -929,7 +928,7 @@ S["PACKAGE_VERSION"]="0.10.0"
 S["PACKAGE_TARNAME"]="my-plugin-package"
 S["PACKAGE_NAME"]="my-plugin-package"
 S["PATH_SEPARATOR"]=":"
-S["SHELL"]="/bin/bash"
+S["SHELL"]="/bin/sh"
 _ACAWK
 cat >>"$tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
index c2d1257..30fdca8 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-#   Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011 Free Software Foundation, Inc.
 
-timestamp='2010-01-22'
+timestamp='2011-03-23'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -76,7 +76,7 @@ version="\
 GNU config.sub ($timestamp)
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
 Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -124,8 +124,9 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
@@ -157,8 +158,8 @@ case $os in
                os=
                basic_machine=$1
                ;;
-        -bluegene*)
-               os=-cnk
+       -bluegene*)
+               os=-cnk
                ;;
        -sim | -cisco | -oki | -wec | -winbond)
                os=
@@ -174,10 +175,10 @@ case $os in
                os=-chorusos
                basic_machine=$1
                ;;
-       -chorusrdb)
-               os=-chorusrdb
+       -chorusrdb)
+               os=-chorusrdb
                basic_machine=$1
-               ;;
+               ;;
        -hiux*)
                os=-hiuxwe2
                ;;
@@ -282,11 +283,13 @@ case $basic_machine in
        | moxie \
        | mt \
        | msp430 \
+       | nds32 | nds32le | nds32be \
        | nios | nios2 \
        | ns16k | ns32k \
+       | open8 \
        | or32 \
        | pdp10 | pdp11 | pj | pjl \
-       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+       | powerpc | powerpc64 | powerpc64le | powerpcle \
        | pyramid \
        | rx \
        | score \
@@ -294,15 +297,24 @@ case $basic_machine in
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-       | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
+       | spu \
+       | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
        | ubicom32 \
        | v850 | v850e \
        | we32k \
-       | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+       | x86 | xc16x | xstormy16 | xtensa \
        | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
+       c54x)
+               basic_machine=tic54x-unknown
+               ;;
+       c55x)
+               basic_machine=tic55x-unknown
+               ;;
+       c6x)
+               basic_machine=tic6x-unknown
+               ;;
        m6811 | m68hc11 | m6812 | m68hc12 | picochip)
                # Motorola 68HC11/12.
                basic_machine=$basic_machine-unknown
@@ -314,6 +326,18 @@ case $basic_machine in
                basic_machine=mt-unknown
                ;;
 
+       strongarm | thumb | xscale)
+               basic_machine=arm-unknown
+               ;;
+
+       xscaleeb)
+               basic_machine=armeb-unknown
+               ;;
+
+       xscaleel)
+               basic_machine=armel-unknown
+               ;;
+
        # We use `pc' rather than `unknown'
        # because (1) that's what they normally are, and
        # (2) the word "unknown" tends to confuse beginning users.
@@ -334,7 +358,7 @@ case $basic_machine in
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
        | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* \
        | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
@@ -368,26 +392,28 @@ case $basic_machine in
        | mmix-* \
        | mt-* \
        | msp430-* \
+       | nds32-* | nds32le-* | nds32be-* \
        | nios-* | nios2-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
+       | open8-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
        | pyramid-* \
        | romp-* | rs6000-* | rx-* \
        | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
        | sparclite-* \
-       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-       | tahoe-* | thumb-* \
+       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+       | tahoe-* \
        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
        | tile-* | tilegx-* \
        | tron-* \
        | ubicom32-* \
        | v850-* | v850e-* | vax-* \
        | we32k-* \
-       | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+       | x86-* | x86_64-* | xc16x-* | xps100-* \
        | xstormy16-* | xtensa*-* \
        | ymp-* \
        | z8k-* | z80-*)
@@ -412,7 +438,7 @@ case $basic_machine in
                basic_machine=a29k-amd
                os=-udi
                ;;
-       abacus)
+       abacus)
                basic_machine=abacus-unknown
                ;;
        adobe68k)
@@ -482,11 +508,20 @@ case $basic_machine in
                basic_machine=powerpc-ibm
                os=-cnk
                ;;
+       c54x-*)
+               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c55x-*)
+               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c6x-*)
+               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        c90)
                basic_machine=c90-cray
                os=-unicos
                ;;
-        cegcc)
+       cegcc)
                basic_machine=arm-unknown
                os=-cegcc
                ;;
@@ -518,7 +553,7 @@ case $basic_machine in
                basic_machine=craynv-cray
                os=-unicosmp
                ;;
-       cr16)
+       cr16 | cr16-*)
                basic_machine=cr16-unknown
                os=-elf
                ;;
@@ -734,7 +769,7 @@ case $basic_machine in
                basic_machine=ns32k-utek
                os=-sysv
                ;;
-        microblaze)
+       microblaze)
                basic_machine=microblaze-xilinx
                ;;
        mingw32)
@@ -841,6 +876,12 @@ case $basic_machine in
        np1)
                basic_machine=np1-gould
                ;;
+       neo-tandem)
+               basic_machine=neo-tandem
+               ;;
+       nse-tandem)
+               basic_machine=nse-tandem
+               ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
@@ -923,9 +964,10 @@ case $basic_machine in
                ;;
        power)  basic_machine=power-ibm
                ;;
-       ppc)    basic_machine=powerpc-unknown
+       ppc | ppcbe)    basic_machine=powerpc-unknown
                ;;
-       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+       ppc-* | ppcbe-*)
+               basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
        ppcle | powerpclittle | ppc-le | powerpc-little)
                basic_machine=powerpcle-unknown
@@ -1019,6 +1061,9 @@ case $basic_machine in
                basic_machine=i860-stratus
                os=-sysv4
                ;;
+       strongarm-* | thumb-*)
+               basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        sun2)
                basic_machine=m68000-sun
                ;;
@@ -1075,20 +1120,8 @@ case $basic_machine in
                basic_machine=t90-cray
                os=-unicos
                ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
-               ;;
-        # This must be matched before tile*.
-        tilegx*)
+       # This must be matched before tile*.
+       tilegx*)
                basic_machine=tilegx-unknown
                os=-linux-gnu
                ;;
@@ -1163,6 +1196,9 @@ case $basic_machine in
        xps | xps100)
                basic_machine=xps100-honeywell
                ;;
+       xscale-* | xscalee[bl]-*)
+               basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+               ;;
        ymp)
                basic_machine=ymp-cray
                os=-unicos
@@ -1260,11 +1296,11 @@ esac
 if [ x"$os" != x"" ]
 then
 case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
+       # First match some system type aliases
+       # that might get confused with valid system types.
        # -solaris* is a basic system type, with this one exception.
-        -auroraux)
-               os=-auroraux
+       -auroraux)
+               os=-auroraux
                ;;
        -solaris1 | -solaris1.*)
                os=`echo $os | sed -e 's|solaris1|sunos4|'`
@@ -1301,7 +1337,8 @@ case $os in
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -mingw32* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1348,7 +1385,7 @@ case $os in
        -opened*)
                os=-openedition
                ;;
-        -os400*)
+       -os400*)
                os=-os400
                ;;
        -wince*)
@@ -1397,7 +1434,7 @@ case $os in
        -sinix*)
                os=-sysv4
                ;;
-        -tpf*)
+       -tpf*)
                os=-tpf
                ;;
        -triton*)
@@ -1442,8 +1479,8 @@ case $os in
        -dicos*)
                os=-dicos
                ;;
-        -nacl*)
-               ;;
+       -nacl*)
+               ;;
        -none)
                ;;
        *)
@@ -1466,10 +1503,10 @@ else
 # system, and we'll never get to this point.
 
 case $basic_machine in
-        score-*)
+       score-*)
                os=-elf
                ;;
-        spu-*)
+       spu-*)
                os=-elf
                ;;
        *-acorn)
@@ -1481,8 +1518,17 @@ case $basic_machine in
        arm*-semi)
                os=-aout
                ;;
-        c4x-* | tic4x-*)
-               os=-coff
+       c4x-* | tic4x-*)
+               os=-coff
+               ;;
+       tic54x-*)
+               os=-coff
+               ;;
+       tic55x-*)
+               os=-coff
+               ;;
+       tic6x-*)
+               os=-coff
                ;;
        # This must come before the *-dec entry.
        pdp10-*)
@@ -1509,7 +1555,7 @@ case $basic_machine in
        m68*-cisco)
                os=-aout
                ;;
-        mep-*)
+       mep-*)
                os=-elf
                ;;
        mips*-cisco)
@@ -1536,7 +1582,7 @@ case $basic_machine in
        *-ibm)
                os=-aix
                ;;
-       *-knuth)
+       *-knuth)
                os=-mmixware
                ;;
        *-wec)
index 4bba1b4..c91d48a 100755 (executable)
--- a/configure
+++ b/configure
@@ -703,7 +703,7 @@ PACKAGE_STRING='my-plugin-package 0.10.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
-ac_unique_file="src/gstplugin.c"
+ac_unique_file="src/gstemul.c"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
diff --git a/libtool b/libtool
index 169e32f..d322945 100755 (executable)
--- a/libtool
+++ b/libtool
@@ -1,4 +1,4 @@
-#! /bin/bash
+#! /bin/sh
 
 # libtool - Provide generalized library-building support services.
 # Generated automatically by config.status (my-plugin-package) 0.10.0
@@ -132,7 +132,7 @@ old_postuninstall_cmds=""
 LTCC="gcc"
 
 # LTCC compiler flags.
-LTCFLAGS="-g -O2 -Wall"
+LTCFLAGS="-Wall -Wall"
 
 # Take the output of nm and produce a listing of raw symbols and C names.
 global_symbol_pipe="sed -n -e 's/^.*[   ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[       ][      ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
@@ -150,7 +150,7 @@ global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \\([^ ]*\\) \$/  {\\
 objdir=.libs
 
 # Shell to use when invoking shell scripts.
-SHELL="/bin/bash"
+SHELL="/bin/sh"
 
 # An echo program that does not interpret backslashes.
 ECHO="echo"
@@ -234,10 +234,10 @@ finish_eval=""
 hardcode_into_libs=yes
 
 # Compile-time system search path for libraries.
-sys_lib_search_path_spec="/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2 /usr/lib/i386-linux-gnu /lib /usr/lib"
+sys_lib_search_path_spec="/usr/lib/gcc/i486-linux-gnu/4.5.3 /usr/lib /lib"
 
 # Run-time system search path for libraries.
-sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/nvidia-current /lib/i386-linux-gnu /usr/lib/i386-linux-gnu /lib/i686-linux-gnu /usr/lib/i686-linux-gnu /usr/lib/alsa-lib /usr/local/lib "
+sys_lib_dlsearch_path_spec="/lib /usr/lib /lib/i486-linux-gnu /usr/lib/i486-linux-gnu /usr/local/lib "
 
 # Whether dlopen is supported.
 dlopen_support=unknown
@@ -456,7 +456,7 @@ hardcode_action=immediate
 #       compiler:              $LTCC
 #       compiler flags:                $LTCFLAGS
 #       linker:                $LD (gnu? $with_gnu_ld)
-#       $progname:             (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu3
+#       $progname:             (GNU libtool) 2.2.6b Debian-2.2.6b-2
 #       automake:              $automake_version
 #       autoconf:              $autoconf_version
 #
@@ -464,7 +464,7 @@ hardcode_action=immediate
 
 PROGRAM=ltmain.sh
 PACKAGE=libtool
-VERSION="2.2.6b Debian-2.2.6b-2ubuntu3"
+VERSION="2.2.6b Debian-2.2.6b-2"
 TIMESTAMP=""
 package_revision=1.3017
 
index fa4b1e1..d88da2c 100755 (executable)
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -65,7 +65,7 @@
 #       compiler:              $LTCC
 #       compiler flags:                $LTCFLAGS
 #       linker:                $LD (gnu? $with_gnu_ld)
-#       $progname:             (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu3
+#       $progname:             (GNU libtool) 2.2.6b Debian-2.2.6b-2
 #       automake:              $automake_version
 #       autoconf:              $autoconf_version
 #
@@ -73,7 +73,7 @@
 
 PROGRAM=ltmain.sh
 PACKAGE=libtool
-VERSION="2.2.6b Debian-2.2.6b-2ubuntu3"
+VERSION="2.2.6b Debian-2.2.6b-2"
 TIMESTAMP=""
 package_revision=1.3017
 
diff --git a/src/.deps/libgstplugin_la-gstplugin.Plo b/src/.deps/libgstplugin_la-gstplugin.Plo
deleted file mode 100644 (file)
index 77f248e..0000000
+++ /dev/null
@@ -1,608 +0,0 @@
-libgstplugin_la-gstplugin.lo: gstplugin.c ../config.h \
- /usr/include/gstreamer-0.10/gst/gst.h /usr/include/glib-2.0/glib.h \
- /usr/include/glib-2.0/glib/galloca.h /usr/include/glib-2.0/glib/gtypes.h \
- /usr/lib/i386-linux-gnu/glib-2.0/include/glibconfig.h \
- /usr/include/glib-2.0/glib/gmacros.h \
- /usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include/stddef.h \
- /usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include-fixed/limits.h \
- /usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include-fixed/syslimits.h \
- /usr/include/limits.h /usr/include/features.h \
- /usr/include/bits/predefs.h /usr/include/sys/cdefs.h \
- /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
- /usr/include/gnu/stubs-32.h /usr/include/bits/posix1_lim.h \
- /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
- /usr/include/bits/posix2_lim.h \
- /usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include/float.h \
- /usr/include/time.h /usr/include/bits/time.h /usr/include/bits/types.h \
- /usr/include/bits/typesizes.h /usr/include/xlocale.h \
- /usr/include/glib-2.0/glib/garray.h \
- /usr/include/glib-2.0/glib/gasyncqueue.h \
- /usr/include/glib-2.0/glib/gthread.h /usr/include/glib-2.0/glib/gerror.h \
- /usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include/stdarg.h \
- /usr/include/glib-2.0/glib/gquark.h /usr/include/glib-2.0/glib/gutils.h \
- /usr/include/glib-2.0/glib/gatomic.h \
- /usr/include/glib-2.0/glib/gbacktrace.h /usr/include/signal.h \
- /usr/include/bits/sigset.h /usr/include/bits/signum.h \
- /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \
- /usr/include/bits/sigcontext.h /usr/include/bits/sigstack.h \
- /usr/include/sys/ucontext.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sigthread.h /usr/include/glib-2.0/glib/gbase64.h \
- /usr/include/glib-2.0/glib/gbitlock.h \
- /usr/include/glib-2.0/glib/gbookmarkfile.h \
- /usr/include/glib-2.0/glib/gcache.h /usr/include/glib-2.0/glib/glist.h \
- /usr/include/glib-2.0/glib/gmem.h /usr/include/glib-2.0/glib/gslice.h \
- /usr/include/glib-2.0/glib/gchecksum.h \
- /usr/include/glib-2.0/glib/gcompletion.h \
- /usr/include/glib-2.0/glib/gconvert.h \
- /usr/include/glib-2.0/glib/gdataset.h /usr/include/glib-2.0/glib/gdate.h \
- /usr/include/glib-2.0/glib/gdatetime.h \
- /usr/include/glib-2.0/glib/gtimezone.h /usr/include/glib-2.0/glib/gdir.h \
- /usr/include/glib-2.0/glib/gfileutils.h \
- /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \
- /usr/include/glib-2.0/glib/ghostutils.h \
- /usr/include/glib-2.0/glib/giochannel.h \
- /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gpoll.h \
- /usr/include/glib-2.0/glib/gslist.h /usr/include/glib-2.0/glib/gstring.h \
- /usr/include/glib-2.0/glib/gunicode.h \
- /usr/include/glib-2.0/glib/gkeyfile.h \
- /usr/include/glib-2.0/glib/gmappedfile.h \
- /usr/include/glib-2.0/glib/gmarkup.h \
- /usr/include/glib-2.0/glib/gmessages.h \
- /usr/include/glib-2.0/glib/gnode.h /usr/include/glib-2.0/glib/goption.h \
- /usr/include/glib-2.0/glib/gpattern.h \
- /usr/include/glib-2.0/glib/gprimes.h /usr/include/glib-2.0/glib/gqsort.h \
- /usr/include/glib-2.0/glib/gqueue.h /usr/include/glib-2.0/glib/grand.h \
- /usr/include/glib-2.0/glib/grel.h /usr/include/glib-2.0/glib/gregex.h \
- /usr/include/glib-2.0/glib/gscanner.h \
- /usr/include/glib-2.0/glib/gsequence.h \
- /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \
- /usr/include/glib-2.0/glib/gstrfuncs.h \
- /usr/include/glib-2.0/glib/gtestutils.h \
- /usr/include/glib-2.0/glib/gthreadpool.h \
- /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \
- /usr/include/glib-2.0/glib/gurifuncs.h \
- /usr/include/glib-2.0/glib/gvarianttype.h \
- /usr/include/glib-2.0/glib/gvariant.h \
- /usr/include/gstreamer-0.10/gst/glib-compat.h \
- /usr/include/gstreamer-0.10/gst/gstenumtypes.h \
- /usr/include/glib-2.0/glib-object.h \
- /usr/include/glib-2.0/gobject/gbinding.h \
- /usr/include/glib-2.0/gobject/gobject.h \
- /usr/include/glib-2.0/gobject/gtype.h \
- /usr/include/glib-2.0/gobject/gvalue.h \
- /usr/include/glib-2.0/gobject/gparam.h \
- /usr/include/glib-2.0/gobject/gclosure.h \
- /usr/include/glib-2.0/gobject/gsignal.h \
- /usr/include/glib-2.0/gobject/gmarshal.h \
- /usr/include/glib-2.0/gobject/gboxed.h \
- /usr/include/glib-2.0/gobject/genums.h \
- /usr/include/glib-2.0/gobject/gparamspecs.h \
- /usr/include/glib-2.0/gobject/gsourceclosure.h \
- /usr/include/glib-2.0/gobject/gtypemodule.h \
- /usr/include/glib-2.0/gobject/gtypeplugin.h \
- /usr/include/glib-2.0/gobject/gvaluearray.h \
- /usr/include/glib-2.0/gobject/gvaluetypes.h \
- /usr/include/gstreamer-0.10/gst/gstversion.h \
- /usr/include/gstreamer-0.10/gst/gstbin.h \
- /usr/include/gstreamer-0.10/gst/gstelement.h \
- /usr/include/gstreamer-0.10/gst/gstconfig.h \
- /usr/include/libxml2/libxml/parser.h \
- /usr/include/libxml2/libxml/xmlversion.h \
- /usr/include/libxml2/libxml/xmlexports.h \
- /usr/include/libxml2/libxml/tree.h /usr/include/stdio.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/bits/stdio.h /usr/include/bits/stdio2.h \
- /usr/include/libxml2/libxml/xmlstring.h \
- /usr/include/libxml2/libxml/xmlregexp.h \
- /usr/include/libxml2/libxml/dict.h /usr/include/libxml2/libxml/hash.h \
- /usr/include/libxml2/libxml/valid.h \
- /usr/include/libxml2/libxml/xmlerror.h \
- /usr/include/libxml2/libxml/list.h \
- /usr/include/libxml2/libxml/xmlautomata.h \
- /usr/include/libxml2/libxml/entities.h \
- /usr/include/libxml2/libxml/encoding.h /usr/include/iconv.h \
- /usr/include/libxml2/libxml/xmlIO.h \
- /usr/include/libxml2/libxml/globals.h /usr/include/libxml2/libxml/SAX.h \
- /usr/include/stdlib.h /usr/include/bits/waitflags.h \
- /usr/include/bits/waitstatus.h /usr/include/endian.h \
- /usr/include/bits/endian.h /usr/include/bits/byteswap.h \
- /usr/include/sys/types.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/sys/sysmacros.h \
- /usr/include/alloca.h /usr/include/bits/stdlib.h \
- /usr/include/libxml2/libxml/xlink.h /usr/include/libxml2/libxml/SAX2.h \
- /usr/include/libxml2/libxml/xmlmemory.h \
- /usr/include/libxml2/libxml/threads.h \
- /usr/include/gstreamer-0.10/gst/gstobject.h \
- /usr/include/gstreamer-0.10/gst/gstpad.h \
- /usr/include/gstreamer-0.10/gst/gstbuffer.h \
- /usr/include/gstreamer-0.10/gst/gstminiobject.h \
- /usr/include/gstreamer-0.10/gst/gstclock.h \
- /usr/include/gstreamer-0.10/gst/gstcaps.h \
- /usr/include/gstreamer-0.10/gst/gststructure.h \
- /usr/include/gstreamer-0.10/gst/gstdatetime.h \
- /usr/include/gstreamer-0.10/gst/gstbufferlist.h \
- /usr/include/gstreamer-0.10/gst/gstevent.h \
- /usr/include/gstreamer-0.10/gst/gstformat.h \
- /usr/include/gstreamer-0.10/gst/gstiterator.h \
- /usr/include/gstreamer-0.10/gst/gsttaglist.h \
- /usr/include/gstreamer-0.10/gst/gstquery.h \
- /usr/include/gstreamer-0.10/gst/gsttask.h \
- /usr/include/gstreamer-0.10/gst/gsttaskpool.h \
- /usr/include/gstreamer-0.10/gst/gstpadtemplate.h \
- /usr/include/gstreamer-0.10/gst/gstbus.h \
- /usr/include/gstreamer-0.10/gst/gstmessage.h \
- /usr/include/gstreamer-0.10/gst/gstelementfactory.h \
- /usr/include/gstreamer-0.10/gst/gstplugin.h /usr/include/sys/stat.h \
- /usr/include/bits/stat.h /usr/include/glib-2.0/gmodule.h \
- /usr/include/gstreamer-0.10/gst/gstmacros.h \
- /usr/include/gstreamer-0.10/gst/gstpluginfeature.h \
- /usr/include/gstreamer-0.10/gst/gstindex.h \
- /usr/include/gstreamer-0.10/gst/gstindexfactory.h \
- /usr/include/gstreamer-0.10/gst/gstchildproxy.h \
- /usr/include/gstreamer-0.10/gst/gstdebugutils.h \
- /usr/include/gstreamer-0.10/gst/gsterror.h /usr/include/errno.h \
- /usr/include/bits/errno.h /usr/include/linux/errno.h \
- /usr/include/i386-linux-gnu/asm/errno.h /usr/include/asm-generic/errno.h \
- /usr/include/asm-generic/errno-base.h \
- /usr/include/gstreamer-0.10/gst/gstghostpad.h \
- /usr/include/gstreamer-0.10/gst/gstinfo.h \
- /usr/include/gstreamer-0.10/gst/gstinterface.h \
- /usr/include/gstreamer-0.10/gst/gstmarshal.h \
- /usr/include/gstreamer-0.10/gst/gstparamspecs.h \
- /usr/include/gstreamer-0.10/gst/gstvalue.h \
- /usr/include/gstreamer-0.10/gst/gstpipeline.h \
- /usr/include/gstreamer-0.10/gst/gstpoll.h \
- /usr/include/gstreamer-0.10/gst/gstpreset.h \
- /usr/include/gstreamer-0.10/gst/gstregistry.h \
- /usr/include/gstreamer-0.10/gst/gstsegment.h \
- /usr/include/gstreamer-0.10/gst/gstsystemclock.h \
- /usr/include/gstreamer-0.10/gst/gsttagsetter.h \
- /usr/include/gstreamer-0.10/gst/gsttrace.h \
- /usr/include/gstreamer-0.10/gst/gsttypefind.h \
- /usr/include/gstreamer-0.10/gst/gsttypefindfactory.h \
- /usr/include/gstreamer-0.10/gst/gsturi.h \
- /usr/include/gstreamer-0.10/gst/gstutils.h \
- /usr/include/gstreamer-0.10/gst/gstparse.h \
- /usr/include/gstreamer-0.10/gst/gstxml.h \
- /usr/include/gstreamer-0.10/gst/gstcompat.h gstplugin.h
-
-../config.h:
-
-/usr/include/gstreamer-0.10/gst/gst.h:
-
-/usr/include/glib-2.0/glib.h:
-
-/usr/include/glib-2.0/glib/galloca.h:
-
-/usr/include/glib-2.0/glib/gtypes.h:
-
-/usr/lib/i386-linux-gnu/glib-2.0/include/glibconfig.h:
-
-/usr/include/glib-2.0/glib/gmacros.h:
-
-/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include/stddef.h:
-
-/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include-fixed/limits.h:
-
-/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include-fixed/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/features.h:
-
-/usr/include/bits/predefs.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-32.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include/float.h:
-
-/usr/include/time.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/xlocale.h:
-
-/usr/include/glib-2.0/glib/garray.h:
-
-/usr/include/glib-2.0/glib/gasyncqueue.h:
-
-/usr/include/glib-2.0/glib/gthread.h:
-
-/usr/include/glib-2.0/glib/gerror.h:
-
-/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include/stdarg.h:
-
-/usr/include/glib-2.0/glib/gquark.h:
-
-/usr/include/glib-2.0/glib/gutils.h:
-
-/usr/include/glib-2.0/glib/gatomic.h:
-
-/usr/include/glib-2.0/glib/gbacktrace.h:
-
-/usr/include/signal.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/signum.h:
-
-/usr/include/bits/siginfo.h:
-
-/usr/include/bits/sigaction.h:
-
-/usr/include/bits/sigcontext.h:
-
-/usr/include/bits/sigstack.h:
-
-/usr/include/sys/ucontext.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/bits/sigthread.h:
-
-/usr/include/glib-2.0/glib/gbase64.h:
-
-/usr/include/glib-2.0/glib/gbitlock.h:
-
-/usr/include/glib-2.0/glib/gbookmarkfile.h:
-
-/usr/include/glib-2.0/glib/gcache.h:
-
-/usr/include/glib-2.0/glib/glist.h:
-
-/usr/include/glib-2.0/glib/gmem.h:
-
-/usr/include/glib-2.0/glib/gslice.h:
-
-/usr/include/glib-2.0/glib/gchecksum.h:
-
-/usr/include/glib-2.0/glib/gcompletion.h:
-
-/usr/include/glib-2.0/glib/gconvert.h:
-
-/usr/include/glib-2.0/glib/gdataset.h:
-
-/usr/include/glib-2.0/glib/gdate.h:
-
-/usr/include/glib-2.0/glib/gdatetime.h:
-
-/usr/include/glib-2.0/glib/gtimezone.h:
-
-/usr/include/glib-2.0/glib/gdir.h:
-
-/usr/include/glib-2.0/glib/gfileutils.h:
-
-/usr/include/glib-2.0/glib/ghash.h:
-
-/usr/include/glib-2.0/glib/ghook.h:
-
-/usr/include/glib-2.0/glib/ghostutils.h:
-
-/usr/include/glib-2.0/glib/giochannel.h:
-
-/usr/include/glib-2.0/glib/gmain.h:
-
-/usr/include/glib-2.0/glib/gpoll.h:
-
-/usr/include/glib-2.0/glib/gslist.h:
-
-/usr/include/glib-2.0/glib/gstring.h:
-
-/usr/include/glib-2.0/glib/gunicode.h:
-
-/usr/include/glib-2.0/glib/gkeyfile.h:
-
-/usr/include/glib-2.0/glib/gmappedfile.h:
-
-/usr/include/glib-2.0/glib/gmarkup.h:
-
-/usr/include/glib-2.0/glib/gmessages.h:
-
-/usr/include/glib-2.0/glib/gnode.h:
-
-/usr/include/glib-2.0/glib/goption.h:
-
-/usr/include/glib-2.0/glib/gpattern.h:
-
-/usr/include/glib-2.0/glib/gprimes.h:
-
-/usr/include/glib-2.0/glib/gqsort.h:
-
-/usr/include/glib-2.0/glib/gqueue.h:
-
-/usr/include/glib-2.0/glib/grand.h:
-
-/usr/include/glib-2.0/glib/grel.h:
-
-/usr/include/glib-2.0/glib/gregex.h:
-
-/usr/include/glib-2.0/glib/gscanner.h:
-
-/usr/include/glib-2.0/glib/gsequence.h:
-
-/usr/include/glib-2.0/glib/gshell.h:
-
-/usr/include/glib-2.0/glib/gspawn.h:
-
-/usr/include/glib-2.0/glib/gstrfuncs.h:
-
-/usr/include/glib-2.0/glib/gtestutils.h:
-
-/usr/include/glib-2.0/glib/gthreadpool.h:
-
-/usr/include/glib-2.0/glib/gtimer.h:
-
-/usr/include/glib-2.0/glib/gtree.h:
-
-/usr/include/glib-2.0/glib/gurifuncs.h:
-
-/usr/include/glib-2.0/glib/gvarianttype.h:
-
-/usr/include/glib-2.0/glib/gvariant.h:
-
-/usr/include/gstreamer-0.10/gst/glib-compat.h:
-
-/usr/include/gstreamer-0.10/gst/gstenumtypes.h:
-
-/usr/include/glib-2.0/glib-object.h:
-
-/usr/include/glib-2.0/gobject/gbinding.h:
-
-/usr/include/glib-2.0/gobject/gobject.h:
-
-/usr/include/glib-2.0/gobject/gtype.h:
-
-/usr/include/glib-2.0/gobject/gvalue.h:
-
-/usr/include/glib-2.0/gobject/gparam.h:
-
-/usr/include/glib-2.0/gobject/gclosure.h:
-
-/usr/include/glib-2.0/gobject/gsignal.h:
-
-/usr/include/glib-2.0/gobject/gmarshal.h:
-
-/usr/include/glib-2.0/gobject/gboxed.h:
-
-/usr/include/glib-2.0/gobject/genums.h:
-
-/usr/include/glib-2.0/gobject/gparamspecs.h:
-
-/usr/include/glib-2.0/gobject/gsourceclosure.h:
-
-/usr/include/glib-2.0/gobject/gtypemodule.h:
-
-/usr/include/glib-2.0/gobject/gtypeplugin.h:
-
-/usr/include/glib-2.0/gobject/gvaluearray.h:
-
-/usr/include/glib-2.0/gobject/gvaluetypes.h:
-
-/usr/include/gstreamer-0.10/gst/gstversion.h:
-
-/usr/include/gstreamer-0.10/gst/gstbin.h:
-
-/usr/include/gstreamer-0.10/gst/gstelement.h:
-
-/usr/include/gstreamer-0.10/gst/gstconfig.h:
-
-/usr/include/libxml2/libxml/parser.h:
-
-/usr/include/libxml2/libxml/xmlversion.h:
-
-/usr/include/libxml2/libxml/xmlexports.h:
-
-/usr/include/libxml2/libxml/tree.h:
-
-/usr/include/stdio.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/bits/stdio.h:
-
-/usr/include/bits/stdio2.h:
-
-/usr/include/libxml2/libxml/xmlstring.h:
-
-/usr/include/libxml2/libxml/xmlregexp.h:
-
-/usr/include/libxml2/libxml/dict.h:
-
-/usr/include/libxml2/libxml/hash.h:
-
-/usr/include/libxml2/libxml/valid.h:
-
-/usr/include/libxml2/libxml/xmlerror.h:
-
-/usr/include/libxml2/libxml/list.h:
-
-/usr/include/libxml2/libxml/xmlautomata.h:
-
-/usr/include/libxml2/libxml/entities.h:
-
-/usr/include/libxml2/libxml/encoding.h:
-
-/usr/include/iconv.h:
-
-/usr/include/libxml2/libxml/xmlIO.h:
-
-/usr/include/libxml2/libxml/globals.h:
-
-/usr/include/libxml2/libxml/SAX.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/bits/waitflags.h:
-
-/usr/include/bits/waitstatus.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/bits/byteswap.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/alloca.h:
-
-/usr/include/bits/stdlib.h:
-
-/usr/include/libxml2/libxml/xlink.h:
-
-/usr/include/libxml2/libxml/SAX2.h:
-
-/usr/include/libxml2/libxml/xmlmemory.h:
-
-/usr/include/libxml2/libxml/threads.h:
-
-/usr/include/gstreamer-0.10/gst/gstobject.h:
-
-/usr/include/gstreamer-0.10/gst/gstpad.h:
-
-/usr/include/gstreamer-0.10/gst/gstbuffer.h:
-
-/usr/include/gstreamer-0.10/gst/gstminiobject.h:
-
-/usr/include/gstreamer-0.10/gst/gstclock.h:
-
-/usr/include/gstreamer-0.10/gst/gstcaps.h:
-
-/usr/include/gstreamer-0.10/gst/gststructure.h:
-
-/usr/include/gstreamer-0.10/gst/gstdatetime.h:
-
-/usr/include/gstreamer-0.10/gst/gstbufferlist.h:
-
-/usr/include/gstreamer-0.10/gst/gstevent.h:
-
-/usr/include/gstreamer-0.10/gst/gstformat.h:
-
-/usr/include/gstreamer-0.10/gst/gstiterator.h:
-
-/usr/include/gstreamer-0.10/gst/gsttaglist.h:
-
-/usr/include/gstreamer-0.10/gst/gstquery.h:
-
-/usr/include/gstreamer-0.10/gst/gsttask.h:
-
-/usr/include/gstreamer-0.10/gst/gsttaskpool.h:
-
-/usr/include/gstreamer-0.10/gst/gstpadtemplate.h:
-
-/usr/include/gstreamer-0.10/gst/gstbus.h:
-
-/usr/include/gstreamer-0.10/gst/gstmessage.h:
-
-/usr/include/gstreamer-0.10/gst/gstelementfactory.h:
-
-/usr/include/gstreamer-0.10/gst/gstplugin.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/glib-2.0/gmodule.h:
-
-/usr/include/gstreamer-0.10/gst/gstmacros.h:
-
-/usr/include/gstreamer-0.10/gst/gstpluginfeature.h:
-
-/usr/include/gstreamer-0.10/gst/gstindex.h:
-
-/usr/include/gstreamer-0.10/gst/gstindexfactory.h:
-
-/usr/include/gstreamer-0.10/gst/gstchildproxy.h:
-
-/usr/include/gstreamer-0.10/gst/gstdebugutils.h:
-
-/usr/include/gstreamer-0.10/gst/gsterror.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/i386-linux-gnu/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-/usr/include/gstreamer-0.10/gst/gstghostpad.h:
-
-/usr/include/gstreamer-0.10/gst/gstinfo.h:
-
-/usr/include/gstreamer-0.10/gst/gstinterface.h:
-
-/usr/include/gstreamer-0.10/gst/gstmarshal.h:
-
-/usr/include/gstreamer-0.10/gst/gstparamspecs.h:
-
-/usr/include/gstreamer-0.10/gst/gstvalue.h:
-
-/usr/include/gstreamer-0.10/gst/gstpipeline.h:
-
-/usr/include/gstreamer-0.10/gst/gstpoll.h:
-
-/usr/include/gstreamer-0.10/gst/gstpreset.h:
-
-/usr/include/gstreamer-0.10/gst/gstregistry.h:
-
-/usr/include/gstreamer-0.10/gst/gstsegment.h:
-
-/usr/include/gstreamer-0.10/gst/gstsystemclock.h:
-
-/usr/include/gstreamer-0.10/gst/gsttagsetter.h:
-
-/usr/include/gstreamer-0.10/gst/gsttrace.h:
-
-/usr/include/gstreamer-0.10/gst/gsttypefind.h:
-
-/usr/include/gstreamer-0.10/gst/gsttypefindfactory.h:
-
-/usr/include/gstreamer-0.10/gst/gsturi.h:
-
-/usr/include/gstreamer-0.10/gst/gstutils.h:
-
-/usr/include/gstreamer-0.10/gst/gstparse.h:
-
-/usr/include/gstreamer-0.10/gst/gstxml.h:
-
-/usr/include/gstreamer-0.10/gst/gstcompat.h:
-
-gstplugin.h:
diff --git a/src/.libs/libgstplugin.exp b/src/.libs/libgstplugin.exp
deleted file mode 100644 (file)
index 10108b7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-gst_plugin_desc
-gst_plugin_template_get_type
diff --git a/src/.libs/libgstplugin.la b/src/.libs/libgstplugin.la
deleted file mode 120000 (symlink)
index b43a73f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../libgstplugin.la
\ No newline at end of file
diff --git a/src/.libs/libgstplugin.lai b/src/.libs/libgstplugin.lai
deleted file mode 100644 (file)
index 4545759..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# libgstplugin.la - a libtool library file
-# Generated by ltmain.sh (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu3
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname='libgstplugin.so'
-
-# Names of this library.
-library_names='libgstplugin.so libgstplugin.so libgstplugin.so'
-
-# The name of the static archive.
-old_library=''
-
-# Linker flags that can not go in dependency_libs.
-inherited_linker_flags=' -pthread'
-
-# Libraries that this one depends upon.
-dependency_libs=' -L/usr/lib/i386-linux-gnu /usr/lib/libgstbase-0.10.la /usr/lib/libgstcontroller-0.10.la /usr/lib/libgstreamer-0.10.la /usr/lib/i386-linux-gnu/libgobject-2.0.la /usr/lib/i386-linux-gnu/libgmodule-2.0.la /usr/lib/libxml2.la /usr/lib/i386-linux-gnu/libgthread-2.0.la -lrt /usr/lib/i386-linux-gnu/libglib-2.0.la'
-
-# Names of additional weak libraries provided by this library
-weak_library_names=''
-
-# Version information for libgstplugin.
-current=0
-age=0
-revision=0
-
-# Is this an already installed library?
-installed=yes
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=yes
-
-# Files to dlopen/dlpreopen
-dlopen=''
-dlpreopen=''
-
-# Directory that this library needs to be installed in:
-libdir='/usr/local/lib/gstreamer-0.10'
diff --git a/src/.libs/libgstplugin.so b/src/.libs/libgstplugin.so
deleted file mode 100755 (executable)
index 5d79686..0000000
Binary files a/src/.libs/libgstplugin.so and /dev/null differ
diff --git a/src/.libs/libgstplugin.ver b/src/.libs/libgstplugin.ver
deleted file mode 100644 (file)
index eb46416..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-{ global:
-gst_plugin_desc;
-gst_plugin_template_get_type;
-local: *; };
diff --git a/src/.libs/libgstplugin_la-gstplugin.o b/src/.libs/libgstplugin_la-gstplugin.o
deleted file mode 100644 (file)
index 84c5bc2..0000000
Binary files a/src/.libs/libgstplugin_la-gstplugin.o and /dev/null differ
index 9e00900..21e288a 100644 (file)
@@ -18,7 +18,6 @@
 # Note: plugindir is set in configure
 
 
-
 pkgdatadir = $(datadir)/my-plugin-package
 pkgincludedir = $(includedir)/my-plugin-package
 pkglibdir = $(libdir)/my-plugin-package
@@ -38,8 +37,7 @@ POST_UNINSTALL = :
 build_triplet = i686-pc-linux-gnu
 host_triplet = i686-pc-linux-gnu
 subdir = src
-DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -72,13 +70,15 @@ am__base_list = \
 am__installdirs = "$(DESTDIR)$(plugindir)"
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-libgstplugin_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am_libgstplugin_la_OBJECTS = libgstplugin_la-gstplugin.lo
-libgstplugin_la_OBJECTS = $(am_libgstplugin_la_OBJECTS)
-libgstplugin_la_LINK = $(LIBTOOL) --tag=CC \
-       $(libgstplugin_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-       $(CCLD) $(libgstplugin_la_CFLAGS) $(CFLAGS) \
-       $(libgstplugin_la_LDFLAGS) $(LDFLAGS) -o $@
+libgstemul_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_libgstemul_la_OBJECTS = libgstemul_la-gstemul.lo \
+       libgstemul_la-gstemulutils.lo libgstemul_la-gstemulnewdec.lo \
+       libgstemul_la-gstemulnewenc.lo libgstemul_la-gstemulapi.lo \
+       libgstemul_la-gstemuldev.lo libgstemul_la-gstemulapi2.lo
+libgstemul_la_OBJECTS = $(am_libgstemul_la_OBJECTS)
+libgstemul_la_LINK = $(LIBTOOL) --tag=CC $(libgstemul_la_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libgstemul_la_CFLAGS) \
+       $(CFLAGS) $(libgstemul_la_LDFLAGS) $(LDFLAGS) -o $@
 DEFAULT_INCLUDES = -I. -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -92,22 +92,21 @@ CCLD = $(CC)
 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
        --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
        $(LDFLAGS) -o $@
-SOURCES = $(libgstplugin_la_SOURCES)
-DIST_SOURCES = $(libgstplugin_la_SOURCES)
-HEADERS = $(noinst_HEADERS)
+SOURCES = $(libgstemul_la_SOURCES)
+DIST_SOURCES = $(libgstemul_la_SOURCES)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run aclocal-1.11
-AMTAR = ${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run tar
+ACLOCAL = ${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run aclocal-1.11
+AMTAR = ${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run tar
 AR = ar
-AUTOCONF = ${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run autoconf
-AUTOHEADER = ${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run autoheader
-AUTOMAKE = ${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run automake-1.11
+AUTOCONF = ${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run automake-1.11
 AWK = gawk
 CC = gcc
 CCDEPMODE = depmode=gcc3
-CFLAGS = -g -O2 -Wall
+CFLAGS = -Wall -Wall
 CPP = gcc -E
 CPPFLAGS = 
 CYGPATH_W = echo
@@ -122,8 +121,8 @@ EGREP = /bin/grep -E
 EXEEXT = 
 FGREP = /bin/grep -F
 GREP = /bin/grep
-GST_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/gstreamer-0.10 -I/usr/include/libxml2   -Wall
-GST_LIBS = -pthread -L/usr/lib/i386-linux-gnu -lgstbase-0.10 -lgstcontroller-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lxml2 -lgthread-2.0 -lrt -lglib-2.0  
+GST_CFLAGS = -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2   -Wall
+GST_LIBS = -pthread -lgstbase-0.10 -lgstcontroller-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lxml2 -lgthread-2.0 -lrt -lglib-2.0  
 GST_PLUGIN_LDFLAGS = -module -avoid-version -export-symbols-regex _*\(gst_\|Gst\|GST_\).*
 HAVE_PKGCONFIG =  
 INSTALL = /usr/bin/install -c
@@ -140,7 +139,7 @@ LIPO =
 LN_S = ln -s
 LTLIBOBJS = 
 MAINT = 
-MAKEINFO = ${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/missing --run makeinfo
+MAKEINFO = ${SHELL} /home/kt/codec/dev/gst-emul_20130124/missing --run makeinfo
 MKDIR_P = /bin/mkdir -p
 NM = /usr/bin/nm -B
 NMEDIT = 
@@ -158,17 +157,17 @@ PACKAGE_VERSION = 0.10.0
 PATH_SEPARATOR = :
 PKG_CONFIG = /usr/bin/pkg-config
 PKG_CONFIG_LIBDIR = 
-PKG_CONFIG_PATH = 
+PKG_CONFIG_PATH = /home/kt/sbs/target-i386/usr/lib/pkgconfig:/home/kt/sbs/target-i386/usr/share/pkgconfig:/home/kt/sbs/tools/usr/share/pkgconfig
 RANLIB = ranlib
 SED = /bin/sed
 SET_MAKE = 
-SHELL = /bin/bash
+SHELL = /bin/sh
 STRIP = strip
 VERSION = 0.10.0
-abs_builddir = /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/src
-abs_srcdir = /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/src
-abs_top_builddir = /home/kt/dev/cur_dev/simply/gst-template/gst-plugin
-abs_top_srcdir = /home/kt/dev/cur_dev/simply/gst-template/gst-plugin
+abs_builddir = /home/kt/codec/dev/gst-emul_20130124/src
+abs_srcdir = /home/kt/codec/dev/gst-emul_20130124/src
+abs_top_builddir = /home/kt/codec/dev/gst-emul_20130124
+abs_top_srcdir = /home/kt/codec/dev/gst-emul_20130124
 ac_ct_CC = gcc
 ac_ct_DUMPBIN = 
 am__include = include
@@ -196,7 +195,7 @@ host_vendor = pc
 htmldir = ${docdir}
 includedir = ${prefix}/include
 infodir = ${datarootdir}/info
-install_sh = ${SHELL} /home/kt/dev/cur_dev/simply/gst-template/gst-plugin/install-sh
+install_sh = ${SHELL} /home/kt/codec/dev/gst-emul_20130124/install-sh
 libdir = ${exec_prefix}/lib
 libexecdir = ${exec_prefix}/libexec
 localedir = ${datarootdir}/locale
@@ -220,9 +219,9 @@ top_builddir = ..
 top_srcdir = ..
 
 ##############################################################################
-# TODO: change libgstplugin.la to something else, e.g. libmysomething.la     #
+# TODO: change libgstemul.la to something else, e.g. libmysomething.la     #
 ##############################################################################
-plugin_LTLIBRARIES = libgstplugin.la
+plugin_LTLIBRARIES = libgstemul.la
 
 ##############################################################################
 # TODO: for the next set of variables, name the prefix if you named the .la, #
@@ -233,16 +232,20 @@ plugin_LTLIBRARIES = libgstplugin.la
 ##############################################################################
 
 # sources used to compile this plug-in
-libgstplugin_la_SOURCES = gstplugin.c gstplugin.h
+libgstemul_la_SOURCES = gstemul.c \
+       gstemulutils.c \
+       gstemulnewdec.c \
+       gstemulnewenc.c \
+       gstemulapi.c \
+       gstemuldev.c \
+       gstemulapi2.c
 
-# compiler and linker flags used to compile this plugin, set in configure.ac
-libgstplugin_la_CFLAGS = $(GST_CFLAGS)
-libgstplugin_la_LIBADD = $(GST_LIBS)
-libgstplugin_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstplugin_la_LIBTOOLFLAGS = --tag=disable-static
 
-# headers we need but don't want installed
-noinst_HEADERS = gstplugin.h
+# compiler and linker flags used to compile this plugin, set in configure.ac
+libgstemul_la_CFLAGS = $(GST_CFLAGS) -g
+libgstemul_la_LIBADD = $(GST_LIBS) -lgstaudio-0.10 -lgstpbutils-0.10
+libgstemul_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstemul_la_LIBTOOLFLAGS = --tag=disable-static
 all: all-am
 
 .SUFFIXES:
@@ -308,8 +311,8 @@ clean-pluginLTLIBRARIES:
          echo "rm -f \"$${dir}/so_locations\""; \
          rm -f "$${dir}/so_locations"; \
        done
-libgstplugin.la: $(libgstplugin_la_OBJECTS) $(libgstplugin_la_DEPENDENCIES) 
-       $(libgstplugin_la_LINK) -rpath $(plugindir) $(libgstplugin_la_OBJECTS) $(libgstplugin_la_LIBADD) $(LIBS)
+libgstemul.la: $(libgstemul_la_OBJECTS) $(libgstemul_la_DEPENDENCIES) 
+       $(libgstemul_la_LINK) -rpath $(plugindir) $(libgstemul_la_OBJECTS) $(libgstemul_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -317,7 +320,13 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
-include ./$(DEPDIR)/libgstplugin_la-gstplugin.Plo
+include ./$(DEPDIR)/libgstemul_la-gstemul.Plo
+include ./$(DEPDIR)/libgstemul_la-gstemulapi.Plo
+include ./$(DEPDIR)/libgstemul_la-gstemulapi2.Plo
+include ./$(DEPDIR)/libgstemul_la-gstemuldev.Plo
+include ./$(DEPDIR)/libgstemul_la-gstemulnewdec.Plo
+include ./$(DEPDIR)/libgstemul_la-gstemulnewenc.Plo
+include ./$(DEPDIR)/libgstemul_la-gstemulutils.Plo
 
 .c.o:
        $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -340,12 +349,54 @@ include ./$(DEPDIR)/libgstplugin_la-gstplugin.Plo
 #      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
 #      $(LTCOMPILE) -c -o $@ $<
 
-libgstplugin_la-gstplugin.lo: gstplugin.c
-       $(LIBTOOL)  --tag=CC $(libgstplugin_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstplugin_la_CFLAGS) $(CFLAGS) -MT libgstplugin_la-gstplugin.lo -MD -MP -MF $(DEPDIR)/libgstplugin_la-gstplugin.Tpo -c -o libgstplugin_la-gstplugin.lo `test -f 'gstplugin.c' || echo '$(srcdir)/'`gstplugin.c
-       $(am__mv) $(DEPDIR)/libgstplugin_la-gstplugin.Tpo $(DEPDIR)/libgstplugin_la-gstplugin.Plo
-#      source='gstplugin.c' object='libgstplugin_la-gstplugin.lo' libtool=yes \
+libgstemul_la-gstemul.lo: gstemul.c
+       $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -MT libgstemul_la-gstemul.lo -MD -MP -MF $(DEPDIR)/libgstemul_la-gstemul.Tpo -c -o libgstemul_la-gstemul.lo `test -f 'gstemul.c' || echo '$(srcdir)/'`gstemul.c
+       $(am__mv) $(DEPDIR)/libgstemul_la-gstemul.Tpo $(DEPDIR)/libgstemul_la-gstemul.Plo
+#      source='gstemul.c' object='libgstemul_la-gstemul.lo' libtool=yes \
+#      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#      $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -c -o libgstemul_la-gstemul.lo `test -f 'gstemul.c' || echo '$(srcdir)/'`gstemul.c
+
+libgstemul_la-gstemulutils.lo: gstemulutils.c
+       $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -MT libgstemul_la-gstemulutils.lo -MD -MP -MF $(DEPDIR)/libgstemul_la-gstemulutils.Tpo -c -o libgstemul_la-gstemulutils.lo `test -f 'gstemulutils.c' || echo '$(srcdir)/'`gstemulutils.c
+       $(am__mv) $(DEPDIR)/libgstemul_la-gstemulutils.Tpo $(DEPDIR)/libgstemul_la-gstemulutils.Plo
+#      source='gstemulutils.c' object='libgstemul_la-gstemulutils.lo' libtool=yes \
+#      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#      $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -c -o libgstemul_la-gstemulutils.lo `test -f 'gstemulutils.c' || echo '$(srcdir)/'`gstemulutils.c
+
+libgstemul_la-gstemulnewdec.lo: gstemulnewdec.c
+       $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -MT libgstemul_la-gstemulnewdec.lo -MD -MP -MF $(DEPDIR)/libgstemul_la-gstemulnewdec.Tpo -c -o libgstemul_la-gstemulnewdec.lo `test -f 'gstemulnewdec.c' || echo '$(srcdir)/'`gstemulnewdec.c
+       $(am__mv) $(DEPDIR)/libgstemul_la-gstemulnewdec.Tpo $(DEPDIR)/libgstemul_la-gstemulnewdec.Plo
+#      source='gstemulnewdec.c' object='libgstemul_la-gstemulnewdec.lo' libtool=yes \
+#      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#      $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -c -o libgstemul_la-gstemulnewdec.lo `test -f 'gstemulnewdec.c' || echo '$(srcdir)/'`gstemulnewdec.c
+
+libgstemul_la-gstemulnewenc.lo: gstemulnewenc.c
+       $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -MT libgstemul_la-gstemulnewenc.lo -MD -MP -MF $(DEPDIR)/libgstemul_la-gstemulnewenc.Tpo -c -o libgstemul_la-gstemulnewenc.lo `test -f 'gstemulnewenc.c' || echo '$(srcdir)/'`gstemulnewenc.c
+       $(am__mv) $(DEPDIR)/libgstemul_la-gstemulnewenc.Tpo $(DEPDIR)/libgstemul_la-gstemulnewenc.Plo
+#      source='gstemulnewenc.c' object='libgstemul_la-gstemulnewenc.lo' libtool=yes \
+#      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#      $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -c -o libgstemul_la-gstemulnewenc.lo `test -f 'gstemulnewenc.c' || echo '$(srcdir)/'`gstemulnewenc.c
+
+libgstemul_la-gstemulapi.lo: gstemulapi.c
+       $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -MT libgstemul_la-gstemulapi.lo -MD -MP -MF $(DEPDIR)/libgstemul_la-gstemulapi.Tpo -c -o libgstemul_la-gstemulapi.lo `test -f 'gstemulapi.c' || echo '$(srcdir)/'`gstemulapi.c
+       $(am__mv) $(DEPDIR)/libgstemul_la-gstemulapi.Tpo $(DEPDIR)/libgstemul_la-gstemulapi.Plo
+#      source='gstemulapi.c' object='libgstemul_la-gstemulapi.lo' libtool=yes \
+#      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#      $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -c -o libgstemul_la-gstemulapi.lo `test -f 'gstemulapi.c' || echo '$(srcdir)/'`gstemulapi.c
+
+libgstemul_la-gstemuldev.lo: gstemuldev.c
+       $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -MT libgstemul_la-gstemuldev.lo -MD -MP -MF $(DEPDIR)/libgstemul_la-gstemuldev.Tpo -c -o libgstemul_la-gstemuldev.lo `test -f 'gstemuldev.c' || echo '$(srcdir)/'`gstemuldev.c
+       $(am__mv) $(DEPDIR)/libgstemul_la-gstemuldev.Tpo $(DEPDIR)/libgstemul_la-gstemuldev.Plo
+#      source='gstemuldev.c' object='libgstemul_la-gstemuldev.lo' libtool=yes \
 #      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#      $(LIBTOOL)  --tag=CC $(libgstplugin_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstplugin_la_CFLAGS) $(CFLAGS) -c -o libgstplugin_la-gstplugin.lo `test -f 'gstplugin.c' || echo '$(srcdir)/'`gstplugin.c
+#      $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -c -o libgstemul_la-gstemuldev.lo `test -f 'gstemuldev.c' || echo '$(srcdir)/'`gstemuldev.c
+
+libgstemul_la-gstemulapi2.lo: gstemulapi2.c
+       $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -MT libgstemul_la-gstemulapi2.lo -MD -MP -MF $(DEPDIR)/libgstemul_la-gstemulapi2.Tpo -c -o libgstemul_la-gstemulapi2.lo `test -f 'gstemulapi2.c' || echo '$(srcdir)/'`gstemulapi2.c
+       $(am__mv) $(DEPDIR)/libgstemul_la-gstemulapi2.Tpo $(DEPDIR)/libgstemul_la-gstemulapi2.Plo
+#      source='gstemulapi2.c' object='libgstemul_la-gstemulapi2.lo' libtool=yes \
+#      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#      $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -c -o libgstemul_la-gstemulapi2.lo `test -f 'gstemulapi2.c' || echo '$(srcdir)/'`gstemulapi2.c
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -437,7 +488,7 @@ distdir: $(DISTFILES)
        done
 check-am: all-am
 check: check-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+all-am: Makefile $(LTLIBRARIES)
 installdirs:
        for dir in "$(DESTDIR)$(plugindir)"; do \
          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
@@ -555,6 +606,9 @@ uninstall-am: uninstall-pluginLTLIBRARIES
        tags uninstall uninstall-am uninstall-pluginLTLIBRARIES
 
 
+# headers we need but don't want installed
+#noinst_HEADERS = gstemul.h
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index 3a81d56..f17c3b4 100644 (file)
@@ -17,6 +17,7 @@ plugin_LTLIBRARIES = libgstemul.la
 libgstemul_la_SOURCES = gstemul.c \
        gstemulutils.c \
        gstemulnewdec.c \
+       gstemulnewenc.c \
        gstemulapi.c \
        gstemuldev.c \
        gstemulapi2.c
index 67b4c5c..b57daaf 100644 (file)
@@ -17,7 +17,6 @@
 
 # Note: plugindir is set in configure
 
-
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
@@ -38,8 +37,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = src
-DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -72,13 +70,15 @@ am__base_list = \
 am__installdirs = "$(DESTDIR)$(plugindir)"
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-libgstplugin_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am_libgstplugin_la_OBJECTS = libgstplugin_la-gstplugin.lo
-libgstplugin_la_OBJECTS = $(am_libgstplugin_la_OBJECTS)
-libgstplugin_la_LINK = $(LIBTOOL) --tag=CC \
-       $(libgstplugin_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-       $(CCLD) $(libgstplugin_la_CFLAGS) $(CFLAGS) \
-       $(libgstplugin_la_LDFLAGS) $(LDFLAGS) -o $@
+libgstemul_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_libgstemul_la_OBJECTS = libgstemul_la-gstemul.lo \
+       libgstemul_la-gstemulutils.lo libgstemul_la-gstemulnewdec.lo \
+       libgstemul_la-gstemulnewenc.lo libgstemul_la-gstemulapi.lo \
+       libgstemul_la-gstemuldev.lo libgstemul_la-gstemulapi2.lo
+libgstemul_la_OBJECTS = $(am_libgstemul_la_OBJECTS)
+libgstemul_la_LINK = $(LIBTOOL) --tag=CC $(libgstemul_la_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libgstemul_la_CFLAGS) \
+       $(CFLAGS) $(libgstemul_la_LDFLAGS) $(LDFLAGS) -o $@
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -92,9 +92,8 @@ CCLD = $(CC)
 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
        --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
        $(LDFLAGS) -o $@
-SOURCES = $(libgstplugin_la_SOURCES)
-DIST_SOURCES = $(libgstplugin_la_SOURCES)
-HEADERS = $(noinst_HEADERS)
+SOURCES = $(libgstemul_la_SOURCES)
+DIST_SOURCES = $(libgstemul_la_SOURCES)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -220,9 +219,9 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 
 ##############################################################################
-# TODO: change libgstplugin.la to something else, e.g. libmysomething.la     #
+# TODO: change libgstemul.la to something else, e.g. libmysomething.la     #
 ##############################################################################
-plugin_LTLIBRARIES = libgstplugin.la
+plugin_LTLIBRARIES = libgstemul.la
 
 ##############################################################################
 # TODO: for the next set of variables, name the prefix if you named the .la, #
@@ -233,16 +232,20 @@ plugin_LTLIBRARIES = libgstplugin.la
 ##############################################################################
 
 # sources used to compile this plug-in
-libgstplugin_la_SOURCES = gstplugin.c gstplugin.h
+libgstemul_la_SOURCES = gstemul.c \
+       gstemulutils.c \
+       gstemulnewdec.c \
+       gstemulnewenc.c \
+       gstemulapi.c \
+       gstemuldev.c \
+       gstemulapi2.c
 
-# compiler and linker flags used to compile this plugin, set in configure.ac
-libgstplugin_la_CFLAGS = $(GST_CFLAGS)
-libgstplugin_la_LIBADD = $(GST_LIBS)
-libgstplugin_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstplugin_la_LIBTOOLFLAGS = --tag=disable-static
 
-# headers we need but don't want installed
-noinst_HEADERS = gstplugin.h
+# compiler and linker flags used to compile this plugin, set in configure.ac
+libgstemul_la_CFLAGS = $(GST_CFLAGS) -g
+libgstemul_la_LIBADD = $(GST_LIBS) -lgstaudio-0.10 -lgstpbutils-0.10
+libgstemul_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstemul_la_LIBTOOLFLAGS = --tag=disable-static
 all: all-am
 
 .SUFFIXES:
@@ -308,8 +311,8 @@ clean-pluginLTLIBRARIES:
          echo "rm -f \"$${dir}/so_locations\""; \
          rm -f "$${dir}/so_locations"; \
        done
-libgstplugin.la: $(libgstplugin_la_OBJECTS) $(libgstplugin_la_DEPENDENCIES) 
-       $(libgstplugin_la_LINK) -rpath $(plugindir) $(libgstplugin_la_OBJECTS) $(libgstplugin_la_LIBADD) $(LIBS)
+libgstemul.la: $(libgstemul_la_OBJECTS) $(libgstemul_la_DEPENDENCIES) 
+       $(libgstemul_la_LINK) -rpath $(plugindir) $(libgstemul_la_OBJECTS) $(libgstemul_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -317,7 +320,13 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstplugin_la-gstplugin.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstemul_la-gstemul.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstemul_la-gstemulapi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstemul_la-gstemulapi2.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstemul_la-gstemuldev.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstemul_la-gstemulnewdec.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstemul_la-gstemulnewenc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstemul_la-gstemulutils.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -340,12 +349,54 @@ distclean-compile:
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
 
-libgstplugin_la-gstplugin.lo: gstplugin.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(libgstplugin_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstplugin_la_CFLAGS) $(CFLAGS) -MT libgstplugin_la-gstplugin.lo -MD -MP -MF $(DEPDIR)/libgstplugin_la-gstplugin.Tpo -c -o libgstplugin_la-gstplugin.lo `test -f 'gstplugin.c' || echo '$(srcdir)/'`gstplugin.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libgstplugin_la-gstplugin.Tpo $(DEPDIR)/libgstplugin_la-gstplugin.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='gstplugin.c' object='libgstplugin_la-gstplugin.lo' libtool=yes @AMDEPBACKSLASH@
+libgstemul_la-gstemul.lo: gstemul.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -MT libgstemul_la-gstemul.lo -MD -MP -MF $(DEPDIR)/libgstemul_la-gstemul.Tpo -c -o libgstemul_la-gstemul.lo `test -f 'gstemul.c' || echo '$(srcdir)/'`gstemul.c
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libgstemul_la-gstemul.Tpo $(DEPDIR)/libgstemul_la-gstemul.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='gstemul.c' object='libgstemul_la-gstemul.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -c -o libgstemul_la-gstemul.lo `test -f 'gstemul.c' || echo '$(srcdir)/'`gstemul.c
+
+libgstemul_la-gstemulutils.lo: gstemulutils.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -MT libgstemul_la-gstemulutils.lo -MD -MP -MF $(DEPDIR)/libgstemul_la-gstemulutils.Tpo -c -o libgstemul_la-gstemulutils.lo `test -f 'gstemulutils.c' || echo '$(srcdir)/'`gstemulutils.c
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libgstemul_la-gstemulutils.Tpo $(DEPDIR)/libgstemul_la-gstemulutils.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='gstemulutils.c' object='libgstemul_la-gstemulutils.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -c -o libgstemul_la-gstemulutils.lo `test -f 'gstemulutils.c' || echo '$(srcdir)/'`gstemulutils.c
+
+libgstemul_la-gstemulnewdec.lo: gstemulnewdec.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -MT libgstemul_la-gstemulnewdec.lo -MD -MP -MF $(DEPDIR)/libgstemul_la-gstemulnewdec.Tpo -c -o libgstemul_la-gstemulnewdec.lo `test -f 'gstemulnewdec.c' || echo '$(srcdir)/'`gstemulnewdec.c
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libgstemul_la-gstemulnewdec.Tpo $(DEPDIR)/libgstemul_la-gstemulnewdec.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='gstemulnewdec.c' object='libgstemul_la-gstemulnewdec.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -c -o libgstemul_la-gstemulnewdec.lo `test -f 'gstemulnewdec.c' || echo '$(srcdir)/'`gstemulnewdec.c
+
+libgstemul_la-gstemulnewenc.lo: gstemulnewenc.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -MT libgstemul_la-gstemulnewenc.lo -MD -MP -MF $(DEPDIR)/libgstemul_la-gstemulnewenc.Tpo -c -o libgstemul_la-gstemulnewenc.lo `test -f 'gstemulnewenc.c' || echo '$(srcdir)/'`gstemulnewenc.c
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libgstemul_la-gstemulnewenc.Tpo $(DEPDIR)/libgstemul_la-gstemulnewenc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='gstemulnewenc.c' object='libgstemul_la-gstemulnewenc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -c -o libgstemul_la-gstemulnewenc.lo `test -f 'gstemulnewenc.c' || echo '$(srcdir)/'`gstemulnewenc.c
+
+libgstemul_la-gstemulapi.lo: gstemulapi.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -MT libgstemul_la-gstemulapi.lo -MD -MP -MF $(DEPDIR)/libgstemul_la-gstemulapi.Tpo -c -o libgstemul_la-gstemulapi.lo `test -f 'gstemulapi.c' || echo '$(srcdir)/'`gstemulapi.c
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libgstemul_la-gstemulapi.Tpo $(DEPDIR)/libgstemul_la-gstemulapi.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='gstemulapi.c' object='libgstemul_la-gstemulapi.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -c -o libgstemul_la-gstemulapi.lo `test -f 'gstemulapi.c' || echo '$(srcdir)/'`gstemulapi.c
+
+libgstemul_la-gstemuldev.lo: gstemuldev.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -MT libgstemul_la-gstemuldev.lo -MD -MP -MF $(DEPDIR)/libgstemul_la-gstemuldev.Tpo -c -o libgstemul_la-gstemuldev.lo `test -f 'gstemuldev.c' || echo '$(srcdir)/'`gstemuldev.c
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libgstemul_la-gstemuldev.Tpo $(DEPDIR)/libgstemul_la-gstemuldev.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='gstemuldev.c' object='libgstemul_la-gstemuldev.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(libgstplugin_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstplugin_la_CFLAGS) $(CFLAGS) -c -o libgstplugin_la-gstplugin.lo `test -f 'gstplugin.c' || echo '$(srcdir)/'`gstplugin.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -c -o libgstemul_la-gstemuldev.lo `test -f 'gstemuldev.c' || echo '$(srcdir)/'`gstemuldev.c
+
+libgstemul_la-gstemulapi2.lo: gstemulapi2.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -MT libgstemul_la-gstemulapi2.lo -MD -MP -MF $(DEPDIR)/libgstemul_la-gstemulapi2.Tpo -c -o libgstemul_la-gstemulapi2.lo `test -f 'gstemulapi2.c' || echo '$(srcdir)/'`gstemulapi2.c
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libgstemul_la-gstemulapi2.Tpo $(DEPDIR)/libgstemul_la-gstemulapi2.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='gstemulapi2.c' object='libgstemul_la-gstemulapi2.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(libgstemul_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstemul_la_CFLAGS) $(CFLAGS) -c -o libgstemul_la-gstemulapi2.lo `test -f 'gstemulapi2.c' || echo '$(srcdir)/'`gstemulapi2.c
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -437,7 +488,7 @@ distdir: $(DISTFILES)
        done
 check-am: all-am
 check: check-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+all-am: Makefile $(LTLIBRARIES)
 installdirs:
        for dir in "$(DESTDIR)$(plugindir)"; do \
          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
@@ -555,6 +606,9 @@ uninstall-am: uninstall-pluginLTLIBRARIES
        tags uninstall uninstall-am uninstall-pluginLTLIBRARIES
 
 
+# headers we need but don't want installed
+#noinst_HEADERS = gstemul.h
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index 9e3d40f..ec5798d 100644 (file)
@@ -65,6 +65,7 @@ gst_emul_codec_element_init ()
   void *buffer = NULL;
   GList *element = NULL;
   CodecIOParams params;
+//  CodecDevice dev;
 
   fd = open (CODEC_DEV, O_RDWR);
   if (fd < 0) {
@@ -73,8 +74,8 @@ gst_emul_codec_element_init ()
 
   ioctl (fd, CODEC_CMD_GET_VERSION, &version);
   if (version != CODEC_VER) {
-    printf ("version conflict between device: %d, plugin: %d\n",
-        version, CODEC_VER);
+    CODEC_LOG (INFO, "version conflict between device: %d, plugin: %d\n",
+              version, CODEC_VER);
     return FALSE;
   }
 
@@ -83,34 +84,69 @@ gst_emul_codec_element_init ()
     perror ("failure memory mapping.");
   }
 
-  CODEC_PARAM_INIT (params);
+  memset(&params, 0, sizeof(params));
   params.api_index = CODEC_ELEMENT_INIT;
-  CODEC_WRITE_TO_QEMU (fd, &params, 1);
+  if (write (fd, &params, 1) < 0) {
+    perror ("failed to copy data to qemu");
+  }
 
+#if 0
   do {
     CodecElement *elm = NULL;
 
     elm = g_malloc0 (sizeof(CodecElement));
     if (!elm) {
-      printf ("Failed to allocate memory.\n");
+      CODEC_LOG (ERR, "Failed to allocate memory.\n");
       ret = FALSE;
       break;
     }
 
-    memcpy (&data_length, (uint8_t *)buffer + size, sizeof(data_length));
+//    memcpy (&data_length, (uint8_t *)buffer + size, sizeof(data_length));
+    data_length = *(int*)(((uint8_t *)buffer + size));
+
+    printf("[%s][%d] data_length = %d\n", __func__, __LINE__, data_length);
+
     size += sizeof(data_length);
-    if (!data_length) {
+    if (data_length == 0) {
       break;
     }
     memcpy (elm, (uint8_t *)buffer + size, data_length);
     size += data_length;
-#if 0 
-    printf("codec: %s, longname: %s, decode: %d, media: %d\n",
-      elm->name, elm->longname, elm->codec_type, elm->media_type);
+#if 0
+    printf("[%p] codec: %s, %s, %s %s\n", elm,
+        elm->name, elm->longname,
+        elm->media_type ? "Audio" : "Video",
+        elm->codec_type ? "Encoder" : "Decoder");
 #endif
     element = g_list_append (element, elm);
   } while (1);
+#endif
+
+  CodecElement *elem = NULL;
+  {
+    memcpy(&data_length, (uint8_t *)buffer, sizeof(data_length));
+    size += sizeof(data_length);
+    printf("[%s][%d] data_length = %d\n", __func__, __LINE__, data_length);
+
+    elem = g_malloc0 (data_length);
+    if (!elem) {
+      CODEC_LOG (ERR, "Failed to allocate memory.\n");
+      ret = FALSE;
+      munmap (buffer, 4096);
+      close (fd);
+      return ret;
+    }
 
+    memcpy (elem, (uint8_t *)buffer + size, data_length);
+  }
+
+  {
+    int i;
+    int elem_cnt = data_length / sizeof(CodecElement);
+    for (i = 0; i < elem_cnt; i++) {
+      element = g_list_append (element, &elem[i]);
+    }
+  }
   codec_element = element;
 
   munmap (buffer, 4096);
@@ -136,16 +172,14 @@ plugin_init (GstPlugin *plugin)
     GST_ERROR ("failed to register decoder elements");
     return FALSE;
   }
-#if 0
   if (!gst_emulenc_register (plugin, codec_element)) {
     GST_ERROR ("failed to register encoder elements");
     return FALSE;
   }
-#endif
 
   while ((codec_element = g_list_next (codec_element))) {
     g_list_free (codec_element);
-  } 
+  }
 
   return TRUE;
 }
index 2345206..d02f170 100644 (file)
 #include "gstemulapi2.h"
 #include "gstemuldev.h"
 
-enum {
-  CODEC_USER_FROM = 0,
-  CODEC_USER_TO,
-};
+static GStaticMutex codec_mutex = G_STATIC_MUTEX_INIT; 
+
+void emul_codec_write_to_qemu (int ctx_index, int api_index, CodecDevice *dev)
+{
+  CodecIOParams ioparam;
+
+//  memset(&ioparam, 0, sizeof(ioparam));
+  ioparam.api_index = api_index;
+  ioparam.ctx_index = ctx_index;
+  ioparam.mem_offset = dev->mem_info.offset;
+  ioparam.mem_type = dev->mem_info.type;
+  if (write (dev->fd, &ioparam, 1) < 0) {
+    printf ("[%s:%d] failed to copy data.\n", __func__, __LINE__);
+  }
+}
 
 int
 emul_avcodec_init (CodecContext *ctx, CodecElement *codec, CodecDevice *dev)
 {
   int fd;
   uint8_t *mmapbuf;
-  int size = 0, ret = 0;
+  int ret = 0;
   int usable, copyback;
-  CodecIOParams params;
 
   CODEC_LOG (DEBUG, "enter: %s\n", __func__);
 
@@ -61,98 +71,77 @@ emul_avcodec_init (CodecContext *ctx, CodecElement *codec, CodecDevice *dev)
     return -1;
   }
 
+  ioctl(fd, CODEC_CMD_GET_CONTEXT_INDEX, &ctx->index);
+
   if (dev->mem_info.type == CODEC_FIXED_DEVICE_MEM) {
-    emul_avcodec_init_to (ctx, codec, mmapbuf);    
-  }    else {
-    copyback = CODEC_USER_FROM;
-    ioctl (fd, CODEC_CMD_ADD_TASK_QUEUE, &copyback);
+    emul_avcodec_init_to (ctx, codec, mmapbuf);
+  } else {
+    ret = ioctl (fd, CODEC_CMD_ADD_TASK_QUEUE, &usable);
+    if (ret < 0) {
+      perror("ioctl failure");
+      CODEC_LOG (ERR, "[%d] return value: %d\n", __LINE__, ret);
+    }
 
     while (1) {
-      ioctl (fd, CODEC_CMD_COPY_TO_DEVICE_MEM, &usable);
-      if (usable) {
-        CODEC_LOG (DEBUG, "[init][%d] failure.\n", __LINE__);
-        continue;
-      }
-
-      emul_avcodec_init_to (ctx, codec, mmapbuf);    
-
-#if 0
-      CODEC_LOG (DEBUG, "[init] write data to qemu.\n");
-      size = sizeof(size);
-      memcpy (mmapbuf + size,
-          &codec->media_type, sizeof(codec->media_type));
-      size += sizeof(codec->media_type);
-      memcpy (mmapbuf + size, &codec->codec_type, sizeof(codec->codec_type));
-      size += sizeof(codec->codec_type);
-      memcpy (mmapbuf + size, codec->name, sizeof(codec->name));
-      size += sizeof(codec->name);
-
-      if (codec->media_type == AVMEDIA_TYPE_VIDEO) {
-        memcpy (mmapbuf + size, &ctx->video, sizeof(ctx->video));
-        size += sizeof(ctx->video);
-      } else if (codec->media_type == AVMEDIA_TYPE_AUDIO) {
-        memcpy (mmapbuf + size, &ctx->audio, sizeof(ctx->audio));
-        size += sizeof(ctx->audio);
+      ret = ioctl (fd, CODEC_CMD_COPY_TO_DEVICE_MEM, &usable);
+      if (ret < 0) {
+        perror("ioctl failure");
+        CODEC_LOG (ERR, "[%d] return value: %d\n", __LINE__, ret);
       } else {
-        GST_ERROR ("media type is unknown.\n");
-        ret = -1;
-        break;;
+        if (usable) {
+          CODEC_LOG (DEBUG, "[init] waiting after before.\n");
+          usleep (500);
+          continue;
+        }
+
+        emul_avcodec_init_to (ctx, codec, mmapbuf);
+        break;
       }
-
-      memcpy (mmapbuf + size,
-          &ctx->codecdata_size, sizeof(ctx->codecdata_size));
-      size += sizeof(ctx->codecdata_size);
-      if (ctx->codecdata_size) {
-        memcpy (mmapbuf + size, ctx->codecdata, ctx->codecdata_size);
-        size += ctx->codecdata_size;
-      }
-      size -= sizeof(size);
-      memcpy (mmapbuf, &size, sizeof(size));
-
-      CODEC_LOG (DEBUG, "[init] write data: %d\n", size);
-#endif
-      break;
     }
+  }
+  emul_codec_write_to_qemu (ctx->index, CODEC_INIT, dev);
 
+  if (dev->mem_info.type == CODEC_FIXED_DEVICE_MEM) {
+    int wait = 0;
 #if 0
-    if (ret < 0) {
-      return ret;
+    while (1) {
+      ret = ioctl (fd, CODEC_CMD_WAIT_TASK, &wait);
+      if (ret < 0) {
+        perror("ioctl failure");
+        CODEC_LOG (ERR, "[%d] return value: %d\n", __LINE__, ret);
+      } else {
+        if (wait) {
+          CODEC_LOG (DEBUG, "[init] waiting after write.\n");
+          usleep (500);
+          continue;
+        }
+
+        ret = emul_avcodec_init_from (ctx, codec, mmapbuf);
+        break;
+      }
     }
 #endif
-  }
-
-  CODEC_PARAM_INIT (params);
-  params.api_index = CODEC_INIT;
-  params.mem_offset = dev->mem_info.offset;
-  CODEC_WRITE_TO_QEMU (fd, &params, 1);
 
-  if (dev->mem_info.type == CODEC_FIXED_DEVICE_MEM) {
+#if 1 
+    ioctl (fd, CODEC_CMD_WAIT_TASK, &wait);
     ret = emul_avcodec_init_from (ctx, codec, mmapbuf);
+#endif
   } else {
     while (1) {
-      ioctl (fd, CODEC_CMD_COPY_FROM_DEVICE_MEM, &usable);
-      if (usable) {
-        CODEC_LOG (DEBUG, "[init][%d] failure.\n", __LINE__);
-        continue;
-      }
-
-      ret = emul_avcodec_init_from (ctx, codec, mmapbuf);
-#if 0
-      CODEC_LOG (DEBUG, "[init] read data from qemu.\n");
-      if (codec->media_type == AVMEDIA_TYPE_AUDIO) {
-        memcpy (&ctx->audio.sample_fmt,
-            (uint8_t *)mmapbuf, sizeof(ctx->audio.sample_fmt));
-        size += sizeof(ctx->audio.sample_fmt);
-        CODEC_LOG (DEBUG, "[init] AUDIO sample_fmt: %d\n", ctx->audio.sample_fmt);
+      ret = ioctl (fd, CODEC_CMD_COPY_FROM_DEVICE_MEM, &usable);
+      if (ret < 0) {
+        perror("ioctl failure");
+        CODEC_LOG (ERR, "[%d] return value: %d\n", __LINE__, ret);
+      } else {
+        if (usable) {
+          CODEC_LOG (DEBUG, "[init][%d] waiting after write.\n", __LINE__);
+          usleep (500);
+          continue;
+        }
+
+        ret = emul_avcodec_init_from (ctx, codec, mmapbuf);
+        break;
       }
-      CODEC_LOG (DEBUG, "[init] %s\n", codec->media_type ? "AUDIO" : "VIDEO");
-      memcpy (&ret, (uint8_t *)mmapbuf + size, sizeof(ret));
-      size += sizeof(ret);
-      memcpy (&ctx->index, (uint8_t *)mmapbuf + size, sizeof(ctx->index));
-      ctx->codec = codec;
-      CODEC_LOG (DEBUG, "context index: %d\n", ctx->index);
-#endif
-      break;
     }
     ioctl (fd, CODEC_CMD_REMOVE_TASK_QUEUE, &copyback);
   }
@@ -165,9 +154,7 @@ void
 emul_avcodec_deinit (CodecContext *ctx, CodecDevice *dev)
 {
   int fd;
-  int copyback, usable;
   void *mmapbuf = NULL;
-  CodecIOParams params;
 
   CODEC_LOG (DEBUG, "enter: %s\n", __func__);
 
@@ -183,39 +170,19 @@ emul_avcodec_deinit (CodecContext *ctx, CodecDevice *dev)
     return;
   }
 
-#if 0
-  copyback = CODEC_USER_FROM;
-  ioctl (fd, CODEC_CMD_ADD_TASK_QUEUE, &copyback);
-
-  while (1) {
-    ioctl (fd, CODEC_CMD_COPY_TO_DEVICE_MEM, &usable);
-    if (usable) {
-      CODEC_LOG (DEBUG, "[deinit][%d] failure.\n", __LINE__);
-      continue;
-    }
-  } 
-#endif
-
-  CODEC_PARAM_INIT (params);
-  params.api_index = CODEC_DEINIT;
-  params.ctx_index = ctx->index;
-  params.mem_offset = dev->mem_info.offset;
-  CODEC_WRITE_TO_QEMU (fd, &params, 1);
-
-//  ioctl (fd, CODEC_CMD_REMOVE_TASK_QUEUE, &copyback);
+  emul_codec_write_to_qemu (ctx->index, CODEC_DEINIT, dev);
 
   CODEC_LOG (DEBUG, "leave: %s\n", __func__);
 }
 
 int
-emul_avcodec_decode_video (CodecContext *ctx, uint8_t *in_buf, int in_size,
+emul_avcodec_decode_video (CodecContext *ctx, uint8_t *in_buf, int in_size, gint idx, gint64 in_offset,
     GstBuffer **out_buf, int *got_picture_ptr, CodecDevice *dev)
 {
   int fd;
   uint8_t *mmapbuf = NULL;
-  int len = 0, size = 0;
+  int len = 0;
   int copyback, usable;
-  CodecIOParams params;
 
   CODEC_LOG (DEBUG, "enter: %s\n", __func__);
 
@@ -232,66 +199,56 @@ emul_avcodec_decode_video (CodecContext *ctx, uint8_t *in_buf, int in_size,
   }
 
   if (dev->mem_info.type == CODEC_FIXED_DEVICE_MEM) {
-    emul_avcodec_decode_video_to (in_buf, in_size, mmapbuf);  
+    emul_avcodec_decode_video_to (in_buf, in_size, idx, in_offset, mmapbuf);
   } else {
-    copyback = CODEC_USER_FROM;
-    ioctl (fd, CODEC_CMD_ADD_TASK_QUEUE, &copyback);
+    ioctl (fd, CODEC_CMD_ADD_TASK_QUEUE, NULL);
 
     while (1) {
       ioctl (fd, CODEC_CMD_COPY_TO_DEVICE_MEM, &usable);
       if (usable) {
-        CODEC_LOG (DEBUG, "[decode_video] wait 1.\n");
+        CODEC_LOG (DEBUG, "[decode_video] waiting before write.\n");
+        usleep (500);
         continue;
       }
 
-      emul_avcodec_decode_video_to (in_buf, in_size, mmapbuf);  
-#if 0
-      CODEC_LOG (DEBUG, "[decode_video] write data to qemu\n");
-      size = sizeof(size);
-      memcpy (mmapbuf + size, &in_size, sizeof(in_size));
-      size += sizeof(in_size);
-      if (in_size > 0) {
-        memcpy (mmapbuf + size, in_buf, in_size);
-        size += in_size;
-      }
-
-      size -= sizeof(size);
-      CODEC_LOG (DEBUG, "[decode_video] total: %d, inbuf size: %d\n", size, in_size);
-      memcpy(mmapbuf, &size, sizeof(size));
-#endif
+      emul_avcodec_decode_video_to (in_buf, in_size, idx, in_offset, mmapbuf);
       break;
     }
   }
 
   /* provide raw image for decoding to qemu */
-  CODEC_PARAM_INIT (params);
-  params.api_index = CODEC_DECODE_VIDEO;
-  params.ctx_index = ctx->index;
-  params.mem_offset = dev->mem_info.offset;
-  CODEC_WRITE_TO_QEMU (fd, &params, 1);
+  emul_codec_write_to_qemu (ctx->index, CODEC_DECODE_VIDEO, dev);
 
   if (dev->mem_info.type == CODEC_FIXED_DEVICE_MEM) {
+    int wait = 0;
+//    ioctl (fd, CODEC_CMD_WAIT_TASK, &wait);
+#if 0 
+    while (1) {
+      ioctl (fd, CODEC_CMD_WAIT_TASK, &wait);
+      if (wait) {
+        CODEC_LOG (DEBUG, "[decode_video][%d] waiting after write.\n", __LINE__);
+        usleep (500);
+        continue;
+      }
+
+      len = emul_avcodec_decode_video_from (ctx, got_picture_ptr, mmapbuf);
+      break;
+    }
+#endif
+
+#if 1
+       ioctl (fd, CODEC_CMD_WAIT_TASK, &wait);
     len = emul_avcodec_decode_video_from (ctx, got_picture_ptr, mmapbuf);
+#endif
   } else {
     while (1) {
       ioctl (fd, CODEC_CMD_COPY_FROM_DEVICE_MEM, &usable);
       if (usable) {
-        CODEC_LOG (DEBUG, "[decode_video] wait 2.\n");
+        CODEC_LOG (DEBUG, "[decode_video] waiting after write.\n");
+        usleep (500);
         continue;
       }
-
       len = emul_avcodec_decode_video_from (ctx, got_picture_ptr, mmapbuf);
-#if 0
-      CODEC_LOG (DEBUG, "[decode_video] read data from qemu.\n");
-      memcpy (&len, (uint8_t *)mmapbuf, sizeof(len));
-      size = sizeof(len);
-      memcpy (got_picture_ptr,
-          (uint8_t *)mmapbuf + size, sizeof(*got_picture_ptr));
-      size += sizeof(*got_picture_ptr);
-      memcpy (&ctx->video, (uint8_t *)mmapbuf + size, sizeof(ctx->video));
-
-      CODEC_LOG (DEBUG, "[decode_video] len: %d, have_date: %d\n", len, *got_picture_ptr);
-#endif
       break;
     }
     ioctl (fd, CODEC_CMD_REMOVE_TASK_QUEUE, &copyback);
@@ -302,12 +259,12 @@ emul_avcodec_decode_video (CodecContext *ctx, uint8_t *in_buf, int in_size,
 }
 
 void
-emul_av_picture_copy (CodecContext *ctx, uint8_t *pict, uint32_t pict_size, CodecDevice *dev)
+emul_av_picture_copy (CodecContext *ctx, uint8_t *pict,
+                      uint32_t pict_size, CodecDevice *dev)
 {
   int fd;
   void *mmapbuf = NULL;
   int copyback, usable;
-  CodecIOParams params;
 
   CODEC_LOG (DEBUG, "enter: %s\n", __func__);
 
@@ -323,45 +280,50 @@ emul_av_picture_copy (CodecContext *ctx, uint8_t *pict, uint32_t pict_size, Code
     return;
   }
 
-  if (dev->mem_info.type == CODEC_FIXED_DEVICE_MEM) {
-  } else {
-#if 1 
-    copyback = CODEC_USER_FROM;
-    ioctl (fd, CODEC_CMD_ADD_TASK_QUEUE, &copyback);
+  if (dev->mem_info.type == CODEC_SHARED_DEVICE_MEM) {
+    ioctl (fd, CODEC_CMD_ADD_TASK_QUEUE, NULL);
 
     while (1) {
       ioctl (fd, CODEC_CMD_COPY_TO_DEVICE_MEM, &usable);
       if (usable) {
-        CODEC_LOG (DEBUG, "[decode_video] wait 1.\n");
+        CODEC_LOG (DEBUG, "[copy_frame] waiting before write.\n");
+        usleep (500);
         continue;
       }
       break;
     }
   }
-#endif
-
-//  printf("before av_picture_copy. ctx: %d\n", ctx->index);
-
-  CODEC_PARAM_INIT (params);
-  params.api_index = CODEC_PICTURE_COPY;
-  params.ctx_index = ctx->index;
-  params.mem_offset = dev->mem_info.offset;
-  CODEC_WRITE_TO_QEMU (fd, &params, 1);
 
-  CODEC_LOG (DEBUG, "[copy_frame] after write.\n");
+  emul_codec_write_to_qemu (ctx->index, CODEC_PICTURE_COPY, dev);
 
   if (dev->mem_info.type == CODEC_FIXED_DEVICE_MEM) {
-    CODEC_LOG (DEBUG, "[copy_frame] read data from qemu.\n");
+    int wait = 0;
+//    ioctl (fd, CODEC_CMD_WAIT_TASK, &wait);
+#if 0 
+    while (1) {
+      ioctl (fd, CODEC_CMD_WAIT_TASK, &wait);
+      if (wait) {
+        CODEC_LOG (DEBUG, "[copy_frame] waiting after write.\n");
+        usleep (500);
+        continue;
+      }
+      memcpy (pict, mmapbuf, pict_size);
+      break;
+    }
+#endif
+
+#if 1
+    ioctl (fd, CODEC_CMD_WAIT_TASK, &wait);
     memcpy (pict, mmapbuf, pict_size);
+#endif
   } else {
     while (1) {
       ioctl (fd, CODEC_CMD_COPY_FROM_DEVICE_MEM, &usable);
       if (usable) {
-        CODEC_LOG (DEBUG, "[copy_frame] wait 2.\n");
+        CODEC_LOG (DEBUG, "[copy_frame] waiting after write.\n");
+        usleep (500);
         continue;
       }
-
-      CODEC_LOG (DEBUG, "[copy_frame] read data from qemu.\n");
       memcpy (pict, mmapbuf, pict_size);
       break;
     }
@@ -373,13 +335,13 @@ emul_av_picture_copy (CodecContext *ctx, uint8_t *pict, uint32_t pict_size, Code
 
 int
 emul_avcodec_decode_audio (CodecContext *ctx, int16_t *samples,
-    int *frame_size_ptr, uint8_t *in_buf, int in_size, CodecDevice *dev)
+                          int *frame_size_ptr, uint8_t *in_buf,
+                          int in_size, CodecDevice *dev)
 {
   int fd;
   uint8_t *mmapbuf = NULL;
-  int size = 0, len;
+  int len;
   int copyback, usable;
-  CodecIOParams params;
 
   CODEC_LOG (DEBUG, "enter: %s\n", __func__);
 
@@ -396,68 +358,56 @@ emul_avcodec_decode_audio (CodecContext *ctx, int16_t *samples,
   }
 
   if (dev->mem_info.type == CODEC_FIXED_DEVICE_MEM) {
-    emul_avcodec_decode_audio_to (in_buf, in_size, mmapbuf);    
+    emul_avcodec_decode_audio_to (in_buf, in_size, mmapbuf);
   } else {
-    copyback = CODEC_USER_FROM;
-    ioctl (fd, CODEC_CMD_ADD_TASK_QUEUE, &copyback);
+    ioctl (fd, CODEC_CMD_ADD_TASK_QUEUE, NULL);
 
     while (1) {
       ioctl (fd, CODEC_CMD_COPY_TO_DEVICE_MEM, &usable);
       if (usable) {
-        CODEC_LOG (DEBUG, "[decode_audio][%d] wait 1.\n", __LINE__);
+        CODEC_LOG (DEBUG, "[decode_audio] waiting before write.\n");
+        usleep (500);
         continue;
       }
 
-      emul_avcodec_decode_audio_to (in_buf, in_size, mmapbuf);    
-#if 0
-      size = sizeof(size);
-      memcpy (mmapbuf + size, &in_size, sizeof(in_size));
-      size += sizeof(in_size);
-      if (in_size > 0) {
-        memcpy (mmapbuf + size, in_buf, in_size);
-        size += in_size;
-      }
-
-      size -= sizeof(size);
-      memcpy (mmapbuf, &size, sizeof(size));
-      CODEC_LOG (DEBUG, "[decode_audio] write size: %d, inbuf_size: %d\n", size, in_size);
-#endif
+      emul_avcodec_decode_audio_to (in_buf, in_size, mmapbuf);
       break;
     }
   }
 
-  CODEC_PARAM_INIT (params);
-  params.api_index = CODEC_DECODE_AUDIO;
-  params.ctx_index = ctx->index;
-  params.mem_offset = dev->mem_info.offset;
-  CODEC_WRITE_TO_QEMU (fd, &params, 1);
+  emul_codec_write_to_qemu (ctx->index, CODEC_DECODE_AUDIO, dev);
 
   if (dev->mem_info.type == CODEC_FIXED_DEVICE_MEM) {
-    len = emul_avcodec_decode_audio_from (ctx, frame_size_ptr, samples, mmapbuf);
+    int wait = 0;
+    ioctl (fd, CODEC_CMD_WAIT_TASK, &wait);
+    len =
+                 emul_avcodec_decode_audio_from (ctx, frame_size_ptr, samples, mmapbuf);
+
+#if 0 
+    while (1) {
+      ioctl (fd, CODEC_CMD_WAIT_TASK, &wait);
+      if (wait) {
+        CODEC_LOG (DEBUG, "[decode_audio] waiting after write.\n");
+        usleep (500);
+        continue;
+      }
+
+      len =
+        emul_avcodec_decode_audio_from (ctx, frame_size_ptr, samples, mmapbuf);
+      break;
+    }
+#endif
   } else {
     while (1) {
       ioctl (fd, CODEC_CMD_COPY_FROM_DEVICE_MEM, &usable);
       if (usable) {
-        CODEC_LOG (DEBUG, "[decode_audio][%d] wait 2.\n", __LINE__);
+        CODEC_LOG (DEBUG, "[decode_audio] waiting after write.\n");
+        usleep (500);
         continue;
       }
 
-      len = emul_avcodec_decode_audio_from (ctx, frame_size_ptr, samples, mmapbuf);
-#if 0
-      CODEC_LOG (DEBUG, "[decode_audio] read data\n");
-      memcpy (&ctx->audio.channel_layout,
-          (uint8_t *)mmapbuf, sizeof(ctx->audio.channel_layout));
-      size = sizeof(ctx->audio.channel_layout);
-      memcpy (&len, (uint8_t *)mmapbuf + size, sizeof(len));
-      size += sizeof(len);
-      memcpy (frame_size_ptr, (uint8_t *)mmapbuf + size, sizeof(*frame_size_ptr));
-      size += sizeof(*frame_size_ptr);
-      CODEC_LOG (DEBUG, "[decode_audio] len: %d, channel_layout: %lld\n",
-          len, ctx->audio.channel_layout);
-      if (len > 0) {
-        memcpy (samples, (uint8_t *)mmapbuf + size, FF_MAX_AUDIO_FRAME_SIZE);
-      }
-#endif
+      len =
+        emul_avcodec_decode_audio_from (ctx, frame_size_ptr, samples, mmapbuf);
       break;
     }
     ioctl (fd, CODEC_CMD_REMOVE_TASK_QUEUE, &copyback);
@@ -468,147 +418,153 @@ emul_avcodec_decode_audio (CodecContext *ctx, int16_t *samples,
 }
 
 int
-emul_avcodec_encode_video (CodecContext *ctx, uint8_t*out_buf, int out_size,
-    uint8_t *in_buf, int in_size, CodecDevice *dev)
+emul_avcodec_encode_video (CodecContext *ctx, uint8_t *out_buf,
+                        int out_size, uint8_t *in_buf,
+                        int in_size, int64_t in_timestamp, CodecDevice *dev)
 {
   int fd;
   void *mmapbuf;
-  int len = 0, outbuf_size, size = 0;
+  int len = 0;
   int copyback, usable;
-  CodecIOParams params;
 
   CODEC_LOG (DEBUG, "enter: %s\n", __func__);
 
   fd = dev->fd;
   if (fd < 0) {
     GST_ERROR ("failed to get %s fd.\n", CODEC_DEV);
-    return FALSE;
+    return -1;
   }
 
   mmapbuf = dev->buf;
   if (!mmapbuf) {
     GST_ERROR ("failed to get mmaped memory address.\n");
-    return FALSE;
+    return -1;
   }
 
-  copyback = CODEC_USER_FROM;
-  ioctl (fd, CODEC_CMD_ADD_TASK_QUEUE, &copyback);
+  if (dev->mem_info.type == CODEC_FIXED_DEVICE_MEM) {
+    emul_avcodec_encode_video_to (in_buf, in_size, in_timestamp, mmapbuf);
+  } else {
+    ioctl (fd, CODEC_CMD_ADD_TASK_QUEUE, NULL);
 
-  while (1) {
-    ioctl (fd, CODEC_CMD_COPY_TO_DEVICE_MEM, &usable);
-    if (usable) {
-      CODEC_LOG (DEBUG, "[init][%d] failure.\n", __LINE__);
-//      sleep(1);
-      continue;
-    }
+    while (1) {
+      ioctl (fd, CODEC_CMD_COPY_TO_DEVICE_MEM, &usable);
+      if (usable) {
+        CODEC_LOG (DEBUG, "[encode_video] waiting before write.\n");
+        usleep (500);
+        continue;
+      }
 
-    CODEC_LOG (DEBUG, "[encode_video] write data to qemu\n");
-    memcpy ((uint8_t *)mmapbuf + size, &in_size, sizeof(guint));
-    size += sizeof(guint);
-    memcpy ((uint8_t *)mmapbuf + size, in_buf, in_size);
-    break;
+      emul_avcodec_encode_video_to (in_buf, in_size, in_timestamp, mmapbuf);
+      break;
+    }
   }
 
-  CODEC_PARAM_INIT (params);
-  params.api_index = CODEC_ENCODE_VIDEO;
-  params.ctx_index = ctx->index;
-  params.mem_offset = dev->mem_info.offset;
-  CODEC_WRITE_TO_QEMU (fd, &params, 1);
+  emul_codec_write_to_qemu (ctx->index, CODEC_ENCODE_VIDEO, dev);
 
-  size = 0;
-  while (1) {
-    copyback = CODEC_USER_TO;
-    ioctl (fd, CODEC_CMD_COPY_FROM_DEVICE_MEM, &copyback);
-
-#if 0
-  size = 0;
-  memcpy (&out_size, (uint8_t *)mmapbuf + size, sizeof(uint));
-  size += sizeof(guint);
-
-  ret = gst_pad_alloc_buffer_and_set_caps (emulenc->srcpad,
-      GST_BUFFER_OFFSET_NONE, out_size,
-      GST_PAD_CAPS (emulenc->srcpad), out_buf);
-
-  gst_buffer_set_caps (*out_buf, GST_PAD_CAPS (emulenc->srcpad));
+  if (dev->mem_info.type == CODEC_FIXED_DEVICE_MEM) {
+    int wait = 0;
+    while (1) {
+      ioctl (fd, CODEC_CMD_WAIT_TASK, &wait);
+      if (wait) {
+        CODEC_LOG (DEBUG, "[encode_video] waiting after write.\n");
+        usleep (500);
+        continue;
+      }
 
-  if (GST_BUFFER_DATA(*out_buf)) {
-    memcpy (GST_BUFFER_DATA(*out_buf), (uint8_t *)mmapbuf + size, out_size);
+      len = emul_avcodec_encode_video_from (out_buf, out_size, mmapbuf);
+      break;
+    }
   } else {
-    pritnf ("failed to allocate output buffer\n");
-  }
-#endif
-    break;
+    while (1) {
+      ioctl (fd, CODEC_CMD_COPY_FROM_DEVICE_MEM, &usable);
+      if (usable) {
+        CODEC_LOG (DEBUG, "[encode_video] waiting after write.\n");
+        usleep (500);
+        continue;
+      }
+
+      len = emul_avcodec_encode_video_from (out_buf, out_size, mmapbuf);
+      break;
+    }
+    ioctl (fd, CODEC_CMD_REMOVE_TASK_QUEUE, &copyback);
   }
-  ioctl (fd, CODEC_CMD_REMOVE_TASK_QUEUE, &copyback);
 
   CODEC_LOG (DEBUG, "leave: %s\n", __func__);
-
   return len;
 }
 
 int
-emul_avcodec_encode_audio (CodecContext *ctx, uint8_t *outbuf, int outbuf_size,
-    const short *inbuf, int inbuf_size, CodecDevice *dev)
+emul_avcodec_encode_audio (CodecContext *ctx, uint8_t *out_buf,
+                          int out_size, uint8_t *in_buf,
+                          int in_size, CodecDevice *dev)
 {
   int fd;
   void *mmapbuf;
-  int len = 0, size = 0;
+  int len = 0;
   int copyback, usable;
-  CodecIOParams params;
 
   CODEC_LOG (DEBUG, "enter: %s\n", __func__);
 
   fd = dev->fd;
   if (fd < 0) {
     GST_ERROR ("failed to get %s fd.\n", CODEC_DEV);
-    return FALSE;
+    return -1;
   }
 
   mmapbuf = dev->buf;
   if (!mmapbuf) {
     GST_ERROR ("failed to get mmaped memory address.\n");
-    return FALSE;
+    return -1;
   }
 
-  copyback = CODEC_USER_FROM;
-  ioctl (fd, CODEC_CMD_ADD_TASK_QUEUE, &copyback);
+  if (dev->mem_info.type == CODEC_FIXED_DEVICE_MEM) {
+    emul_avcodec_encode_audio_to (out_size, in_size, in_buf, mmapbuf);
+  } else {
+    ioctl (fd, CODEC_CMD_ADD_TASK_QUEUE, NULL);
 
-  while (1) {
-    ioctl (fd, CODEC_CMD_COPY_TO_DEVICE_MEM, &usable);
-    if (usable) {
-      CODEC_LOG (DEBUG, "[decode_video] wait.\n");
-//      sleep(1);
-      continue;
-    }
+    while (1) {
+      ioctl (fd, CODEC_CMD_COPY_TO_DEVICE_MEM, &usable);
+      if (usable) {
+        CODEC_LOG (DEBUG, "[encode_audio] waiting before write.\n");
+        usleep (500);
+        continue;
+      }
 
-    CODEC_LOG (DEBUG, "[encode_audio] write data to qemu\n");
-    memcpy ((uint8_t *)mmapbuf + size, &inbuf_size, sizeof(inbuf_size));
-    size += sizeof(inbuf_size);
-    memcpy ((uint8_t *)mmapbuf + size, inbuf, inbuf_size);
-    break;
+      emul_avcodec_encode_audio_to (out_size, in_size, in_buf, mmapbuf);
+      break;
+    }
   }
 
-  CODEC_PARAM_INIT (params);
-  params.api_index = CODEC_ENCODE_AUDIO;
-  params.ctx_index = ctx->index;
-  params.mem_offset = dev->mem_info.offset;
-  CODEC_WRITE_TO_QEMU (fd, &params, 1);
-
-  while (1) {
-    ioctl (fd, CODEC_CMD_COPY_FROM_DEVICE_MEM, &usable);
-    if (usable) {
-      CODEC_LOG (DEBUG, "[decode_video] wait. 2\n");
-//      sleep(1);
-      continue;
+  emul_codec_write_to_qemu (ctx->index, CODEC_ENCODE_AUDIO, dev);
+
+  if (dev->mem_info.type == CODEC_FIXED_DEVICE_MEM) {
+    int wait = 0;
+    while (1) {
+      ioctl (fd, CODEC_CMD_WAIT_TASK, &wait);
+      if (wait) {
+        CODEC_LOG (DEBUG, "[encode_audio] waiting after write.\n");
+        usleep (500);
+        continue;
+      }
+      len = emul_avcodec_encode_audio_from (out_buf, out_size, mmapbuf);
+      break;
     }
 
-    CODEC_LOG (DEBUG, "[encode_audio] read data from qemu\n");
-    memcpy (outbuf, (uint8_t *)mmapbuf, outbuf_size);
-    break;
+    len = emul_avcodec_encode_audio_from (out_buf, out_size, mmapbuf);
+  } else {
+    while (1) {
+      ioctl (fd, CODEC_CMD_COPY_FROM_DEVICE_MEM, &usable);
+      if (usable) {
+        CODEC_LOG (DEBUG, "[encode_audio] waiting after write.\n");
+        usleep (500);
+        continue;
+      }
+      len = emul_avcodec_encode_audio_from (out_buf, out_size, mmapbuf);
+      break;
+    }
+    ioctl (fd, CODEC_CMD_REMOVE_TASK_QUEUE, &copyback);
   }
-  ioctl (fd, CODEC_CMD_REMOVE_TASK_QUEUE, NULL);
 
   CODEC_LOG (DEBUG, "leave: %s\n", __func__);
-
   return len;
 }
index a1f2abd..6c841a6 100644 (file)
@@ -38,22 +38,24 @@ int emul_avcodec_init (CodecContext *ctx, CodecElement *codec,
 
 void emul_avcodec_deinit (CodecContext *ctx, CodecDevice *dev);
 
-int emul_avcodec_decode_video (CodecContext *ctx, uint8_t *in_buf,
-  int in_size, GstBuffer **out_buf,
-  int *got_picture_ptr, CodecDevice *dev);
+int emul_avcodec_decode_video (CodecContext *ctx, uint8_t *in_buf, int in_size,
+    gint idx, gint64 in_offset, GstBuffer **out_buf,
+    int *got_picture_ptr, CodecDevice *dev);
+
 
 int emul_avcodec_decode_audio (CodecContext *ctx, int16_t *samples,
   int *frame_size_ptr, uint8_t *in_buf,
   int in_size, CodecDevice *dev);
 
 int emul_avcodec_encode_video (CodecContext *ctx, uint8_t*out_buf, int out_size,
-               uint8_t *in_buf, int in_size, CodecDevice *dev);
+               uint8_t *in_buf, int in_size, int64_t in_timestamp, CodecDevice *dev);
+
+int emul_avcodec_encode_audio (CodecContext *ctx, uint8_t *out_buf,
+                          int out_size, uint8_t *in_buf,
+                          int in_size, CodecDevice *dev);
 
-int emul_avcodec_encode_audio (CodecContext *ctx, uint8_t *outbuf,
-  int outbuf_size, const short *inbuf,
-  int inbuf_size, CodecDevice *dev);
+void emul_av_picture_copy (CodecContext *ctx, uint8_t *pict, uint32_t pict_size, CodecDevice *dev);
 
-void
-emul_av_picture_copy (CodecContext *ctx, uint8_t *pict, uint32_t pict_size, CodecDevice *dev);
+void emul_codec_write_to_qemu (int ctx_index, int api_index, CodecDevice *dev);
 
 #endif /* __GST_EMUL_API_H__ */
index 318b6d6..8bcdf88 100644 (file)
@@ -38,40 +38,44 @@ emul_avcodec_init_to (CodecContext *ctx, CodecElement *codec, uint8_t *device_bu
   CODEC_LOG (DEBUG, "[init] write data to qemu.\n");
   size = sizeof(size);
   codec_size =
-    sizeof(codec->media_type) + sizeof(codec->codec_type) + sizeof(codec->name);
-
-#if 0
-  memcpy (device_buf + size,
-      &codec->media_type, sizeof(codec->media_type));
-  size += sizeof(codec->media_type);
-  memcpy (device_buf + size, &codec->codec_type, sizeof(codec->codec_type));
-  size += sizeof(codec->codec_type);
-  memcpy (device_buf + size, codec->name, sizeof(codec->name));
-  size += sizeof(codec->name);
-#endif
+    sizeof(CodecElement) - sizeof(codec->longname) - sizeof(codec->pix_fmts);
+
   memcpy (device_buf + size, codec, codec_size);
   size += codec_size;
 
   if (codec->media_type == AVMEDIA_TYPE_VIDEO) {
-    memcpy (device_buf + size, &ctx->video, sizeof(ctx->video));
+    CODEC_LOG (DEBUG, "before avcodec_open. pixel format: %d\n", ctx->video.pix_fmt);
+//    memcpy (device_buf + size, &ctx->video, sizeof(ctx->video));
+    *(VideoData *)(device_buf + size) = ctx->video;
     size += sizeof(ctx->video);
   } else if (codec->media_type == AVMEDIA_TYPE_AUDIO) {
-    memcpy (device_buf + size, &ctx->audio, sizeof(ctx->audio));
+//    memcpy (device_buf + size, &ctx->audio, sizeof(ctx->audio));
+    *(AudioData *)(device_buf + size) = ctx->audio;
     size += sizeof(ctx->audio);
   } else {
-    GST_ERROR ("media type is unknown.\n");
+    CODEC_LOG (ERR, "media type is unknown.\n");
     return;
   }
 
-  memcpy (device_buf + size,
-      &ctx->codecdata_size, sizeof(ctx->codecdata_size));
+//  memcpy (device_buf + size,
+//      &ctx->bit_rate, sizeof(ctx->bit_rate));
+  *(int *)(device_buf + size) = ctx->bit_rate;
+  size += sizeof(ctx->bit_rate);
+//  memcpy (device_buf + size,
+//      &ctx->codec_tag, sizeof(ctx->codec_tag));
+  *(int *)(device_buf + size) = ctx->codec_tag;
+  size += sizeof(ctx->codec_tag);
+//  memcpy (device_buf + size,
+//      &ctx->codecdata_size, sizeof(ctx->codecdata_size));
+  *(int *)(device_buf + size) = ctx->codecdata_size;
   size += sizeof(ctx->codecdata_size);
-  if (ctx->codecdata_size) {
+  if (ctx->codecdata_size > 0) {
     memcpy (device_buf + size, ctx->codecdata, ctx->codecdata_size);
     size += ctx->codecdata_size;
   }
   size -= sizeof(size);
-  memcpy (device_buf, &size, sizeof(size));
+//  memcpy (device_buf, &size, sizeof(size));
+  *(int *)device_buf = size;
 
   CODEC_LOG (DEBUG, "[init] write data: %d\n", size);
 }
@@ -82,31 +86,54 @@ emul_avcodec_init_from (CodecContext *ctx, CodecElement *codec, uint8_t *device_
   int ret = 0, size = 0;
 
   CODEC_LOG (DEBUG, "[init] read data from qemu.\n");
-  if (codec->media_type == AVMEDIA_TYPE_AUDIO) {
-    memcpy (&ctx->audio.sample_fmt,
-        (uint8_t *)device_buf, sizeof(ctx->audio.sample_fmt));
-    size += sizeof(ctx->audio.sample_fmt);
-    CODEC_LOG (DEBUG, "[init] AUDIO sample_fmt: %d\n", ctx->audio.sample_fmt);
+//  memcpy (&ret, (uint8_t *)device_buf, sizeof(ret));
+  ret = *(int *)device_buf;
+  size = sizeof(ret);
+
+  if (!ret) {
+    if (codec->media_type == AVMEDIA_TYPE_AUDIO) {
+//      memcpy (&ctx->audio.sample_fmt,
+//          (uint8_t *)device_buf + size, sizeof(ctx->audio.sample_fmt));
+      ctx->audio.sample_fmt = *(int *)(device_buf + size);
+      size += sizeof(ctx->audio.sample_fmt);
+//      memcpy (&ctx->audio.frame_size,
+//          (uint8_t *)device_buf + size, sizeof(ctx->audio.frame_size));
+      ctx->audio.frame_size = *(int *)(device_buf + size);
+      size += sizeof(ctx->audio.frame_size);
+//      memcpy (&ctx->audio.bits_per_smp_fmt,
+//          (uint8_t *)device_buf + size, sizeof(ctx->audio.bits_per_smp_fmt));
+      ctx->audio.bits_per_smp_fmt = *(int *)(device_buf + size);
+      size += sizeof(ctx->audio.bits_per_smp_fmt);
+
+      CODEC_LOG (DEBUG, "[init] sample_fmt %d\n", ctx->audio.sample_fmt);
+    }
+//    memcpy (&ctx->index, (uint8_t *)device_buf + size, sizeof(ctx->index));
+    ctx->codec = codec;
+  } else {
+    CODEC_LOG (ERR, "failed to open codec context\n");
   }
-  CODEC_LOG (DEBUG, "[init] %s\n", codec->media_type ? "AUDIO" : "VIDEO");
-  memcpy (&ret, (uint8_t *)device_buf + size, sizeof(ret));
-  size += sizeof(ret);
-  memcpy (&ctx->index, (uint8_t *)device_buf + size, sizeof(ctx->index));
-  ctx->codec = codec;
+
   CODEC_LOG (DEBUG, "context index: %d\n", ctx->index);
 
   return ret;
 }
 
 void
-emul_avcodec_decode_video_to (uint8_t *in_buf, int in_size, uint8_t *device_buf)
+emul_avcodec_decode_video_to (uint8_t *in_buf, int in_size, int idx, int64_t in_offset, uint8_t *device_buf)
 {
-  int ret = 0, size = 0;
+  int size = 0;
 
   CODEC_LOG (DEBUG, "[decode_video] write data to qemu\n");
   size = sizeof(size);
-  memcpy (device_buf + size, &in_size, sizeof(in_size));
+//  memcpy (device_buf + size, &in_size, sizeof(in_size));
+  *(int *)(device_buf + size) = in_size;
   size += sizeof(in_size);
+//  memcpy (device_buf + size, &idx, sizeof(idx));
+  *(int *)(device_buf + size) = idx;
+  size += sizeof(idx);
+//  memcpy (device_buf + size, &in_offset, sizeof(in_offset));
+  *(int64_t *)(device_buf + size) = in_offset;
+  size += sizeof(in_offset);
   if (in_size > 0) {
     memcpy (device_buf + size, in_buf, in_size);
     size += in_size;
@@ -114,7 +141,8 @@ emul_avcodec_decode_video_to (uint8_t *in_buf, int in_size, uint8_t *device_buf)
 
   size -= sizeof(size);
   CODEC_LOG (DEBUG, "[decode_video] total: %d, inbuf size: %d\n", size, in_size);
-  memcpy(device_buf, &size, sizeof(size));
+//  memcpy(device_buf, &size, sizeof(size));
+  *(int *)device_buf = size;
 }
 
 int
@@ -124,12 +152,14 @@ emul_avcodec_decode_video_from (CodecContext *ctx, int *got_picture_ptr, uint8_t
 
   CODEC_LOG (DEBUG, "[decode_video] read data from qemu.\n");
   memcpy (&len, (uint8_t *)device_buf, sizeof(len));
+//  len = *(int *)device_buf;
   size = sizeof(len);
   memcpy (got_picture_ptr,
       (uint8_t *)device_buf + size, sizeof(*got_picture_ptr));
+//  *got_picture_ptr = *(int *)(device_buf + size);
   size += sizeof(*got_picture_ptr);
   memcpy (&ctx->video, (uint8_t *)device_buf + size, sizeof(ctx->video));
-
+//  ctx->video = *(VideoData *)(device_buf + size);
   CODEC_LOG (DEBUG, "[decode_video] len: %d, have_date: %d\n", len, *got_picture_ptr);
 
   return len;
@@ -141,7 +171,8 @@ emul_avcodec_decode_audio_to (uint8_t *in_buf, int in_size, uint8_t *device_buf)
   int size = 0;
 
   size = sizeof(size);
-  memcpy (device_buf + size, &in_size, sizeof(in_size));
+//  memcpy (device_buf + size, &in_size, sizeof(in_size));
+  *(int *)(device_buf + size) = in_size;
   size += sizeof(in_size);
   if (in_size > 0) {
     memcpy (device_buf + size, in_buf, in_size);
@@ -150,27 +181,111 @@ emul_avcodec_decode_audio_to (uint8_t *in_buf, int in_size, uint8_t *device_buf)
 
   size -= sizeof(size);
   memcpy (device_buf, &size, sizeof(size));
+  *(int *)device_buf = size;
+
   CODEC_LOG (DEBUG, "[decode_audio] write size: %d, inbuf_size: %d\n", size, in_size);
 }
 
 int
-emul_avcodec_decode_audio_from (CodecContext *ctx, int *frame_size_ptr, int16_t *samples, uint8_t *device_buf)
+emul_avcodec_decode_audio_from (CodecContext *ctx, int *frame_size_ptr,
+                                int16_t *samples, uint8_t *device_buf)
 {
   int len = 0, size = 0;
 
   CODEC_LOG (DEBUG, "[decode_audio] read data\n");
   memcpy (&ctx->audio.channel_layout,
-      (uint8_t *)device_buf, sizeof(ctx->audio.channel_layout));
+    (uint8_t *)device_buf, sizeof(ctx->audio.channel_layout));
+//  ctx->audio.channel_layout = *(int64_t *)device_buf;
   size = sizeof(ctx->audio.channel_layout);
   memcpy (&len, (uint8_t *)device_buf + size, sizeof(len));
+//  len = *(int *)(device_buf + size);
   size += sizeof(len);
-  memcpy (frame_size_ptr, (uint8_t *)device_buf + size, sizeof(*frame_size_ptr));
+  memcpy (frame_size_ptr,
+    (uint8_t *)device_buf + size, sizeof(*frame_size_ptr));
+//  frame_size_ptr = *(int *)(device_buf + size);
   size += sizeof(*frame_size_ptr);
-  CODEC_LOG (DEBUG, "[decode_audio] len: %d, channel_layout: %lld\n",
-      len, ctx->audio.channel_layout);
+  CODEC_LOG (DEBUG, "[decode_audio] len: %d, frame_size: %d\n",
+          len, (*frame_size_ptr));
+#if 1 
   if (len > 0) {
-    memcpy (samples, (uint8_t *)device_buf + size, FF_MAX_AUDIO_FRAME_SIZE);
+    memcpy (samples,
+      (uint8_t *)device_buf + size, FF_MAX_AUDIO_FRAME_SIZE);
   }
+#endif
+
+  return len;
+}
+
+void
+emul_avcodec_encode_video_to (uint8_t *in_buf, int in_size,
+                              int64_t in_timestamp, uint8_t *device_buf)
+{
+  int size = 0;
+
+  size = sizeof(size);
+
+  CODEC_LOG (DEBUG, "[encode_video] write data to qemu\n");
+  memcpy ((uint8_t *)device_buf + size, &in_size, sizeof(in_size));
+  size += sizeof(in_size);
+  memcpy ((uint8_t *)device_buf + size, &in_timestamp, sizeof(in_timestamp));
+  size += sizeof(in_timestamp);
+  if (in_size > 0) {
+    memcpy ((uint8_t *)device_buf + size, in_buf, in_size);
+    size += in_size;
+  }
+
+  size -= sizeof(size);
+  memcpy (device_buf, &size, sizeof(size));
+
+  CODEC_LOG (DEBUG, "[encode_video] write data: %d\n", size);
+}
+
+int
+emul_avcodec_encode_video_from (uint8_t *out_buf, int out_size,
+                              uint8_t *device_buf)
+{
+  int len, size;
+
+  CODEC_LOG (DEBUG, "[encode_video] read data\n");
+  memcpy (&len, (uint8_t *)device_buf, sizeof(len));
+  size = sizeof(len);
+  memcpy (out_buf, (uint8_t *)device_buf + size, out_size);
+
+  return len;
+}
+
+void
+emul_avcodec_encode_audio_to (int out_size, int in_size,
+                              uint8_t *in_buf, uint8_t *device_buf)
+{
+  int size = 0;
+
+  size = sizeof(size);
+  CODEC_LOG (DEBUG, "[encode_audio] write data to qemu\n");
+
+  memcpy (device_buf + size, &in_size, sizeof(in_size));
+  size += sizeof(in_size);
+  memcpy (device_buf + size, &out_size, sizeof(out_size));
+  size += sizeof(out_size);
+  if (in_size > 0) {
+    memcpy (device_buf + size, in_buf, in_size);
+    size += in_size;
+  }
+  size -= sizeof(size);
+  memcpy (device_buf, &size, sizeof(size));
+
+  CODEC_LOG (DEBUG, "[encode_audio] write data: %d\n", size);
+}
+
+int
+emul_avcodec_encode_audio_from (uint8_t *out_buf, int out_size, uint8_t *device_buf)
+{
+  int len, size;
+
+  CODEC_LOG (DEBUG, "[encode_audio] read data\n");
+  memcpy (&len, (uint8_t *)device_buf, sizeof(len));
+  size = sizeof(len);
+  memcpy (out_buf, (uint8_t *)device_buf + size, out_size);
 
   return len;
 }
index a8d5c1a..f9cf9fe 100644 (file)
@@ -34,10 +34,24 @@ void emul_avcodec_init_to (CodecContext *ctx, CodecElement *codec, uint8_t *devi
 
 int emul_avcodec_init_from (CodecContext *ctx, CodecElement *codec, uint8_t *device_buf);
 
-void emul_avcodec_decode_video_to (uint8_t *in_buf, int in_size, uint8_t *device_buf);
+void emul_avcodec_decode_video_to (uint8_t *in_buf, int in_size, int idx,
+                                  int64_t in_offset, uint8_t *device_buf);
 
-int emul_avcodec_decode_video_from (CodecContext *ctx, int *got_picture_ptr, uint8_t *device_buf);
+int emul_avcodec_decode_video_from (CodecContext *ctx, int *got_picture_ptr,
+                                  uint8_t *device_buf);
 
-void emul_avcodec_decode_audio_to (uint8_t *in_buf, int in_size, uint8_t *device_buf);
+void emul_avcodec_decode_audio_to (uint8_t *in_buf, int in_size,
+                                  uint8_t *device_buf);
+
+int emul_avcodec_decode_audio_from (CodecContext *ctx, int *frame_size_ptr,
+                                  int16_t *samples, uint8_t *device_buf);
+
+void emul_avcodec_encode_video_to (uint8_t *in_buf, int in_size,
+                                  int64_t in_timestamp, uint8_t *device_buf);
+
+int emul_avcodec_encode_video_from (uint8_t *out_buf, int out_size, uint8_t *device_buf);
+
+void emul_avcodec_encode_audio_to (int out_size, int in_size, uint8_t *in_buf, uint8_t *device_buf);
+
+int emul_avcodec_encode_audio_from (uint8_t *out_buf, int out_size, uint8_t *device_buf);
 
-int emul_avcodec_decode_audio_from (CodecContext *ctx, int *frame_size_ptr, int16_t *samples, uint8_t *device_buf);
index 575c512..a9e59f3 100644 (file)
@@ -39,6 +39,7 @@
 #include <fcntl.h>
 #include <sys/ioctl.h>
 #include <sys/mman.h>
+// #include <semaphore.h>
 #include <glib.h>
 #include <gst/gst.h>
 #include "pixfmt.h"
@@ -51,24 +52,16 @@ G_BEGIN_DECLS
 enum codec_log_level {
   ERR,
   WARN,
-  LOG,
+  INFO,
   DEBUG,
 };
 
 #define CODEC_DEV   "/dev/newcodec"
 #define CODEC_VER   1
 
-#define CODEC_PARAM_INIT(var) \
-  memset (&var, 0x00, sizeof(var))
-
-#define CODEC_WRITE_TO_QEMU(fd, var, size) \
-  if (write (fd, var, size) < 0) { \
-    printf ("[%s:%d] failed to copy data.\n", __func__, __LINE__); \
-  }
-
 #define CODEC_LOG(level, fmt, ...) \
   do { \
-    if (level <= LOG) \
+    if (level <= INFO) \
       printf("[gst-emul][%d] " fmt, __LINE__, ##__VA_ARGS__); \
   } while (0)
 
@@ -78,38 +71,10 @@ enum codec_log_level {
 
 #define GEN_MASK(x) ((1<<(x))-1)
 #define ROUND_UP_X(v, x) (((v) + GEN_MASK(x)) & ~GEN_MASK(x))
-#define ROUND_UP_4(x) ROUND_UP_X(1, 2)
-
-#if 0
-struct _CodecIOHeader {
-  uint32_t ctx_index;
-  uint32_t mem_offset;
-};
-
-struct _CodecData {
-  uint16_t mediatype;
-  uint16_t codectype;
-  gchar name[32];
-  uint32_t extradata_size;
-  uint8_t *extradata;
-};
-
-struct _CodecCtxData {
-  int result;
-
-  struct _CodecData codec;
-
-  union {
-    struct _VideoData video;
-    struct _AudioData audio;
-  } media;
-};
-
-struct _CodecBuffer {
-  uint32_t bufsize;
-  uint8_t *buf;
-};
-#endif
+#define ROUND_UP_2(x) ROUND_UP_X(x, 1)
+#define ROUND_UP_4(x) ROUND_UP_X(x, 2)
+#define ROUND_UP_8(x) ROUND_UP_X(x, 3)
+#define DIV_ROUND_UP_X(v, x) (((v) + GEN_MASK(x)) >> (x))
 
 typedef struct _CodecIOParams {
   int32_t   api_index;
@@ -128,24 +93,19 @@ typedef struct _CodecDevice {
   int       fd;
   uint8_t   *buf;
   uint32_t  buf_size;
+//  sem_t     *sem;
   CodecDevMemInfo mem_info;
 } CodecDevice;
 
 typedef struct _CodecElement {
-  uint16_t  codec_type;
-  uint16_t  media_type;
-  gchar   name[32];
-  gchar   longname[64];
-#if 0
+  int32_t codec_type;
+  int32_t media_type;
+  gchar name[32];
+  gchar longname[64];
   union {
-    struct {
-      int8_t pix_fmts[8];
-    } video;
-    struct {
-      int8_t sample_fmts[8];
-    } audio;
-  } format;
-#endif
+    int32_t pix_fmts[4];
+    int32_t sample_fmts[4];
+  };
 } CodecElement;
 
 typedef struct _VideoData {
@@ -158,8 +118,9 @@ typedef struct _VideoData {
 
 typedef struct _AudioData {
   int channels, sample_rate;
-  int bit_rate, block_align;
-  int depth, sample_fmt;
+  int block_align, depth;
+  int sample_fmt, frame_size;
+  int bits_per_smp_fmt;
   int64_t channel_layout;
 } AudioData;
 
@@ -167,8 +128,10 @@ typedef struct _CodecContext {
   CodecElement *codec;
   int index;
 
-  uint8_t *codecdata;
+  int bit_rate;
+  int codec_tag;       
   int codecdata_size;
+  uint8_t *codecdata;
 
   VideoData video;
   AudioData audio;
@@ -188,11 +151,13 @@ enum CODEC_FUNC_TYPE {
 enum CODEC_IO_CMD {
   CODEC_CMD_GET_DEVICE_MEM_INFO = 0,
   CODEC_CMD_RELEASE_DEVICE_MEM,
-  CODEC_CMD_ADD_TASK_QUEUE,
+  CODEC_CMD_ADD_TASK_QUEUE = 3,
   CODEC_CMD_REMOVE_TASK_QUEUE,
   CODEC_CMD_COPY_FROM_DEVICE_MEM,
   CODEC_CMD_COPY_TO_DEVICE_MEM,
+  CODEC_CMD_WAIT_TASK, 
   CODEC_CMD_GET_VERSION = 20,
+  CODEC_CMD_GET_CONTEXT_INDEX,
 };
 
 enum CODEC_MEDIA_TYPE {
@@ -222,7 +187,6 @@ enum CODEC_MEMORY_TYPE {
   CODEC_SHARED_DEVICE_MEM,
 };
 
-
 /* Define codec types.
  * e.g. FFmpeg, x264, libvpx and etc.
  */
@@ -231,5 +195,4 @@ enum {
 };
 
 G_END_DECLS
-
 #endif
index 59c11eb..4b210e2 100644 (file)
 #include "gstemulapi.h"
 #include "gstemuldev.h"
 
+static GStaticMutex gst_avcodec_mutex = G_STATIC_MUTEX_INIT;
 
 int
 gst_emul_codec_device_open (CodecDevice *dev)
 {
   int fd;
-//  CodecDevMemInfo mem_info;
   void *mmapbuf;
 
-  printf("enter: %s\n", __func__);
+  CODEC_LOG (DEBUG, "enter: %s\n", __func__);
 
   if ((fd = open(CODEC_DEV, O_RDWR)) < 0) {
     perror("Failed to open codec device.");
@@ -57,31 +57,40 @@ gst_emul_codec_device_open (CodecDevice *dev)
   }
 
 //  GST_DEBUG("succeeded to open %s. %d.\n", CODEC_DEV, fd);
-  printf("succeeded to open %s. %d.\n", CODEC_DEV, fd);
-//  memset(&mem_info, 0x00, sizeof(CodecDevMemInfo));
+  CODEC_LOG (INFO, "succeeded to open %s. %d.\n", CODEC_DEV, fd);
   dev->mem_info.index = dev->buf_size;
 
   ioctl(fd, CODEC_CMD_GET_DEVICE_MEM_INFO, &dev->mem_info);
+#if 1 
+  dev->mem_info.type = CODEC_SHARED_DEVICE_MEM;
+  dev->mem_info.offset = 0;
+#endif
+
+  CODEC_LOG (INFO, "memory type: %s\n",
+  !dev->mem_info.type ? "FIXED" : "SHARED");
 
-#if 1
-  printf("mem type: %d, index: %d, offset: %d\n",
+#if 0
+  CODEC_LOG("mem type: %d, index: %d, offset: %d\n",
     dev->mem_info.type, dev->mem_info.index, dev->mem_info.offset);
 #endif
+  CODEC_LOG (DEBUG, "before mmap. buf_size: %d\n", dev->buf_size);
 
   mmapbuf = mmap (NULL, dev->buf_size, PROT_READ | PROT_WRITE,
                   MAP_SHARED, fd, dev->mem_info.offset);
-  if (!mmapbuf) {
+  if (mmapbuf == (void *)-1) {
     perror("Failed to map device memory of codec.");
     close(fd);
     return -1;
   }
 
 //  GST_DEBUG("succeeded to map device memory.\n");
-  printf("succeeded to map device memory: %p.\n", mmapbuf);
+  CODEC_LOG (INFO, "succeeded to map device memory: %p.\n", mmapbuf);
   dev->fd = fd;
   dev->buf = mmapbuf;
+//  dev->sem = &codec_sem;
+//  CODEC_LOG (INFO, "sema: %p\n", dev->sem);
 
-  printf("leave: %s\n", __func__);
+  CODEC_LOG (DEBUG, "leave: %s\n", __func__);
 
   return 0;
 }
@@ -92,7 +101,7 @@ gst_emul_codec_device_close (CodecDevice *dev)
   int fd = 0;
   void *mmapbuf = NULL;
 
-  printf("enter: %s\n", __func__);
+  CODEC_LOG (DEBUG, "enter: %s\n", __func__);
 
   fd = dev->fd;
   if (fd < 0) {
@@ -107,29 +116,27 @@ gst_emul_codec_device_close (CodecDevice *dev)
   }
 
 //  GST_DEBUG("Release memory region of %s.\n", CODEC_DEV);
-  CODEC_LOG(LOG, "Release memory region of %s.\n", CODEC_DEV);
+  CODEC_LOG (INFO, "Release memory region of %p.\n", mmapbuf);
 
   if (munmap(mmapbuf, dev->buf_size) != 0) {
     GST_ERROR("Failed to release memory region of %s.\n", CODEC_DEV);
   }
-  dev->buf = NULL; 
+  dev->buf = NULL;
 
   ioctl(fd, CODEC_CMD_RELEASE_DEVICE_MEM, &dev->mem_info);
 
 //  GST_DEBUG("close %s.\n", CODEC_DEV);
-  CODEC_LOG(LOG, "close %s.\n", CODEC_DEV);
+  CODEC_LOG (INFO, "close %s.\n", CODEC_DEV);
 
   if (close(fd) != 0) {
     GST_ERROR("Failed to close %s. fd: %d\n", CODEC_DEV, fd);
   }
 
-  printf("leave: %s\n", __func__);
+  CODEC_LOG (DEBUG, "leave: %s\n", __func__);
 
   return 0;
 }
 
-static GStaticMutex gst_avcodec_mutex = G_STATIC_MUTEX_INIT;
-
 int
 gst_emul_avcodec_open (CodecContext *ctx, CodecElement *codec, CodecDevice *dev)
 {
@@ -154,7 +161,7 @@ gst_emul_avcodec_close (CodecContext *ctx, CodecDevice *dev)
 
   g_static_mutex_lock (&gst_avcodec_mutex);
 
-  printf ("gst_emul_avcodec_close\n");
+  CODEC_LOG (DEBUG, "gst_emul_avcodec_close\n");
   emul_avcodec_deinit (ctx, dev);
 
   ret = gst_emul_codec_device_close (dev);
index c3dd1ac..eec783f 100644 (file)
@@ -34,7 +34,6 @@
 int gst_emul_codec_device_open (CodecDevice *dev);
 int gst_emul_codec_device_close (CodecDevice *dev);
 
-int gst_emul_avcodec_open (CodecContext *ctx,
-               CodecElement *codec, CodecDevice *dev);
+int gst_emul_avcodec_open (CodecContext *ctx, CodecElement *codec, CodecDevice *dev);
 int gst_emul_avcodec_close (CodecContext *ctx, CodecDevice *dev);
 #endif
index 31f0767..02d651c 100644 (file)
@@ -31,6 +31,7 @@
 #include "gstemulcommon.h"
 #include "gstemulutils.h"
 #include "gstemulapi.h"
+#include "gstemuldev.h"
 
 #define GST_EMULDEC_PARAMS_QDATA g_quark_from_static_string("emuldec-params")
 
@@ -76,6 +77,7 @@ typedef struct _GstEmulDec
     } audio;
   } format;
 
+  gboolean opened;
   gboolean discont;
   gboolean clear_ts;
 
@@ -135,11 +137,10 @@ static gboolean gst_emuldec_negotiate (GstEmulDec *dec, gboolean force);
 
 static gint gst_emuldec_frame (GstEmulDec *emuldec, guint8 *data,
                               guint size, gint *got_data,
-                              const GstTSInfo *dec_info, GstFlowReturn *ret);
+                              const GstTSInfo *dec_info, gint64 in_offset, GstFlowReturn *ret);
 
 static gboolean gst_emuldec_open (GstEmulDec *emuldec);
-static gboolean gst_emuldec_close (GstEmulDec *emuldec);
-
+static int gst_emuldec_close (GstEmulDec *emuldec);
 
 
 static const GstTSInfo *
@@ -269,7 +270,7 @@ flush_queued (GstEmulDec *emuldec)
 {
   GstFlowReturn res = GST_FLOW_OK;
 
-  printf("flush queued\n");
+  CODEC_LOG (DEBUG, "flush queued\n");
 
   while (emuldec->queued) {
     GstBuffer *buf = GST_BUFFER_CAST (emuldec->queued->data);
@@ -306,7 +307,7 @@ gst_emuldec_drain (GstEmulDec *emuldec)
       GstFlowReturn ret;
 
       len =
-        gst_emuldec_frame (emuldec, NULL, 0, &have_data, &ts_info_none, &ret);
+        gst_emuldec_frame (emuldec, NULL, 0, &have_data, &ts_info_none, 0, &ret);
 
       if (len < 0 || have_data == 0) {
         break;
@@ -316,7 +317,7 @@ gst_emuldec_drain (GstEmulDec *emuldec)
 #endif
 
   if (emuldec->segment.rate < 0.0) {
-    printf ("reverse playback\n");
+    CODEC_LOG (DEBUG, "reverse playback\n");
     flush_queued (emuldec);
   }
 }
@@ -428,16 +429,17 @@ gst_emuldec_init (GstEmulDec *emuldec)
   // init
   emuldec->context = g_malloc0 (sizeof(CodecContext));
   if (!emuldec->context) {
-    printf("failed to allocate memory.\n");
+    CODEC_LOG (ERR, "failed to allocate memory.\n");
   }
-  // set default bit_rate
-  emuldec->context->audio.bit_rate = 64000;
 
+  emuldec->context->video.pix_fmt = PIX_FMT_NONE; 
+  emuldec->context->audio.sample_fmt = SAMPLE_FMT_NONE; 
   emuldec->dev = g_malloc0 (sizeof(CodecDevice));
   if (!emuldec->dev) {
-    printf("failed to allocate memory.\n");
+    CODEC_LOG (ERR, "failed to allocate memory.\n");
   }
 
+  emuldec->opened = FALSE;
   emuldec->format.video.par_n = -1;
   emuldec->format.video.fps_n = -1;
   emuldec->format.video.old_fps_n = -1;
@@ -449,10 +451,8 @@ gst_emuldec_init (GstEmulDec *emuldec)
 static void
 gst_emuldec_finalize (GObject *object)
 {
-  // Deinit Decoder
   GstEmulDec *emuldec = (GstEmulDec *) object;
 
-  printf ("gst_emuldec_finalize\n");
   if (emuldec->context) {
     g_free (emuldec->context);
     emuldec->context = NULL;
@@ -509,16 +509,15 @@ gst_emuldec_sink_event (GstPad *pad, GstEvent *event)
 
   switch (GST_EVENT_TYPE (event)) {
   case GST_EVENT_EOS:
-    printf("GST_EVENT_EOS\n");
     gst_emuldec_drain (emuldec);
     break;
   case GST_EVENT_FLUSH_STOP:
   {
-    printf("GST_EVENT_FLUSH_STOP\n");
 #if 0
-  if (emuldec->opened) {
-    emul_avcodec_flush_buffers (emuldec->context, emuldec->dev);
-  }
+    if (emuldec->opened) {
+        // TODO: what does avcodec_flush_buffers do?
+        emul_avcodec_flush_buffers (emuldec->context, emuldec->dev);
+    }
 #endif
     gst_emuldec_reset_ts (emuldec);
     gst_emuldec_reset_qos (emuldec);
@@ -537,20 +536,17 @@ gst_emuldec_sink_event (GstPad *pad, GstEvent *event)
     gint64 start, stop, time;
     gdouble rate, arate;
 
-    printf ("GST_EVENT_NEWSEGMENT\n");
     gst_event_parse_new_segment_full (event, &update, &rate, &arate, &format,
         &start, &stop, &time);
 
     switch (format) {
     case GST_FORMAT_TIME:
-      printf ("GST_FORMAT_TIME\n");
       break;
     case GST_FORMAT_BYTES:
     {
       gint bit_rate;
-      bit_rate = emuldec->context->audio.bit_rate;
+      bit_rate = emuldec->context->bit_rate;
 
-      printf ("GST_FORMAT_BYTES\n");
       if (!bit_rate) {
         GST_WARNING_OBJECT (emuldec, "no bitrate to convert BYTES to TIME");
         gst_event_unref (event);
@@ -587,7 +583,6 @@ gst_emuldec_sink_event (GstPad *pad, GstEvent *event)
     }
 
     if (emuldec->context->codec) {
-      printf("before drain, NEWSEGMENT event\n"); 
       gst_emuldec_drain (emuldec);
     }
 
@@ -629,14 +624,12 @@ gst_emuldec_setcaps (GstPad *pad, GstCaps *caps)
 
   GST_OBJECT_LOCK (emuldec);
 
-#if 0
   if (emuldec->opened) {
     GST_OBJECT_UNLOCK (emuldec);
     gst_emuldec_drain (emuldec);
     GST_OBJECT_LOCK (emuldec);
     gst_emuldec_close (emuldec);
   }
-#endif
 
   GST_LOG_OBJECT (emuldec, "size %dx%d", emuldec->context->video.width,
       emuldec->context->video.height);
@@ -660,6 +653,7 @@ gst_emuldec_setcaps (GstPad *pad, GstCaps *caps)
     GST_DEBUG_OBJECT (emuldec, "sink caps have pixel-aspect-ratio of %d:%d",
         gst_value_get_fraction_numerator (par),
         gst_value_get_fraction_denominator (par));
+
 #if 0 // TODO
     if (emuldec->par) {
       g_free(emuldec->par);
@@ -755,10 +749,7 @@ gst_emuldec_open (GstEmulDec *emuldec)
         oclass->codec->name);
   }
 
-#if 0
   emuldec->opened = TRUE;
-#endif
-
   GST_LOG_OBJECT (emuldec, "Opened codec %s", oclass->codec->name);
 
   switch (oclass->codec->media_type) {
@@ -787,26 +778,24 @@ gst_emuldec_open (GstEmulDec *emuldec)
   return TRUE;
 }
 
-static gboolean
+static int
 gst_emuldec_close (GstEmulDec *emuldec)
 {
   int ret;
 
-  printf ("gst_emuldec_close\n");
-
   if (emuldec->context->codecdata) {
     g_free(emuldec->context->codecdata);
     emuldec->context->codecdata = NULL;
-  } 
+  }
 
-  gst_emul_avcodec_close (emuldec->context, emuldec->dev);
+  ret = gst_emul_avcodec_close (emuldec->context, emuldec->dev);
 
   if (emuldec->dev) {
     g_free(emuldec->dev);
     emuldec->dev = NULL;
   }
 
-  return TRUE;
+  return ret;
 }
 
 
@@ -964,7 +953,7 @@ get_output_buffer (GstEmulDec *emuldec, GstBuffer **outbuf)
     GST_DEBUG_OBJECT (emuldec,
       "Downstream can't allocate aligned buffers.");
     gst_buffer_unref (*outbuf);
-    *outbuf = new_aligned_buffer (pict_size, GST_PAD_CAPS (emuldec->srcpad)); 
+    *outbuf = new_aligned_buffer (pict_size, GST_PAD_CAPS (emuldec->srcpad));
   }
 
   gst_buffer_set_caps (*outbuf, GST_PAD_CAPS (emuldec->srcpad));
@@ -972,6 +961,10 @@ get_output_buffer (GstEmulDec *emuldec, GstBuffer **outbuf)
   emul_av_picture_copy (emuldec->context, GST_BUFFER_DATA (*outbuf),
     GST_BUFFER_SIZE (*outbuf), emuldec->dev);
 
+#if 0 
+  GST_BUFFER_DATA (*outbuf) = emuldec->dev->buf;
+#endif
+
   return ret;
 }
 
@@ -1047,7 +1040,7 @@ clip_audio_buffer (GstEmulDec *dec, GstBuffer *buf,
 
 static gint
 gst_emuldec_video_frame (GstEmulDec *emuldec, guint8 *data, guint size,
-    const GstTSInfo *dec_info, GstBuffer **outbuf,
+    const GstTSInfo *dec_info, gint64 in_offset, GstBuffer **outbuf,
     GstFlowReturn *ret)
 {
   gint len = -1, have_data;
@@ -1055,14 +1048,15 @@ gst_emuldec_video_frame (GstEmulDec *emuldec, guint8 *data, guint size,
   gboolean decode;
   GstClockTime out_timestamp, out_duration, out_pts;
   gint64 out_offset;
-  GstTSInfo *out_info;
+  const GstTSInfo *out_info;
 
   decode = gst_emuldec_do_qos (emuldec, dec_info->timestamp, &mode_switch);
 
-//  printf("decode video: input buffer size: %d\n", size);
+  CODEC_LOG (DEBUG, "decode video: input buffer size: %d\n", size);
   len =
     emul_avcodec_decode_video (emuldec->context, data, size,
-         outbuf, &have_data, emuldec->dev);
+                          dec_info->idx, in_offset, outbuf,
+                          &have_data, emuldec->dev);
 
   if (!decode) {
     // skip_frame
@@ -1088,13 +1082,10 @@ gst_emuldec_video_frame (GstEmulDec *emuldec, guint8 *data, guint size,
     return len;
   }
 
-#if 1 
-//  out_info = gst_ts_info_get (emuldec, emuldec->picture->reordered_opaque);
-  out_info = gst_ts_info_get (emuldec, dec_info->idx);  
+  out_info = gst_ts_info_get (emuldec, dec_info->idx);
   out_pts = out_info->timestamp;
   out_duration = out_info->duration;
   out_offset = out_info->offset;
-#endif
 
   *ret = get_output_buffer (emuldec, outbuf);
   if (G_UNLIKELY (*ret != GST_FLOW_OK)) {
@@ -1220,12 +1211,19 @@ gst_emuldec_audio_frame (GstEmulDec *emuldec, CodecElement *codec,
       new_aligned_buffer (FF_MAX_AUDIO_FRAME_SIZE,
           GST_PAD_CAPS (emuldec->srcpad));
 
-//  printf("decode audio[%p] input buffer size: %d\n", emuldec, size);
+  CODEC_LOG (DEBUG, "decode audio, input buffer size: %d\n", size);
 
   len = emul_avcodec_decode_audio (emuldec->context,
       (int16_t *) GST_BUFFER_DATA (*outbuf), &have_data,
       data, size, emuldec->dev);
 
+#if 0 
+  GST_BUFFER_DATA (*outbuf) =
+    (uint8_t *)emuldec->dev->buf +
+    sizeof(emuldec->context->audio.channel_layout) +
+    sizeof(len) + sizeof(have_data);
+#endif
+
   GST_DEBUG_OBJECT (emuldec,
     "Decode audio: len=%d, have_data=%d", len, have_data);
 
@@ -1295,7 +1293,7 @@ gst_emuldec_audio_frame (GstEmulDec *emuldec, CodecElement *codec,
 
 static gint
 gst_emuldec_frame (GstEmulDec *emuldec, guint8 *data, guint size,
-    gint *got_data, const GstTSInfo *dec_info, GstFlowReturn *ret)
+    gint *got_data, const GstTSInfo *dec_info, gint64 in_offset, GstFlowReturn *ret)
 {
   GstEmulDecClass *oclass;
   GstBuffer *outbuf = NULL;
@@ -1312,7 +1310,7 @@ gst_emuldec_frame (GstEmulDec *emuldec, guint8 *data, guint size,
   switch (oclass->codec->media_type) {
   case AVMEDIA_TYPE_VIDEO:
     len = gst_emuldec_video_frame (emuldec, data, size,
-        dec_info, &outbuf, ret);
+        dec_info, in_offset, &outbuf, ret);
     break;
   case AVMEDIA_TYPE_AUDIO:
     len = gst_emuldec_audio_frame (emuldec, oclass->codec, data, size,
@@ -1367,8 +1365,7 @@ gst_emuldec_frame (GstEmulDec *emuldec, guint8 *data, guint size,
       *ret = gst_pad_push (emuldec->srcpad, outbuf);
     } else {
       // push reverse
-      printf("push reverse.\n");
-      GST_DEBUG_OBJECT (emuldec, "queued frame"); 
+      GST_DEBUG_OBJECT (emuldec, "queued frame");
       emuldec->queued = g_list_prepend (emuldec->queued, outbuf);
       *ret = GST_FLOW_OK;
     }
@@ -1396,7 +1393,6 @@ gst_emuldec_chain (GstPad *pad, GstBuffer *buffer)
 
   emuldec = (GstEmulDec *) (GST_PAD_PARENT (pad));
 
-#if 0
   if (G_UNLIKELY (!emuldec->opened)) {
     // not_negotiated
     oclass = (GstEmulDecClass *) (G_OBJECT_GET_CLASS (emuldec));
@@ -1406,7 +1402,6 @@ gst_emuldec_chain (GstPad *pad, GstBuffer *buffer)
     gst_buffer_unref (buffer);
     return GST_FLOW_NOT_NEGOTIATED;
   }
-#endif
 
   discont = GST_BUFFER_IS_DISCONT (buffer);
 
@@ -1481,7 +1476,7 @@ gst_emuldec_chain (GstPad *pad, GstBuffer *buffer)
   dec_info = in_info;
 
   len =
-    gst_emuldec_frame (emuldec, in_buf, in_size, &have_data, dec_info, &ret);
+    gst_emuldec_frame (emuldec, in_buf, in_size, &have_data, dec_info, in_offset, &ret);
 
 #if 0
   if (emuldec->clear_ts) {
@@ -1517,7 +1512,6 @@ gst_emuldec_change_state (GstElement *element, GstStateChange transition)
     clear_queued (emuldec);
     break;
   default:
-    printf("tzdec: %p, state change: %d\n", emuldec, transition);
     break;
   }
 
@@ -1547,7 +1541,8 @@ gst_emuldec_register (GstPlugin *plugin, GList *element)
   CodecElement *codec = NULL;
 
   /* register element */
-  while ((elem = g_list_next (elem))) {
+//  while ((elem = g_list_next (elem))) {
+  do {
     codec = (CodecElement *)elem->data;
     if (!codec) {
       ret = FALSE;
@@ -1570,7 +1565,7 @@ gst_emuldec_register (GstPlugin *plugin, GList *element)
       return FALSE;
     }
     g_free (type_name);
-  }
+  } while ((elem = g_list_next (elem)));
 
   return ret;
 }
index fac06b7..61c1529 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * GStreamer codec plugin for Tizen Emulator. 
+ * GStreamer codec plugin for Tizen Emulator.
  *
  * Copyright (C) 2013 Samsung Electronics Co., Ltd. All rights reserved.
  *
- * Contact: 
+ * Contact:
  * KiTae Kim <kt920.kim@samsung.com>
  * SeokYeon Hwang <syeon.hwang@samsung.com>
  * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
@@ -30,6 +30,7 @@
 
 #include "gstemulutils.h"
 #include "gstemulapi.h"
+#include "gstemuldev.h"
 #include <gst/base/gstadapter.h>
 
 #define GST_EMULENC_PARAMS_QDATA g_quark_from_static_string("emulenc-params")
@@ -43,36 +44,22 @@ typedef struct _GstEmulEnc
 
   CodecContext *context;
   CodecDevice *dev;
-
-  union {
-    struct {
-      gint width, height;
-      gint clip_width, clip_height;
-      gint par_n, par_d;
-      gint fps_n, fps_d;
-      gint old_fps_n, old_fps_d;
-      gboolean interlaced;
-
-      enum PixelFormat pix_fmt;
-    } video;
-    struct {
-      gint channels;
-      gint samplerate;
-      gint depth;
-    } audio;
-  } format;
+  gboolean opened;
+  GstClockTime adapter_ts;
+  guint64 adapter_consumed;
+  GstAdapter *adapter;
+  gboolean discont;
 
   // cache
+  gulong bitrate;
+  gint gop_size;
   gulong buffer_size;
 
-  gboolean discont;
-
-  GstClockTime adapter_ts;
-  GstAdapter *adapter;
-
   guint8 *working_buf;
   gulong working_buf_size;
 
+  GQueue *delay;
+
 } GstEmulEnc;
 
 typedef struct _GstEmulEncClass
@@ -106,6 +93,13 @@ static gboolean gst_emulenc_event_src (GstPad *pad, GstEvent *event);
 
 GstStateChangeReturn gst_emulenc_change_state (GstElement *element, GstStateChange transition);
 
+#define DEFAULT_VIDEO_BITRATE   300000
+#define DEFAULT_VIDEO_GOP_SIZE  15
+#define DEFAULT_AUDIO_BITRATE   128000
+
+#define DEFAULT_WIDTH 352
+#define DEFAULT_HEIGHT 288
+
 /*
  * Implementation
  */
@@ -146,7 +140,7 @@ gst_emulenc_base_init (GstEmulEncClass *klass)
     sinkcaps = gst_caps_from_string ("video/x-raw-rgb; video/x-raw-yuv; video/x-raw-gray");
     break;
   case AVMEDIA_TYPE_AUDIO:
-    srccaps = gst_emul_codectype_to_audio_caps (NULL, codec->name, TRUE, codec);
+    sinkcaps = gst_emul_codectype_to_audio_caps (NULL, codec->name, TRUE, codec);
     break;
   default:
     GST_LOG("unknown media type.\n");
@@ -185,14 +179,11 @@ gst_emulenc_class_init (GstEmulEncClass *klass)
   gobject_class->get_property = gst_emulenc_get_property
 #endif
 
+  gstelement_class->change_state = gst_emulenc_change_state;
+
   gobject_class->finalize = gst_emulenc_finalize;
-  gstelement_class->change_state = gst_emulenc_change_state; 
 }
 
-
-#define DEFAULT_VIDEO_BITRATE 300000
-#define DEFAULT_AUDIO_BITRATE 128000
-
 static void
 gst_emulenc_init (GstEmulEnc *emulenc)
 {
@@ -208,19 +199,21 @@ gst_emulenc_init (GstEmulEnc *emulenc)
   emulenc->srcpad = gst_pad_new_from_template (oclass->srctempl, "src");
   gst_pad_use_fixed_caps (emulenc->srcpad);
 
-  switch (oclass->codec->media_type) {
-  case AVMEDIA_TYPE_VIDEO:
+  if (oclass->codec->media_type == AVMEDIA_TYPE_VIDEO) {
     gst_pad_set_chain_function (emulenc->sinkpad, gst_emulenc_chain_video);
     gst_pad_set_event_function (emulenc->sinkpad, gst_emulenc_event_video);
     gst_pad_set_event_function (emulenc->srcpad, gst_emulenc_event_src);
-//    emulenc->bitrate = DEFAULT_VIDEO_BITRATE;
-    break;
-  case AVMEDIA_TYPE_AUDIO:
+
+    emulenc->bitrate = DEFAULT_VIDEO_BITRATE;
+    emulenc->buffer_size = 512 * 1024;
+    emulenc->gop_size = DEFAULT_VIDEO_GOP_SIZE;
+#if 0
+    emulenc->lmin = 2;
+    emulenc->lmax = 31;
+#endif
+  } else if (oclass->codec->media_type == AVMEDIA_TYPE_AUDIO){
     gst_pad_set_chain_function (emulenc->sinkpad, gst_emulenc_chain_audio);
-//    emulenc->bitrate = DEFAULT_AUDIO_BITRATE;
-    break;
-  default:
-    break;
+    emulenc->bitrate = DEFAULT_AUDIO_BITRATE;
   }
 
   gst_element_add_pad (GST_ELEMENT (emulenc), emulenc->sinkpad);
@@ -231,6 +224,15 @@ gst_emulenc_init (GstEmulEnc *emulenc)
   if (!emulenc->context) {
     printf("failed to allocate memory.\n");
   }
+  emulenc->context->video.pix_fmt = PIX_FMT_NONE;
+  emulenc->context->audio.sample_fmt = SAMPLE_FMT_NONE;
+
+  emulenc->opened = FALSE;
+
+#if 0
+  emulenc->file = NULL;
+#endif
+  emulenc->delay = g_queue_new ();
 
   emulenc->dev = g_malloc0 (sizeof(CodecDevice));
   if (!emulenc->dev) {
@@ -241,21 +243,30 @@ gst_emulenc_init (GstEmulEnc *emulenc)
   emulenc->adapter = gst_adapter_new ();
 }
 
-    static void
+static void
 gst_emulenc_finalize (GObject *object)
 {
-    // Deinit Decoder
-    GstEmulEnc *emulenc = (GstEmulEnc *) object;
+  // Deinit Decoder
+  GstEmulEnc *emulenc = (GstEmulEnc *) object;
 
-    if (emulenc->context) {
-      g_free (emulenc->context);
-      emulenc->context = NULL;
-    }
-    g_object_unref (emulenc->adapter);
+  if (emulenc->opened) {
+    gst_emul_avcodec_close (emulenc->context, emulenc->dev);
+    emulenc->opened = FALSE;
+  }
+
+  if (emulenc->context) {
+    g_free (emulenc->context);
+    emulenc->context = NULL;
+  }
 
-    G_OBJECT_CLASS (parent_class)->finalize (object);
+  g_queue_free (emulenc->delay);
+#if 0
+  g_free (emulenc->filename);
+#endif
 
+  g_object_unref (emulenc->adapter);
 
+  G_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
 static GstCaps *
@@ -340,7 +351,7 @@ gst_emulenc_getcaps (GstPad *pad)
 
   if (oclass->codec->media_type == AVMEDIA_TYPE_AUDIO) {
     caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
-  
+
     GST_DEBUG_OBJECT (emulenc, "audio caps, return template %" GST_PTR_FORMAT,
       caps);
     return caps;
@@ -356,8 +367,8 @@ gst_emulenc_getcaps (GstPad *pad)
   GST_DEBUG_OBJECT (emulenc, "probing caps");
   i = pixfmt = 0;
 
-#if 0
-  for (pixfmt = 0; ; pixfmt++) {
+#if 1
+  for (pixfmt = 0;; pixfmt++) {
     GstCaps *tmpcaps;
 
     if (oclass->codec->pix_fmts) {
@@ -368,7 +379,7 @@ gst_emulenc_getcaps (GstPad *pad)
       }
       GST_DEBUG_OBJECT (emulenc,
         "Got an official pixfmt [%d], attempting to get caps", pixfmt);
-      tmpcaps = get_emul_pixfmt_to_caps (pixfmt, NULL, oclass->codec->name);
+      tmpcaps = gst_emul_pixfmt_to_caps (pixfmt, NULL, oclass->codec->name);
       if (tmpcaps) {
         GST_DEBUG_OBJECT (emulenc, "Got caps, breaking out");
         if (!caps) {
@@ -383,7 +394,7 @@ gst_emulenc_getcaps (GstPad *pad)
 
     GST_DEBUG_OBJECT (emulenc, "pixfmt: %d", pixfmt);
     if (pixfmt >= PIX_FMT_NB) {
-      GST_WARING ("Invalid pixfmt, breaking out");
+      GST_WARNING ("Invalid pixfmt, breaking out");
       break;
     }
 
@@ -410,10 +421,10 @@ gst_emulenc_getcaps (GstPad *pad)
       if (!caps) {
         caps = gst_caps_new_empty ();
       }
-      tmpcasp = gst_emul_codectype_to_caps (oclass->codec->media_type, ctx,
+      tmpcaps = gst_emul_codectype_to_caps (oclass->codec->media_type, ctx,
         oclass->codec->name, TRUE);
       if (tmpcaps) {
-        gst_caps_append (caps, tmpcaps)
+        gst_caps_append (caps, tmpcaps);
       } else {
         GST_LOG_OBJECT (emulenc,
           "Couldn't get caps for codec: %s", oclass->codec->name);
@@ -423,6 +434,7 @@ gst_emulenc_getcaps (GstPad *pad)
       GST_DEBUG_OBJECT (emulenc, "Opening codec failed with pixfmt: %d", pixfmt);
     }
 
+    gst_emul_avcodec_close (ctx, emulenc->dev);
 #if 0
     if (ctx->priv_data) {
       gst_emul_avcodec_close (ctx, emulenc->dev);
@@ -458,20 +470,46 @@ gst_emulenc_setcaps (GstPad *pad, GstCaps *caps)
   GstCaps *allowed_caps;
   GstCaps *icaps;
   enum PixelFormat pix_fmt;
+  int32_t buf_size;
 
   emulenc = (GstEmulEnc *) (gst_pad_get_parent (pad));
   oclass = (GstEmulEncClass *) (G_OBJECT_GET_CLASS (emulenc));
 
-#if 0
-  if (emulenc->opend) {
+  if (emulenc->opened) {
     gst_emul_avcodec_close (emulenc->context, emulenc->dev);
     emulenc->opened = FALSE;
 
     gst_pad_set_caps (emulenc->srcpad, NULL);
   }
+
+  emulenc->context->bit_rate = emulenc->bitrate;
+  GST_DEBUG_OBJECT (emulenc, "Setting context to bitrate %lu, gop_size %d",
+      emulenc->bitrate, emulenc->gop_size);
+
+#if 0
+
+  // user defined properties
+  emulenc->context->gop_size = emulenc->gop_size;
+  emulenc->context->lmin = (emulenc->lmin * FF_QP2LAMBDA + 0.5);
+  emulenc->context->lmax = (emulenc->lmax * FF_QP2LAMBDA + 0.5);
+
+  // some other defaults
+  emulenc->context->b_frame_strategy = 0;
+  emulenc->context->coder_type = 0;
+  emulenc->context->context_model = 0;
+  emulenc->context->scenechange_threshold = 0;
+  emulenc->context->inter_threshold = 0;
+
+  if (emulenc->interlaced) {
+    emulenc->context->flags |=
+      CODEC_FLAG_INTERLACED_DCT | CODEC_FLAG_INTERLACED_ME;
+    emulenc->picture->interlaced_frame = TRUE;
+
+    emulenc->picture->top_field_first = TRUE;
+  }
 #endif
 
-  gst_emul_caps_with_codectype (oclass->codec->media_type, caps);
+  gst_emul_caps_with_codectype (oclass->codec->media_type, caps, emulenc->context);
 
   if (!emulenc->context->video.fps_d) {
     emulenc->context->video.fps_d = 25;
@@ -488,11 +526,33 @@ gst_emulenc_setcaps (GstPad *pad, GstCaps *caps)
 
   pix_fmt = emulenc->context->video.pix_fmt;
 
+  {
+    switch (oclass->codec->media_type) {
+    case AVMEDIA_TYPE_VIDEO:
+    {
+      int width, height;
+
+      width = emulenc->context->video.width;
+      height = emulenc->context->video.height;
+      buf_size = width * height * 6 + FF_MIN_BUFFER_SIZE + 100;
+      break;
+    }
+    case AVMEDIA_TYPE_AUDIO:
+        buf_size = FF_MAX_AUDIO_FRAME_SIZE + 100;
+        break;
+    default:
+        buf_size = -1;
+        break;
+    }
+  }
+
+  emulenc->dev->buf_size = gst_emul_align_size(buf_size);
+
   // open codec
   if (gst_emul_avcodec_open (emulenc->context,
-                 oclass->codec, emulenc->dev) < 0) {
+      oclass->codec, emulenc->dev) < 0) {
     GST_DEBUG_OBJECT (emulenc, "tzenc_%s: Failed to open codec",
-               oclass->codec->name);
+        oclass->codec->name);
     return FALSE;
   }
 
@@ -523,9 +583,10 @@ gst_emulenc_setcaps (GstPad *pad, GstCaps *caps)
   gst_emul_caps_with_codecname (oclass->codec->name,
     oclass->codec->media_type, allowed_caps, emulenc->context);
 
-  other_caps = gst_emul_codecname_to_caps (oclass->codec->name,
-      emulenc->context, TRUE);
+  other_caps =
+  gst_emul_codecname_to_caps (oclass->codec->name, emulenc->context, TRUE);
   if (!other_caps) {
+  GST_DEBUG("Unsupported codec - no caps found");
     gst_emul_avcodec_close (emulenc->context, emulenc->dev);
     return FALSE;
   }
@@ -540,7 +601,7 @@ gst_emulenc_setcaps (GstPad *pad, GstCaps *caps)
 
   if (gst_caps_get_size (icaps) > 1) {
     GstCaps *newcaps;
-  
+
     newcaps =
       gst_caps_new_full (gst_structure_copy (gst_caps_get_structure (icaps,
               0)), NULL);
@@ -555,7 +616,7 @@ gst_emulenc_setcaps (GstPad *pad, GstCaps *caps)
   }
   gst_object_unref (emulenc);
 
-  // emulenc->opened = TRUE;
+  emulenc->opened = TRUE;
 
   return TRUE;
 }
@@ -575,8 +636,7 @@ gst_emulenc_setup_working_buf (GstEmulEnc *emulenc)
     emulenc->working_buf_size = wanted_size;
     emulenc->working_buf = g_malloc0 (emulenc->working_buf_size);
   }
-// TODO
-//  emulenc->buffer_size = wanted_size;
+  emulenc->buffer_size = wanted_size;
 }
 
 GstFlowReturn
@@ -606,14 +666,19 @@ gst_emulenc_chain_video (GstPad *pad, GstBuffer *buffer)
   g_return_val_if_fail (frame_size == GST_BUFFER_SIZE (buffer),
       GST_FLOW_ERROR);
 
+#if 0
+  pts = gst_emul_time_gst_to_ff (GST_BUFFER_TIMESTAMP (buffer) /
+    emulenc->context.video.ticks_per_frame,
+    emulenc->context.video.fps_n, emulen->context.video.fps_d);
+#endif
+
   gst_emulenc_setup_working_buf (emulenc);
 
-#if 0
   ret_size =
-      emul_avcodec_encode_video (emulenc->context, emulenc->working_buf,
-      emulenc->working_buf_size, emulenc->picture,
-      GST_BUFFER_DATA (buffer), GST_BUFFER_SIZE (buffer), emulenc->dev);
-#endif
+    emul_avcodec_encode_video (emulenc->context, emulenc->working_buf,
+                emulenc->working_buf_size, GST_BUFFER_DATA (buffer),
+                GST_BUFFER_SIZE (buffer), GST_BUFFER_TIMESTAMP (buffer),
+                emulenc->dev);
 
   if (ret_size < 0) {
     GstEmulEncClass *oclass =
@@ -624,7 +689,6 @@ gst_emulenc_chain_video (GstPad *pad, GstBuffer *buffer)
     return GST_FLOW_OK;
   }
 
-#if 0
   g_queue_push_tail (emulenc->delay, buffer);
   if (ret_size) {
     buffer = g_queue_pop_head (emulenc->delay);
@@ -641,12 +705,11 @@ gst_emulenc_chain_video (GstPad *pad, GstBuffer *buffer)
     }
   }
 #endif
-#endif
 
   outbuf = gst_buffer_new_and_alloc (ret_size);
-  memcpy (GST_BUFFER_DATA(outbuf), emulenc->working_buf, ret_size);
+  memcpy (GST_BUFFER_DATA (outbuf), emulenc->working_buf, ret_size);
   GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buffer);
-  GST_BUFFER_DURATION (outbuf) = GST_BUFFER_DURATION (outbuf);
+  GST_BUFFER_DURATION (outbuf) = GST_BUFFER_DURATION (buffer);
 #if 0
   if (emulenc->context->coded_frame) {
     if (!emulenc->context->coded_frame->key_frame) {
@@ -682,9 +745,8 @@ gst_emulenc_encode_audio (GstEmulEnc *emulenc, guint8 *audio_in,
   guint8 *audio_out;
   gint res;
   GstFlowReturn ret;
-  int size = 0;
 
-  outbuf = gst_buffer_new_alloc (max_size + FF_MIN_BUFFER_SIZE);
+  outbuf = gst_buffer_new_and_alloc (max_size + FF_MIN_BUFFER_SIZE);
   audio_out = GST_BUFFER_DATA (outbuf);
 
   GST_LOG_OBJECT (emulenc, "encoding buffer of max size %d", max_size);
@@ -693,7 +755,7 @@ gst_emulenc_encode_audio (GstEmulEnc *emulenc, guint8 *audio_in,
   }
 
   res = emul_avcodec_encode_audio (emulenc->context, audio_out, max_size,
-      (short *) audio_in, in_size, emulenc->dev);
+                                  audio_in, in_size, emulenc->dev);
 
   if (res < 0) {
     GST_ERROR_OBJECT (emulenc, "Failed to encode buffer: %d", res);
@@ -710,8 +772,8 @@ gst_emulenc_encode_audio (GstEmulEnc *emulenc, guint8 *audio_in,
   }
   gst_buffer_set_caps (outbuf, GST_PAD_CAPS (emulenc->srcpad));
 
-  GST_LOG_OBJECT (emulenc, "pushing size %d, timestamp %", GST_TIME_FORMAT,
-      res, GST_TIME_ARGS (timestamp));
+  GST_LOG_OBJECT (emulenc, "pushing size %d, timestamp %",
+      GST_TIME_FORMAT, res, GST_TIME_ARGS (timestamp));
 
   ret = gst_pad_push (emulenc->srcpad, outbuf);
 
@@ -727,9 +789,9 @@ gst_emulenc_chain_audio (GstPad *pad, GstBuffer *buffer)
   guint in_size, frame_size;
   gint osize;
   GstFlowReturn ret;
-  gint out_size;
+  gint out_size = 0;
   gboolean discont;
-  gint8 *in_data;
+  guint8 *in_data;
   CodecContext *ctx;
 
   emulenc = (GstEmulEnc *) (GST_OBJECT_PARENT (pad));
@@ -746,10 +808,8 @@ gst_emulenc_chain_audio (GstPad *pad, GstBuffer *buffer)
     "Received time %" GST_TIME_FORMAT ", duration %" GST_TIME_FORMAT
     ", size %d", GST_TIME_ARGS (timestamp), GST_TIME_ARGS (duration), in_size);
 
-#if 0
-
-  frame_size = ctx->frame_size;
-  osize = av_get_bits_per_sample_format (ctx->audio.sample_fmt) / 8;
+  frame_size = ctx->audio.frame_size;
+  osize = ctx->audio.bits_per_smp_fmt;
 
   if (frame_size > 1) {
     guint avail, frame_bytes;
@@ -782,20 +842,21 @@ gst_emulenc_chain_audio (GstPad *pad, GstBuffer *buffer)
       if (GST_CLOCK_TIME_IS_VALID (upstream_time)) {
         GstClockTimeDiff diff;
 
-        upsteam +=
+        upstream_time +=
           gst_util_uint64_scale (bytes, GST_SECOND,
             ctx->audio.sample_rate * osize * ctx->audio.channels);
         diff = upstream_time - timestamp;
-        if (diff >GST_SECOND / 10 || diff < -GST_SECOND / 10) {
+
+        if (diff > GST_SECOND / 10 || diff < -GST_SECOND / 10) {
           GST_DEBUG_OBJECT (emulenc, "adapter timestamp drifting, "
             "taking upstream timestamp %" GST_TIME_FORMAT,
             GST_TIME_ARGS (upstream_time));
           timestamp = upstream_time;
 
           emulenc->adapter_consumed = bytes / (osize * ctx->audio.channels);
-          emulenc->adapter_ts = upstream_time -
-            gst_util_uint64_scale (emulenc->adapter_consumed, GST_SECOND,
-                ctx->audio.sample_rate);
+          emulenc->adapter_ts =
+            upstream_time - gst_util_uint64_scale (emulenc->adapter_consumed,
+                GST_SECOND, ctx->audio.sample_rate);
           emulenc->discont = TRUE;
         }
       }
@@ -839,6 +900,7 @@ gst_emulenc_chain_audio (GstPad *pad, GstBuffer *buffer)
     }
     GST_LOG_OBJECT (emulenc, "%u bytes left in the adapter", avail);
   } else {
+#if 0
     int coded_bps = av_get_bits_per_sample (oclass->codec->name);
 
     GST_LOG_OBJECT (emulenc, "coded bps %d, osize %d", coded_bps, osize);
@@ -847,7 +909,7 @@ gst_emulenc_chain_audio (GstPad *pad, GstBuffer *buffer)
     if (coded_bps) {
       out_size = (out_size * coded_bps) / 8;
     }
-
+#endif
     in_data = (guint8 *) GST_BUFFER_DATA (buffer);
     ret = gst_emulenc_encode_audio (emulenc, in_data, in_size, out_size,
       timestamp, duration, discont);
@@ -857,7 +919,6 @@ gst_emulenc_chain_audio (GstPad *pad, GstBuffer *buffer)
         gst_flow_get_name (ret));
     }
   }
-#endif
 
   return GST_FLOW_OK;
 }
@@ -870,13 +931,15 @@ gst_emulenc_flush_buffers (GstEmulEnc *emulenc, gboolean send)
 
   GST_DEBUG_OBJECT (emulenc, "flushing buffers with sending %d", send);
 
-#if 0
-  if (!emulenc->opend) {
+
+  if (!emulenc->opened) {
     while (!g_queue_is_empty (emulenc->delay)) {
       gst_buffer_unref (g_queue_pop_head (emulenc->delay));
     }
   }
 
+#if 0
+
   while (!g_queue_is_empty (emulenc->delay)) {
     emulenc_setup_working_buf (emulenc);
 
@@ -941,11 +1004,12 @@ gst_emulenc_event_video (GstPad *pad, GstEvent *event)
   {
     const GstStructure *s;
     s = gst_event_get_structure (event);
-#if 0
+
     if (gst_structure_has_name (s, "GstForceKeyUnit")) {
+#if 0
       emulenc->picture->pict_type = FF_I_TYPE;
-    }
 #endif
+    }
   }
     break;
   default:
@@ -966,15 +1030,16 @@ gst_emulenc_event_src (GstPad *pad, GstEvent *event)
   {
     const GstStructure *s;
     s = gst_event_get_structure (event);
-#if 0
+
     if (gst_structure_has_name (s, "GstForceKeyUnit")) {
+#if 0
       GST_OBJECT_LOCK (emulenc);
       emulenc->force_keyframe = TRUE;
       GST_OBJECT_UNLOCK (emulenc);
+#endif
       forward = FALSE;
       gst_event_unref (event);
     }
-#endif
   }
     break;
   default:
@@ -1004,12 +1069,10 @@ gst_emulenc_change_state (GstElement *element, GstStateChange transition)
   switch (transition) {
   case GST_STATE_CHANGE_PAUSED_TO_READY:
     gst_emulenc_flush_buffers (emulenc, FALSE);
-#if 0
     if (emulenc->opened) {
       gst_emul_avcodec_close (emulenc->context, emulenc->dev);
       emulenc->opened = FALSE;
     }
-#endif
     gst_adapter_clear (emulenc->adapter);
 
 #if 0
@@ -1050,11 +1113,12 @@ gst_emulenc_register (GstPlugin *plugin, GList *element)
   gchar *type_name;
   gint rank = GST_RANK_PRIMARY;
   gboolean ret = TRUE;
-  GList *elem = NULL;
+  GList *elem = element;
   CodecElement *codec = NULL;
 
   /* register element */
-  while ((elem = g_list_next (elem))) {
+//  while ((elem = g_list_next (elem))) {
+  do {
     codec = (CodecElement *)elem->data;
     if (!codec) {
       ret = FALSE;
@@ -1077,7 +1141,7 @@ gst_emulenc_register (GstPlugin *plugin, GList *element)
       return FALSE;
     }
     g_free (type_name);
-  }
+  } while ((elem = g_list_next (elem)));
 
   return ret;
 }
index af17ecd..050f2e6 100644 (file)
@@ -108,7 +108,7 @@ gst_ff_channel_layout_to_gst (guint64 channel_layout, guint channels)
 
   if (nchannels != channels) {
     GST_ERROR ("Number of channels is different (%u != %u)", channels,
-               nchannels);
+        nchannels);
     return NULL;
   }
 
@@ -207,17 +207,16 @@ gst_emul_codectype_to_audio_caps (CodecContext *ctx, const char *name,
 #endif
 
   if (ctx) {
-    // FIXME
     caps = gst_emul_smpfmt_to_caps (ctx->audio.sample_fmt, ctx, name);
-#if 0
-  } else if (codec && codec->audio.sample_fmts){
+#if 1
+  } else if (codec && codec->sample_fmts[0] != -1){
     GstCaps *temp;
     int i;
 
     caps = gst_caps_new_empty ();
-    for (i = 0; codec->audio.sample_fmts[i] != -1; i++) {
+    for (i = 0; codec->sample_fmts[i] != -1; i++) {
       temp =
-          gst_emul_smpfmt_to_caps (codec->audio.sample_fmts[i], ctx, name);
+          gst_emul_smpfmt_to_caps (codec->sample_fmts[i], ctx, name);
       if (temp != NULL) {
         gst_caps_append (caps, temp);
       }
@@ -283,7 +282,7 @@ gst_emul_caps_to_pixfmt (const GstCaps *caps, CodecContext *ctx, gboolean raw)
   if (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps)) {
     ctx->video.fps_d = gst_value_get_fraction_numerator (fps);
     ctx->video.fps_n = gst_value_get_fraction_denominator (fps);
-       ctx->video.ticks_per_frame = 1;
+  ctx->video.ticks_per_frame = 1;
 
     GST_DEBUG ("setting framerate %d/%d = %lf",
         ctx->video.fps_d, ctx->video.fps_n,
@@ -327,6 +326,7 @@ gst_emul_caps_to_pixfmt (const GstCaps *caps, CodecContext *ctx, gboolean raw)
         break;
       }
     }
+//    printf ("get pixel format: %d, fourcc: %d\n", ctx->video.pix_fmt, fourcc);
   } else if (strcmp (gst_structure_get_name (str), "video/x-raw-rgb") == 0) {
     gint bpp = 0, rmask = 0, endianness = 0;
 
@@ -397,15 +397,17 @@ gst_emul_caps_to_smpfmt (const GstCaps *caps, CodecContext *ctx, gboolean raw)
   gst_structure_get_int (str, "channels", &ctx->audio.channels);
   gst_structure_get_int (str, "rate", &ctx->audio.sample_rate);
   gst_structure_get_int (str, "block_align", &ctx->audio.block_align);
-  gst_structure_get_int (str, "bitrate", &ctx->audio.bit_rate);
+//  gst_structure_get_int (str, "bitrate", &ctx->audio.bit_rate);
+  gst_structure_get_int (str, "bitrate", &ctx->bit_rate);
 
   if (!raw) {
     return;
   }
 
-#if 0
+  name = gst_structure_get_name (str);
+
   if (!strcmp (name, "audio/x-raw-float")) {
-    if (gst_structure_get_int (str, "width, &width") &&
+    if (gst_structure_get_int (str, "width", &width) &&
       gst_structure_get_int (str, "endianness", &endianness)) {
       if (endianness == G_BYTE_ORDER) {
         if (width == 32) {
@@ -416,20 +418,19 @@ gst_emul_caps_to_smpfmt (const GstCaps *caps, CodecContext *ctx, gboolean raw)
       }
     }
   } else {
-    if (str_structure_get_int (str, "width", &width) &&
-      str_structure_get_int (str, "depth", &depth) &&
-      str_structure_get_int (str, "signed", &signedness) &&
-      str_structure_get_int (str, "endianness", &endianness)) {
+    if (gst_structure_get_int (str, "width", &width) &&
+      gst_structure_get_int (str, "depth", &depth) &&
+      gst_structure_get_boolean (str, "signed", &signedness) &&
+      gst_structure_get_int (str, "endianness", &endianness)) {
       if ((endianness == G_BYTE_ORDER) && (signedness == TRUE)) {
-        if (width == 16) && (depth == 16)) {
+        if ((width == 16) && (depth == 16)) {
           ctx->audio.sample_fmt = SAMPLE_FMT_S16;
         } else if ((width == 32) && (depth == 32)) {
-          ctx->audio.sample_fmt = SMPLE_FMT_S32;
+          ctx->audio.sample_fmt = SAMPLE_FMT_S32;
         }
       }
     }
   }
-#endif
 }
 
 void
@@ -447,13 +448,13 @@ gst_emul_caps_with_codecname (const char *name, int media_type,
   structure = gst_caps_get_structure (caps, 0);
 
   if ((value = gst_structure_get_value (structure, "codec_data"))) {
-  guint size;
-  guint8 *data;
+    guint size;
+    guint8 *data;
 
     buf = GST_BUFFER_CAST (gst_value_get_mini_object (value));
     size = GST_BUFFER_SIZE (buf);
     data = GST_BUFFER_DATA (buf);
-    printf("extradata: %p, size: %d\n", data, size);
+    GST_DEBUG ("extradata: %p, size: %d\n", data, size);
 
     if (ctx->codecdata) {
       g_free (ctx->codecdata);
@@ -464,7 +465,7 @@ gst_emul_caps_with_codecname (const char *name, int media_type,
     memcpy (ctx->codecdata, data, size);
     ctx->codecdata_size = size;
 
-    if ((strcmp(name, "vc1") == 0) && size > 0 && data[0] == 0) {
+    if ((strcmp (name, "vc1") == 0) && size > 0 && data[0] == 0) {
       ctx->codecdata[0] = (guint8) size;
     }
   } else if (ctx->codecdata == NULL) {
@@ -476,7 +477,6 @@ gst_emul_caps_with_codecname (const char *name, int media_type,
   if ((strcmp (name, "mpeg4") == 0)) {
     const gchar *mime = gst_structure_get_name (structure);
 
-#if 0
     if (!strcmp (mime, "video/x-divx")) {
       ctx->codec_tag = GST_MAKE_FOURCC ('D', 'I', 'V', 'X');
     } else if (!strcmp (mime, "video/x-xvid")) {
@@ -486,30 +486,29 @@ gst_emul_caps_with_codecname (const char *name, int media_type,
     } else if (!strcmp (mime, "video/mpeg")) {
       ctx->codec_tag = GST_MAKE_FOURCC ('m', 'p', '4', 'v');
     }
-#endif
+#if 0
   } else if (strcmp (name, "h263p") == 0) {
     gboolean val;
 
-#if 0
     if (!gst_structure_get_boolean (structure, "annex-f", &val) || val) {
       ctx->flags |= CODEC_FLAG_4MV;
     } else {
       ctx->flags &= ~CODEC_FLAG_4MV;
     }
     if ((!gst_structure_get_boolean (structure, "annex-i", &val) || val) &&
-      (!gst_structure_get_boolean (structure, "annex-t", &val) || val) {
+      (!gst_structure_get_boolean (structure, "annex-t", &val) || val)) {
       ctx->flags |= CODEC_FLAG_AC_PRED;
     } else {
       ctx->flags &= ~CODEC_FLAG_AC_PRED;
     }
-    if ((!gst_structure_get_boolean (structure, "annex-j", &val) || val) {
+    if ((!gst_structure_get_boolean (structure, "annex-j", &val) || val)) {
       ctx->flags |= CODEC_FLAG_LOOP_FILTER;
     } else {
       ctx->flags &= ~CODEC_FLAG_LOOP_FILTER;
     }
 #endif
   } else {
-  // TODO
+    // TODO
   }
 
   if (!gst_caps_is_fixed (caps)) {
@@ -530,6 +529,25 @@ gst_emul_caps_with_codecname (const char *name, int media_type,
 
 }
 
+void
+gst_emul_caps_with_codectype (int media_type, const GstCaps *caps, CodecContext *ctx)
+{
+  if (ctx == NULL) {
+    return;
+  }
+
+  switch (media_type) {
+  case AVMEDIA_TYPE_VIDEO:
+    gst_emul_caps_to_pixfmt (caps, ctx, TRUE);
+    break;
+  case AVMEDIA_TYPE_AUDIO:
+    gst_emul_caps_to_smpfmt (caps, ctx, TRUE);
+    break;
+  default:
+    break;
+  }
+}
+
 GstCaps *
 gst_emul_video_caps_new (CodecContext *ctx, const char *name,
         const char *mimetype, const char *fieldname, ...)
@@ -563,7 +581,7 @@ gst_emul_video_caps_new (CodecContext *ctx, const char *name,
     gst_caps_set_simple (caps,
       "framerate", GST_TYPE_FRACTION, num, denom, NULL);
   } else {
-    if (g_str_has_prefix(name, "h263")) {
+  if (strcmp (name, "h263") == 0) {
       /* 128x96, 176x144, 352x288, 704x576, and 1408x1152. slightly reordered
        * because we want automatic negotiation to go as close to 320x240 as
        * possible. */
@@ -625,7 +643,7 @@ gst_emul_audio_caps_new (CodecContext *ctx, const char *name,
         CH_LAYOUT_5POINT1, 0, CH_LAYOUT_7POINT1
       };
 
-      if (strcmp(name, "ac3") == 0) {
+      if (strcmp (name, "ac3") == 0) {
         if (ctx->audio.channels > 0 &&
           ctx->audio.channels < G_N_ELEMENTS (default_channel_set)) {
           channel_layout = default_channel_set[ctx->audio.channels - 1];
@@ -649,7 +667,7 @@ gst_emul_audio_caps_new (CodecContext *ctx, const char *name,
     const gint *rates = NULL;
     gint n_rates = 0;
 
-    if (strcmp(name, "aac") == 0) {
+    if (strcmp (name, "aac") == 0) {
       maxchannels = 6;
     } else if (g_str_has_prefix(name, "ac3")) {
       const static gint l_rates[] = { 48000, 44100, 32000 };
@@ -881,11 +899,11 @@ gst_emul_codecname_to_caps (const char *name, CodecContext *ctx, gboolean encode
 
   GST_LOG ("codec: %s, context: %p, encode: %d", name, ctx, encode);
 
-  if (strcmp(name, "mpegvideo") == 0) {
+  if (strcmp (name, "mpegvideo") == 0) {
     caps = gst_emul_video_caps_new (ctx, name, "video/mpeg",
                 "mpegversion", G_TYPE_INT, 1,
                 "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
-  } else if (strcmp(name, "h263") == 0) {
+  } else if (strcmp (name, "h263") == 0) {
     if (encode) {
       caps = gst_emul_video_caps_new (ctx, name, "video/x-h263",
                   "variant", G_TYPE_STRING, "itu", NULL);
@@ -894,7 +912,7 @@ gst_emul_codecname_to_caps (const char *name, CodecContext *ctx, gboolean encode
                   "variant", G_TYPE_STRING, "itu",
                   "h263version", G_TYPE_STRING, "h263", NULL);
     }
-  } else if (strcmp(name, "h263p") == 0) {
+  } else if (strcmp (name, "h263p") == 0) {
     caps = gst_emul_video_caps_new (ctx, name, "video/x-h263",
               "variant", G_TYPE_STRING, "itu",
               "h263version", G_TYPE_STRING, "h263p", NULL);
@@ -908,9 +926,21 @@ gst_emul_codecname_to_caps (const char *name, CodecContext *ctx, gboolean encode
         NULL);
     }
 #endif
-  } else if (strcmp(name, "mpeg4") == 0) {
+  } else if (strcmp (name, "mpeg4") == 0) {
     if (encode && ctx != NULL) {
       // TODO
+    switch (ctx->codec_tag) {
+    case GST_MAKE_FOURCC ('D', 'I', 'V', 'X'):
+      caps = gst_emul_video_caps_new (ctx, name, "video/x-divx",
+        "divxversion", G_TYPE_INT, 5, NULL);
+      break;
+    case GST_MAKE_FOURCC ('m', 'p', '4', 'v'):
+    default:
+      caps = gst_emul_video_caps_new (ctx, name, "video/mpeg",
+        "systemstream", G_TYPE_BOOLEAN, FALSE,
+        "mpegversion", G_TYPE_INT, 4, NULL);
+      break;
+    }
     } else {
       caps = gst_emul_video_caps_new (ctx, name, "video/mpeg",
             "mpegversion", G_TYPE_INT, 4,
@@ -928,15 +958,15 @@ gst_emul_codecname_to_caps (const char *name, CodecContext *ctx, gboolean encode
             "video/x-3ivx", NULL));
       }
     }
-  } else if (strcmp(name, "h264") == 0) {
+  } else if (strcmp (name, "h264") == 0) {
       caps = gst_emul_video_caps_new (ctx, name, "video/x-h264", NULL);
   } else if (g_str_has_prefix(name, "msmpeg4")) {
     // msmpeg4v1,m msmpeg4v2, msmpeg4
     gint version;
 
-    if (strcmp(name, "msmpeg4v1") == 0) {
+    if (strcmp (name, "msmpeg4v1") == 0) {
       version = 41;
-    } else if (strcmp(name, "msmpeg4v2") == 0) {
+    } else if (strcmp (name, "msmpeg4v2") == 0) {
       version = 42;
     } else {
       version = 43;
@@ -944,24 +974,24 @@ gst_emul_codecname_to_caps (const char *name, CodecContext *ctx, gboolean encode
 
     caps = gst_emul_video_caps_new (ctx, name, "video/x-msmpeg",
           "msmpegversion", G_TYPE_INT, version, NULL);
-    if (!encode && !strcmp(name, "msmpeg4")) {
+    if (!encode && !strcmp (name, "msmpeg4")) {
        gst_caps_append (caps, gst_emul_video_caps_new (ctx, name,
             "video/x-divx", "divxversion", G_TYPE_INT, 3, NULL));
     }
-  } else if (strcmp(name, "wmv3") == 0) {
+  } else if (strcmp (name, "wmv3") == 0) {
     caps = gst_emul_video_caps_new (ctx, name, "video/x-wmv",
                 "wmvversion", G_TYPE_INT, 3, NULL);
-  } else if (strcmp(name, "vc1") == 0) {
+  } else if (strcmp (name, "vc1") == 0) {
     caps = gst_emul_video_caps_new (ctx, name, "video/x-wmv",
                 "wmvversion", G_TYPE_INT, 3, "format", GST_TYPE_FOURCC,
                 GST_MAKE_FOURCC ('W', 'V', 'C', '1'),  NULL);
 #if 0
-  } else if (strcmp(name, "vp3") == 0) {
+  } else if (strcmp (name, "vp3") == 0) {
     mime_type = g_strdup ("video/x-vp3");
-  } else if (strcmp(name, "vp8") == 0) {
+  } else if (strcmp (name, "vp8") == 0) {
     mime_type = g_strdup ("video/x-vp8");
 #endif
-  } else if (strcmp(name, "aac") == 0) {
+  } else if (strcmp (name, "aac") == 0) {
     caps = gst_emul_audio_caps_new (ctx, name, "audio/mpeg", NULL);
     if (!encode) {
         GValue arr = { 0, };
@@ -994,28 +1024,25 @@ gst_emul_codecname_to_caps (const char *name, CodecContext *ctx, gboolean encode
       gst_caps_set_simple (caps, "mpegversion", G_TYPE_INT, 4,
         "stream-format", G_TYPE_STRING, "raw",
         "base-profile", G_TYPE_STRING, "lc", NULL);
-#if 1
+
         if (ctx && ctx->codecdata_size > 0) {
           gst_codec_utils_aac_caps_set_level_and_profile (caps,
             ctx->codecdata, ctx->codecdata_size);
         }
-#endif
     }
-  } else if (strcmp(name, "ac3") == 0) {
+  } else if (strcmp (name, "ac3") == 0) {
     caps = gst_emul_audio_caps_new (ctx, name, "audio/x-ac3", NULL);
-  } else if (strcmp(name, "mp3") == 0) {
-#if 0
+  } else if (strcmp (name, "mp3") == 0) {
     if (encode) {
       caps = gst_emul_audio_caps_new (ctx, name, "audio/mpeg",
               "mpegversion", G_TYPE_INT, 1,
               "layer", GST_TYPE_INT_RANGE, 1, 3, NULL);
     } else {
-#endif
       caps = gst_caps_new_simple("audio/mpeg",
               "mpegversion", G_TYPE_INT, 1,
               "layer", GST_TYPE_INT_RANGE, 1, 3, NULL);
-//    }
-  } else if (strcmp(name, "mp3adu") == 0) {
+    }
+  } else if (strcmp (name, "mp3adu") == 0) {
     gchar *mime_type;
 
     mime_type = g_strdup_printf ("audio/x-gst_ff-%s", name);
@@ -1026,7 +1053,7 @@ gst_emul_codecname_to_caps (const char *name, CodecContext *ctx, gboolean encode
     }
   } else if (g_str_has_prefix(name, "wmav")) {
     gint version = 1;
-    if (strcmp(name, "wmav2") == 0) {
+    if (strcmp (name, "wmav2") == 0) {
       version = 2;
     }
     caps = gst_emul_audio_caps_new (ctx, name, "audio/x-wma", "wmaversion",
@@ -1047,13 +1074,6 @@ typedef struct PixFmtInfo
 
 static PixFmtInfo pix_fmt_info[PIX_FMT_NB];
 
-#define GEN_MASK(x) ((1<<(x))-1)
-#define ROUND_UP_X(v, x) (((v) + GEN_MASK(x)) & ~GEN_MASK(x))
-#define ROUND_UP_2(x) ROUND_UP_X(x, 1)
-#define ROUND_UP_4(x) ROUND_UP_X(x, 2)
-#define ROUND_UP_8(x) ROUND_UP_X(x, 3)
-#define DIV_ROUND_UP_X(v, x) (((v) + GEN_MASK(x)) >> (x))
-
 void
 gst_emul_init_pix_fmt_info (void)
 {
@@ -1145,12 +1165,12 @@ gst_emul_align_size (int buf_size)
   int i, align_size;
 
   align_size = buf_size / 1024;
-  
+
   for (i = 0; i < 14; i++) {
     if (align_size < (1 << i)) {
-      align_size = 1024 * (1 << i);      
+      align_size = 1024 * (1 << i);
       break;
-    }    
+    }
   }
 
   return align_size;
index b07076e..b268888 100644 (file)
@@ -93,6 +93,8 @@ GstCaps *gst_emul_codectype_to_caps (int media_type, CodecContext *ctx,
 void gst_emul_caps_with_codecname (const char *name, int media_type,
     const GstCaps *caps, CodecContext *ctx);
 
+void gst_emul_caps_with_codectype (int media_type, const GstCaps *caps, CodecContext *ctx);
+
 GstCaps *gst_emul_video_caps_new (CodecContext *ctx, const char *name,
         const char *mimetype, const char *fieldname, ...);
 
@@ -105,4 +107,10 @@ GstCaps *gst_emul_smpfmt_to_caps (int8_t sample_fmt, CodecContext *ctx, const ch
 
 GstCaps *gst_emul_codecname_to_caps (const char *name, CodecContext *ctx, gboolean encode);
 
+int gst_emul_avpicture_size (int pix_fmt, int width, int height);
+
+int gst_emul_align_size (int buf_size);
+
+gint gst_emul_smpfmt_depth (int smp_fmt);
+
 #endif