* enable static build of modules
authorcaro <caro>
Mon, 4 Jan 2010 18:45:40 +0000 (18:45 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 4 Jan 2010 18:45:40 +0000 (18:45 +0000)
 * clean up autotools
 * remove some warnings

issues:
 * vlc backend can not be built on my computer(API change
   in libvlc, it seems)
  * when i build xine *and* gstreamer as static, i get a
    multiple defined of __eina_module_init and __eina_module_shutdown

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/emotion@44884 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

19 files changed:
configure.ac
emotion.pc.in
m4/ac_attribute.m4 [new file with mode: 0644]
m4/efl_doxygen.m4 [new file with mode: 0644]
m4/emotion_check.m4 [new file with mode: 0644]
src/bin/Makefile.am
src/bin/emotion_test_main.c
src/lib/Makefile.am
src/lib/emotion_private.h
src/lib/emotion_smart.c
src/modules/gstreamer/Makefile.am
src/modules/gstreamer/emotion_gstreamer.c
src/modules/gstreamer/emotion_gstreamer_pipeline.c
src/modules/gstreamer/emotion_gstreamer_pipeline_dvd.c
src/modules/vlc/Makefile.am
src/modules/vlc/emotion_vlc.c
src/modules/xine/Makefile.am
src/modules/xine/emotion_xine.c
src/modules/xine/emotion_xine_vo_out.c

index a872003..52854f1 100644 (file)
@@ -1,21 +1,17 @@
-dnl Process this file with autoconf to produce a configure script.
-
 # get rid of that stupid cache mechanism
 rm -f config.cache
 
 # get rid of that stupid cache mechanism
 rm -f config.cache
 
-AC_INIT(emotion, 0.1.0.042, enlightenment-devel@lists.sourceforge.net)
-AC_PREREQ(2.52)
-AC_CONFIG_SRCDIR(configure.ac)
-
-AM_INIT_AUTOMAKE(1.6 dist-bzip2)
-AM_CONFIG_HEADER(config.h)
-
-AC_C_BIGENDIAN
+AC_INIT([emotion], [0.1.0.042], [enlightenment-devel@lists.sourceforge.net])
+AC_PREREQ([2.60])
+AC_CONFIG_SRCDIR([configure.ac])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
 AC_ISC_POSIX
 AC_ISC_POSIX
-AC_PROG_CC
-AM_PROG_CC_STDC
-AC_HEADER_STDC
-AC_C_CONST
+
+AM_INIT_AUTOMAKE([1.6 dist-bzip2])
+AM_CONFIG_HEADER([config.h])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 AC_LIBTOOL_WIN32_DLL
 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
 
 AC_LIBTOOL_WIN32_DLL
 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
@@ -29,13 +25,115 @@ SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
 version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
 AC_SUBST(version_info)
 
 version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
 AC_SUBST(version_info)
 
-EFL_EMOTION_BUILD=""
+
+### Needed information
+
 case "$host_os" in
    mingw* | cegcc*)
 case "$host_os" in
    mingw* | cegcc*)
+      want_xine="no"
+      want_gstreamer="yes"
+      want_vlc="no"
+      ;;
+   *)
+      want_xine="yes"
+      want_gstreamer="yes"
+      want_vlc="yes"
+      ;;
+esac
+
+requirement_emotion=""
+
+### Additional options to configure
+
+# edje_cc
+
+AC_ARG_WITH([edje-cc],
+   [AC_HELP_STRING([--with-edje-cc=PATH], [specify a specific path to edje_cc])],
+   [
+    v=$withval;
+    edje_cc=$v
+    echo "  Enlightenment edje_cc explicitly set to "$edje_cc;
+   ],
+   [edje_cc=$(pkg-config --variable=prefix edje)/bin/edje_cc])
+AC_SUBST(edje_cc)
+
+
+### Checks for programs
+AC_PROG_CC
+
+# pkg-config
+PKG_PROG_PKG_CONFIG
+
+# Check whether pkg-config supports Requires.private
+if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
+   pkgconfig_requires_private="Requires.private"
+else
+   pkgconfig_requires_private="Requires"
+fi
+AC_SUBST(pkgconfig_requires_private)
+
+# doxygen program for documentation building
+
+EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
+
+
+### Checks for libraries
+
+PKG_CHECK_MODULES(EMOTION, [eina-0 evas >= 0.9.9 ecore >= 0.9.9 ecore-job >= 0.9.9])
+requirement_emotion="ecore-job ecore evas eina-0"
+
+PKG_CHECK_MODULES(EMOTION_BIN, [evas >= 0.9.9 ecore >= 0.9.9 ecore-evas >= 0.9.9 edje >= 0.5.0])
+
+PKG_CHECK_MODULES(ECORE_X, [ecore-x >= 0.9.9], [have_ecore_x="yes"], [have_ecore_x="no"])
+
+PKG_CHECK_MODULES(ECORE_FB, [ecore-fb >= 0.9.9], [have_ecore_fb="yes"], [have_ecore_fb="no"])
+
+if test "x${have_ecore_x}" = "xyes" ; then
+   AC_DEFINE(EMOTION_HAVE_ECORE_X, 1, [Define to 1 if Ecore_X is enabled])  
+fi
+
+if test "x${have_ecore_fb}" = "xyes" ; then
+   AC_DEFINE(EMOTION_HAVE_ECORE_FB, 1, [Define to 1 if Ecore_Fb is enabled])  
+fi
+
+PKG_CHECK_EXISTS([evas-software-x11], [AC_DEFINE(HAVE_EVAS_SOFWARE_X11, 1, [Evas Software Xlib Engine Support])])
+
+PKG_CHECK_EXISTS([evas-xrender-x11], [AC_DEFINE(HAVE_EVAS_XRENDER_X11, 1, [Evas Software Xlib Engine Support])])
+
+PKG_CHECK_EXISTS([evas-opengl-x11], [AC_DEFINE(HAVE_EVAS_OPENGL_X11, 1, [Evas OpenGL Xlib Engine Support])])
+
+PKG_CHECK_EXISTS([evas-fb], [AC_DEFINE(HAVE_EVAS_FB, 1, [Evas Framebuffer Engine Support])])
+
+
+### Checks for header files
+AC_HEADER_STDC
+
+### Checks for types
+
+
+### Checks for structures
+
+
+### Checks for compiler characteristics
+AC_C_CONST
+AC_C_BIGENDIAN
+AM_PROG_CC_STDC
+AC_C___ATTRIBUTE__
+
+EFL_EMOTION_BUILD=""
+case "$host_os" in
+   mingw32ce* | cegcc*)
+      EMOTION_CPPFLAGS="-D_WIN32_WCE=0x0420"
+      EFL_EMOTION_BUILD="-DEFL_EMOTION_BUILD"
+      ;;
+   mingw*)
+      EMOTION_CPPFLAGS="-D_WIN32_WINNT=0x0501"
       EFL_EMOTION_BUILD="-DEFL_EMOTION_BUILD"
       EFL_EMOTION_BUILD="-DEFL_EMOTION_BUILD"
-   ;;
+      ;;
 esac
 AC_SUBST(EFL_EMOTION_BUILD)
 esac
 AC_SUBST(EFL_EMOTION_BUILD)
+AC_SUBST(EMOTION_CPPFLAGS)
+
 
 ### Checks for linker characteristics
 
 
 ### Checks for linker characteristics
 
@@ -49,117 +147,18 @@ case "$host_os" in
 esac
 AC_SUBST(lt_enable_auto_import)
 
 esac
 AC_SUBST(lt_enable_auto_import)
 
-PKG_CHECK_MODULES(EVAS, [evas >= 0.9.9])
-PKG_CHECK_MODULES(EDJE, [edje >= 0.5.0])
-PKG_CHECK_MODULES(ECORE, [ecore >= 0.9.9 ecore-evas >= 0.9.9 ecore-job >= 0.9.9])
-
-save_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$CPPFLAGS $ECORE_CFLAGS"
-AC_CHECK_HEADERS(Ecore_X.h Ecore_Fb.h)
-CPPFLAGS=$save_CPPFLAGS
-
-AC_ARG_ENABLE(vlc,
-       AC_HELP_STRING([--disable-vlc],[disable vlc support @<:@default=auto@:>@]),
-       [enable_vlc=$enableval],[enable_vlc=auto])
-HAVE_VLC="no"
-if test "$enable_vlc" != "no" ; then
-       PKG_CHECK_MODULES(VLC, [libvlc >= 0.9], [HAVE_VLC="yes"], [HAVE_VLC="no"])
-fi
-if test "$enable_vlc$HAVE_VLC" = "yesno" ; then
-       AC_MSG_RESULT(vlc not found)
-fi
 
 
-AC_ARG_ENABLE(xine,
-       AC_HELP_STRING([--disable-xine],[disable xine support @<:@default=auto@:>@]),
-       [enable_xine=$enableval],[enable_xine=auto])
-HAVE_XINE="no"
-if test "$enable_xine" != "no" ; then
-       PKG_CHECK_MODULES(XINE, [libxine >= 1.1.1], [HAVE_XINE="yes"])
-fi
-if test "$enable_xine$HAVE_XINE" = "yesno" ; then
-       AC_MSG_RESULT(xine not found)
-fi
+### Modules
 
 
-AC_ARG_ENABLE(gstreamer,
-       AC_HELP_STRING([--disable-gstreamer],[disable gstreamer support @<:@default=auto@:>@]),
-       [enable_gstreamer=$enableval],[enable_gstreamer=auto])
-HAVE_GSTREAMER="no"
-HAVE_GSTPLUG="no"
-if test "$enable_gstreamer" != "no" ; then
-
-       dnl Gstreamer version requirement
-       GST_REQS=0.10.2
-       GSTPLUG_REQS=0.10.1
-       GST_MAJORMINOR=0.10
-
-       PKG_CHECK_MODULES(GST, \
-          gstreamer-$GST_MAJORMINOR >= $GST_REQS,
-          HAVE_GSTREAMER="yes",
-          HAVE_GSTREAMER="no")
-
-       PKG_CHECK_MODULES(GSTPLUG, \
-          gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPLUG_REQS,
-          HAVE_GSTPLUG="yes",
-          HAVE_GSTPLUG="no")
-
-       AM_GST_ELEMENT_CHECK(
-          [ffmpeg],
-          [HAVE_GSTFFMPEG="yes"],
-          [HAVE_GSTFFMPEG="no"])
-
-       AM_GST_ELEMENT_CHECK(
-          [cdiocddasrc],
-          [HAVE_GSTCDIOCDDASRC="yes"],
-          [HAVE_GSTCDIOCDDASRC="no"])
-fi
-if test "$enable_gstreamer$HAVE_GSTREAMER" = "yesno" ; then
-       AC_MSG_RESULT(gstreamer not found)
-fi
-if test "$HAVE_GSTPLUG" = "no"; then
-       if test "$HAVE_GSTREAMER" = "no" ; then
-               GSTPLUG_MSG="no"
-       else
-               AC_MSG_WARN([You should install gstreamer plugins and gst-ffmpeg to properly decode your video and audio files])
-               GSTPLUG_MSG="no (you should install gst-plugins-base and gst-ffmpeg)"
-       fi
-else
-       if test "$HAVE_GSTFFMPEG" = "no"; then
-               if test "$HAVE_GSTREAMER" = "no" ; then
-                       GSTPLUG_MSG="no"
-               else
-                       AC_MSG_WARN([You should install gstreamer plugins and gst-ffmpeg to properly decode your video and audio files])
-                       GSTPLUG_MSG="no (you should install gst-plugins-base and gst-ffmpeg)"
-               fi
-               GSTPLUG_MSG="yes"
-       else
-               GSTPLUG_MSG="yes"
-       fi
-       if test "$HAVE_GSTCDIOCDDASRC" = "no"; then
-               AC_MSG_WARN([You should install gstreamer-plugins-good and make sure that the cdiocddasrc element is installed])
-               GSTCDDA_MSG="no (you should install gst-plugins-good and the cdiocddasrc element)"
-       else
-               GSTCDDA_MSG="yes"
-       fi
-fi
+EMOTION_CHECK_MODULE([Xine], [${want_xine}])
+EMOTION_CHECK_MODULE([Gstreamer], [${want_gstreamer}])
+EMOTION_CHECK_MODULE([VLC], [${want_vlc}])
 
 
-if test "$HAVE_XINE$HAVE_GSTREAMER" = "nono" ; then
-       AC_MSG_ERROR([Xine or Gstreamer must be installed to build emotion])
+if test "x${enable_xine}" = "xno" && test "x${enable_gstreamer}" = "xno" && test "x${enable_vlc}" = "xno" ; then
+   AC_MSG_ERROR([Xine, Gstreamer or VLC backends must be selected to build Emotion])
 fi
 
 fi
 
-AM_CONDITIONAL([BUILD_VLC_MODULE], [test "$HAVE_VLC" = yes])
-AM_CONDITIONAL([BUILD_XINE_MODULE], [test "$HAVE_XINE" = yes])
-AM_CONDITIONAL([BUILD_GSTREAMER_MODULE], [test "$HAVE_GSTREAMER" = yes])
-
-AC_ARG_WITH(edje-cc,
-[  --with-edje-cc=PATH              specify a specific path to edje_cc],
-[
-  v=$withval;
-  edje_cc=$v
-  echo "  Enlightenment edje_cc explicitly set to "$edje_cc;
-],[
-  edje_cc=$(pkg-config --variable=prefix edje)/bin/edje_cc
-])
-AC_SUBST(edje_cc)
+AC_SUBST(requirement_emotion)
 
 AC_OUTPUT([
 Makefile
 
 AC_OUTPUT([
 Makefile
@@ -189,18 +188,26 @@ echo
 echo "Configuration Options Summary:"
 echo
 echo "  Modules:"
 echo "Configuration Options Summary:"
 echo
 echo "  Modules:"
-echo "    Xine...............: $HAVE_XINE"
-echo "    Vlc................: $HAVE_VLC"
-echo "    Gstreamer..........: $HAVE_GSTREAMER"
-echo "    Gstreamer plugins..: $GSTPLUG_MSG"
-echo "    Gstreamer FFmpeg...: $HAVE_GSTFFMPEG"
-echo "    Gstreamer CDDA.....: $GSTCDDA_MSG"
+echo "    Xine...............: ${enable_xine}"
+echo "    Vlc................: ${enable_vlc}"
+echo "    Gstreamer..........: ${enable_gstreamer}"
+echo "    Gstreamer FFmpeg...: ${have_gst_ffmpeg}"
+echo "    Gstreamer CDDA.....: ${have_gst_cdiocddasrc}"
 echo
 echo "  edje_cc..............: ${edje_cc}"
 echo
 echo
 echo "  edje_cc..............: ${edje_cc}"
 echo
-echo "  Compilation..........: make"
+echo "Compilation............: make (or gmake)"
+echo "  CPPFLAGS.............: $CPPFLAGS"
+echo "  CFLAGS...............: $CFLAGS"
+echo "  LDFLAGS..............: $LDFLAGS"
 echo
 echo
-echo "  Installation.........: make install"
+echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
+echo "  prefix...............: $prefix"
 echo
 echo
-echo "    prefix.........: $prefix"
+if test "x${have_static_module}" = "xyes" ; then
+echo -e "\0033\01331;31mWarning\0033\01331;0m: You are trying to link statically one or more modules to Emotion."
+echo "         You must know what you are doing, or else you will have a lot of problems."
+echo "         And asparagus will disappear from the earth."
+echo "         Think about that."
 echo
 echo
+fi
index f628489..a0b1cfa 100644 (file)
@@ -5,8 +5,7 @@ includedir=@includedir@
 
 Name: emotion
 Description: Emotion evas based multimedia library
 
 Name: emotion
 Description: Emotion evas based multimedia library
-Requires: evas
+@pkgconfig_requires_private@: @requirement_emotion@
 Version: @VERSION@
 Libs: -L${libdir} -lemotion
 Version: @VERSION@
 Libs: -L${libdir} -lemotion
-Libs.private: @EDJE_LIBS@ @ECORE_LIBS@ @XINE_LIBS@ @GST_LIBS@
 Cflags: -I${includedir}
 Cflags: -I${includedir}
diff --git a/m4/ac_attribute.m4 b/m4/ac_attribute.m4
new file mode 100644 (file)
index 0000000..3926d23
--- /dev/null
@@ -0,0 +1,46 @@
+dnl Copyright (C) 2004-2008 Kim Woelders
+dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
+dnl That code is public domain and can be freely used or copied.
+dnl Originally snatched from somewhere...
+
+dnl Macro for checking if the compiler supports __attribute__
+
+dnl Usage: AC_C___ATTRIBUTE__
+dnl call AC_DEFINE for HAVE___ATTRIBUTE__ and __UNUSED__
+dnl if the compiler supports __attribute__, HAVE___ATTRIBUTE__ is
+dnl defined to 1 and __UNUSED__ is defined to __attribute__((unused))
+dnl otherwise, HAVE___ATTRIBUTE__ is not defined and __UNUSED__ is
+dnl defined to nothing.
+
+AC_DEFUN([AC_C___ATTRIBUTE__],
+[
+
+AC_MSG_CHECKING([for __attribute__])
+
+AC_CACHE_VAL([ac_cv___attribute__],
+   [AC_TRY_COMPILE(
+       [
+#include <stdlib.h>
+
+int func(int x);
+int foo(int x __attribute__ ((unused)))
+{
+   exit(1);
+}
+       ],
+       [],
+       [ac_cv___attribute__="yes"],
+       [ac_cv___attribute__="no"]
+    )]
+)
+
+AC_MSG_RESULT($ac_cv___attribute__)
+
+if test "x${ac_cv___attribute__}" = "xyes" ; then
+   AC_DEFINE([HAVE___ATTRIBUTE__], [1], [Define to 1 if your compiler has __attribute__])
+   AC_DEFINE([__UNUSED__], [__attribute__((unused))], [Macro declaring a function argument to be unused])
+  else
+    AC_DEFINE([__UNUSED__], [], [Macro declaring a function argument to be unused])
+fi
+
+])
diff --git a/m4/efl_doxygen.m4 b/m4/efl_doxygen.m4
new file mode 100644 (file)
index 0000000..7324af3
--- /dev/null
@@ -0,0 +1,94 @@
+dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
+dnl That code is public domain and can be freely used or copied.
+
+dnl Macro that check if doxygen is available or not.
+
+dnl EFL_CHECK_DOXYGEN([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl Test for the doxygen program
+dnl Defines efl_doxygen
+dnl Defines the automake conditionnal EFL_BUILD_DOC
+dnl
+AC_DEFUN([EFL_CHECK_DOXYGEN],
+[
+
+dnl
+dnl Disable the build of the documentation
+dnl
+AC_ARG_ENABLE([doc],
+   [AC_HELP_STRING(
+       [--disable-doc],
+       [Disable documentation build @<:@default=enabled@:>@])],
+   [
+    if test "x${enableval}" = "xyes" ; then
+       efl_enable_doc="yes"
+    else
+       efl_enable_doc="no"
+    fi
+   ],
+   [efl_enable_doc="yes"])
+
+AC_MSG_CHECKING([whether to build documentation])
+AC_MSG_RESULT([${efl_enable_doc}])
+
+if test "x${efl_enable_doc}" = "xyes" ; then
+
+dnl Specify the file name, without path
+
+   efl_doxygen="doxygen"
+
+   AC_ARG_WITH([doxygen],
+      [AC_HELP_STRING(
+          [--with-doxygen=FILE],
+          [doxygen program to use @<:@default=doxygen@:>@])],
+
+dnl Check the given doxygen program.
+
+      [efl_doxygen=${withval}
+       AC_CHECK_PROG([efl_have_doxygen],
+          [${efl_doxygen}],
+          [yes],
+          [no])
+       if test "x${efl_have_doxygen}" = "xno" ; then
+          echo "WARNING:"
+          echo "The doxygen program you specified:"
+          echo "${efl_doxygen}"
+          echo "was not found.  Please check the path and make sure "
+          echo "the program exists and is executable."
+          AC_MSG_WARN([no doxygen detected. Documentation will not be built])
+       fi
+      ],
+      [AC_CHECK_PROG([efl_have_doxygen],
+          [${efl_doxygen}],
+          [yes],
+          [no])
+       if test "x${efl_have_doxygen}" = "xno" ; then
+          echo "WARNING:"
+          echo "The doxygen program was not found in your execute path."
+          echo "You may have doxygen installed somewhere not covered by your path."
+          echo ""
+          echo "If this is the case make sure you have the packages installed, AND"
+          echo "that the doxygen program is in your execute path (see your"
+          echo "shell manual page on setting the \$PATH environment variable), OR"
+          echo "alternatively, specify the program to use with --with-doxygen."
+          AC_MSG_WARN([no doxygen detected. Documentation will not be built])
+       fi
+      ])
+else
+   efl_have_doxygen="no"
+fi
+
+dnl
+dnl Substitution
+dnl
+AC_SUBST([efl_doxygen])
+
+if ! test "x${efl_have_doxygen}" = "xyes" ; then
+   efl_enable_doc="no"
+fi
+
+AM_CONDITIONAL(EFL_BUILD_DOC, test "x${efl_have_doxygen}" = "xyes")
+
+AS_IF([test "x$efl_have_doxygen" = "xyes"], [$1], [$2])
+])
+
+dnl End of efl_doxygen.m4
diff --git a/m4/emotion_check.m4 b/m4/emotion_check.m4
new file mode 100644 (file)
index 0000000..7f0c073
--- /dev/null
@@ -0,0 +1,147 @@
+
+dnl use: EMOTION_CHECK_DEP_XINE(want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+
+AC_DEFUN([EMOTION_CHECK_DEP_XINE],
+[
+
+requirement=""
+have_dep="no"
+
+PKG_CHECK_MODULES([XINE],
+   [libxine >= 1.1.1 evas >= 0.9.9],
+   [
+    have_dep="yes"
+    requirement="libxine"
+   ])
+
+if test "x$1" = "xstatic" ; then
+   requirement_emotion="${requirement} ${requirement_emotion}"
+fi
+
+AS_IF([test "x$have_dep" = "xyes"], [$2], [$3])
+
+])
+
+dnl use: EMOTION_CHECK_DEP_GSTREAMER(want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+
+AC_DEFUN([EMOTION_CHECK_DEP_GSTREAMER],
+[
+
+GST_REQS=0.10.2
+GSTPLUG_REQS=0.10.1
+GST_MAJORMINOR=0.10
+
+requirement=""
+have_dep="no"
+
+PKG_CHECK_MODULES([GSTREAMER],
+   [gstreamer-$GST_MAJORMINOR >= $GST_REQS gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPLUG_REQS evas >= 0.9.9],
+   [
+    have_dep="yes"
+    requirement="gstreamer-$GST_MAJORMINOR gstreamer-plugins-base-$GST_MAJORMINOR"
+   ])
+
+if test "x${have_dep}" = "xyes" ; then
+
+   AM_GST_ELEMENT_CHECK([ffmpeg], [have_gst_ffmpeg="yes"], [have_gst_ffmpeg="no"])
+
+   AM_GST_ELEMENT_CHECK([cdiocddasrc], [have_gst_cdiocddasrc="yes"], [have_gst_cdiocddasrc="no"])
+
+   if test "x${have_gst_ffmpeg}" = "xno" ; then
+      AC_MSG_WARN([You should install gst-ffmpeg to decode most of the video and uadio file formats])
+   fi
+
+   if test "x${have_gst_cdiocddasrc}" = "xno" ; then
+      AC_MSG_WARN([You should install gst-cdiocddasrc to decode CD Audio])
+   fi
+fi
+
+if test "x$1" = "xstatic" ; then
+   requirement_emotion="${requirement} ${requirement_emotion}"
+fi
+
+AS_IF([test "x$have_dep" = "xyes"], [$2], [$3])
+
+])
+
+dnl use: EMOTION_CHECK_DEP_VLC(want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+
+AC_DEFUN([EMOTION_CHECK_DEP_VLC],
+[
+
+requirement=""
+have_dep="no"
+
+PKG_CHECK_MODULES([VLC],
+   [libvlc >= 0.9 evas >= 0.9.9],
+   [
+    have_dep="yes"
+    requirement="libvlc"
+   ])
+
+if test "x$1" = "xstatic" ; then
+   requirement_emotion="${requirement} ${requirement_emotion}"
+fi
+
+AS_IF([test "x$have_dep" = "xyes"], [$2], [$3])
+
+])
+
+dnl use: EMOTION_CHECK_MODULE(description, want_module[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+AC_DEFUN([EMOTION_CHECK_MODULE],
+[
+m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
+m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
+
+want_module="$2"
+
+AC_ARG_ENABLE([DOWN],
+   [AC_HELP_STRING([--enable-]DOWN, [enable build of $1 module @<:@default=yes@:>@])],
+   [
+    if test "x${enableval}" = "xyes" ; then
+       enable_module="yes"
+    else
+       if test "x${enableval}" = "xstatic" ; then
+          enable_module="static"
+       else
+          enable_module="no"
+       fi
+    fi
+   ],
+   [enable_module="yes"])
+
+if test "x${enable_module}" = "xyes" || test "x${enable_module}" = "xstatic" ; then
+   want_module="yes"
+fi
+
+have_module="no"
+if test "x${want_module}" = "xyes" && (test "x${enable_module}" = "xyes" || test "x${enable_module}" = "xstatic") ; then
+   m4_default([EMOTION_CHECK_DEP_]m4_defn([UP]))(${enable_module}, [have_module="yes"], [have_module="no"])
+fi
+
+AC_MSG_CHECKING([whether to enable $1 module built])
+AC_MSG_RESULT([${have_module}])
+
+static_module="no"
+if test "x${have_module}" = "xyes" && test "x${enable_module}" = "xstatic" ; then
+   static_module="yes"
+fi
+
+AM_CONDITIONAL(EMOTION_BUILD_[]UP, [test "x${have_module}" = "xyes"])
+AM_CONDITIONAL(EMOTION_STATIC_BUILD_[]UP, [test "x${static_module}" = "xyes"])
+
+if test "x${static_module}" = "xyes" ; then
+   AC_DEFINE(EMOTION_STATIC_BUILD_[]UP, 1, [Set to 1 if $1 is statically built])
+   have_static_module="yes"
+fi
+
+enable_[]DOWN="no"
+if test "x${have_module}" = "xyes" ; then
+   enable_[]DOWN=${enable_module}
+fi
+
+AS_IF([test "x$have_module" = "xyes"], [$3], [$4])
+
+m4_popdef([UP])
+m4_popdef([DOWN])
+])
index a90d598..bc016d3 100644 (file)
@@ -7,16 +7,13 @@ AM_CPPFLAGS = \
 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
-@EVAS_CFLAGS@ \
-@ECORE_CFLAGS@ \
-@EDJE_CFLAGS@
+@EMOTION_CPPFLAGS@ \
+@EMOTION_BIN_CFLAGS@ \
+@ECORE_X_CFLAGS@ \
+@ECORE_FB_CFLAGS@
 
 
-bin_PROGRAMS = \
-emotion_test
+bin_PROGRAMS = emotion_test
 
 
-emotion_test_SOURCES = \
-emotion_test_main.c
+emotion_test_SOURCES = emotion_test_main.c
 
 
-emotion_test_LDADD = \
-@EVAS_LIBS@ @ECORE_LIBS@ @EDJE_LIBS@ \
-$(top_builddir)/src/lib/libemotion.la
+emotion_test_LDADD = @ECORE_X_CFLAGS@ @ECORE_FB_CFLAGS@ @EMOTION_BIN_LIBS@ $(top_builddir)/src/lib/libemotion.la
index edccfe6..c824090 100644 (file)
@@ -3,14 +3,14 @@
 #include <stdio.h>
 #include <string.h>
 
 #include <stdio.h>
 #include <string.h>
 
-#if defined(HAVE_ECORE_X_H) || defined(HAVE_ECORE_FB_H)
+#if defined(EMOTION_HAVE_ECORE_X) || defined(EMOTION_HAVE_ECORE_FB)
 
 #include <Evas.h>
 #include <Ecore.h>
 
 #include <Evas.h>
 #include <Ecore.h>
-#ifndef FB_ONLY
-#include <Ecore_X.h>
+#ifdef EMOTION_HAVE_ECORE_X
+# include <Ecore_X.h>
 #else
 #else
-#include <Ecore_Fb.h>
+# include <Ecore_Fb.h>
 #endif
 #include <Ecore_Evas.h>
 #include <Edje.h>
 #endif
 #include <Ecore_Evas.h>
 #include <Edje.h>
@@ -64,7 +64,7 @@ main_start(int argc, char **argv)
    edje_frametime_set(1.0 / 30.0);
 
    if (!ecore_evas_init()) return -1;
    edje_frametime_set(1.0 / 30.0);
 
    if (!ecore_evas_init()) return -1;
-#ifndef FB_ONLY
+#ifdef EMOTION_HAVE_ECORE_X
      {
         int i;
 
      {
         int i;
 
@@ -112,20 +112,22 @@ main_start(int argc, char **argv)
      }
    if (mode == 4)
      ecore_evas = ecore_evas_new(NULL, 0, 0, startw, starth, NULL);
      }
    if (mode == 4)
      ecore_evas = ecore_evas_new(NULL, 0, 0, startw, starth, NULL);
-#if HAVE_ECORE_EVAS_X
+# if HAVE_EVAS_SOFWARE_X11
    if (mode == 0)
      ecore_evas = ecore_evas_software_x11_new(NULL, 0,  0, 0, startw, starth);
    if (mode == 0)
      ecore_evas = ecore_evas_software_x11_new(NULL, 0,  0, 0, startw, starth);
-#endif
-#if HAVE_ECORE_EVAS_X11_GL
+# endif
+# if HAVE_EVAS_OPENGL_X11
    if (mode == 1)
      ecore_evas = ecore_evas_gl_x11_new(NULL, 0, 0, 0, startw, starth);
    if (mode == 1)
      ecore_evas = ecore_evas_gl_x11_new(NULL, 0, 0, 0, startw, starth);
-#endif
-#if HAVE_ECORE_EVAS_FB
+# endif
+# if HAVE_EVAS_FB
    if (mode == 2)
      ecore_evas = ecore_evas_fb_new(NULL, 0, startw, starth);
    if (mode == 2)
      ecore_evas = ecore_evas_fb_new(NULL, 0, startw, starth);
-#endif
+# endif
+# if HAVE_EVAS_XRENDER_X11
    if (mode == 3)
      ecore_evas = ecore_evas_xrender_x11_new(NULL, 0, 0, 0, startw, starth);
    if (mode == 3)
      ecore_evas = ecore_evas_xrender_x11_new(NULL, 0, 0, 0, startw, starth);
+# endif
 
 #else
    startw = 240;
 
 #else
    startw = 240;
@@ -902,6 +904,7 @@ main(int argc, char **argv)
 }
 
 #else
 }
 
 #else
+# warning "EMOTION_HAVE_ECORE_X and EMOTION_HAVE_ECORE_FB not defined !"
 int main()
 {
        puts("Could not find Ecore_X.h or Ecore_Fb.h so test is disabled");
 int main()
 {
        puts("Could not find Ecore_X.h or Ecore_Fb.h so test is disabled");
index d2bb4ad..76e69ab 100644 (file)
@@ -7,16 +7,62 @@ AM_CPPFLAGS = \
 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
-@EVAS_CFLAGS@ \
-@ECORE_CFLAGS@ \
+@EMOTION_CPPFLAGS@ \
+@EMOTION_CFLAGS@ \
 @EFL_EMOTION_BUILD@
 
 @EFL_EMOTION_BUILD@
 
+if EMOTION_STATIC_BUILD_XINE
+AM_CPPFLAGS += @XINE_CFLAGS@
+endif
+
+if EMOTION_STATIC_BUILD_GSTREAMER
+AM_CPPFLAGS += @GSTREAMER_CFLAGS@
+endif
+
+if EMOTION_STATIC_BUILD_VLC
+AM_CPPFLAGS += @VLC_CFLAGS@
+endif
+
 lib_LTLIBRARIES      = libemotion.la
 include_HEADERS      = Emotion.h
 lib_LTLIBRARIES      = libemotion.la
 include_HEADERS      = Emotion.h
-libemotion_la_SOURCES  = \
-emotion_smart.c \
-emotion_private.h
+libemotion_la_SOURCES = emotion_smart.c
+
+if EMOTION_STATIC_BUILD_XINE
+libemotion_la_SOURCES += \
+$(top_srcdir)/src/modules/xine/emotion_xine.c \
+$(top_srcdir)/src/modules/xine/emotion_xine_vo_out.c
+endif
+
+if EMOTION_STATIC_BUILD_GSTREAMER
+libemotion_la_SOURCES += \
+$(top_srcdir)/src/modules/gstreamer/emotion_gstreamer.c \
+$(top_srcdir)/src/modules/gstreamer/emotion_gstreamer_pipeline.c \
+$(top_srcdir)/src/modules/gstreamer/emotion_gstreamer_pipeline_cdda.c \
+$(top_srcdir)/src/modules/gstreamer/emotion_gstreamer_pipeline_dvd.c \
+$(top_srcdir)/src/modules/gstreamer/emotion_gstreamer_pipeline_file.c \
+$(top_srcdir)/src/modules/gstreamer/emotion_gstreamer_pipeline_uri.c \
+$(top_srcdir)/src/modules/gstreamer/emotion_gstreamer_pipeline_v4l.c
+endif
+
+if EMOTION_STATIC_BUILD_VLC
+libemotion_la_SOURCES += \
+$(top_srcdir)/src/modules/vlc/emotion_vlc.c
+endif
+
+libemotion_la_LIBADD = @EMOTION_LIBS@
+
+if EMOTION_STATIC_BUILD_XINE
+libemotion_la_LIBADD += @XINE_LIBS@
+endif
+
+if EMOTION_STATIC_BUILD_GSTREAMER
+libemotion_la_LIBADD += @GSTREAMER_LIBS@
+endif
+
+if EMOTION_STATIC_BUILD_VLC
+libemotion_la_LIBADD += @VLC_LIBS@
+endif
+
+libemotion_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@
 
 
-libemotion_la_LIBADD       = @EVAS_LIBS@ @ECORE_LIBS@
-libemotion_la_DEPENDENCIES = $(top_builddir)/config.h
-libemotion_la_LDFLAGS      = -no-undefined @lt_enable_auto_import@ -version-info @version_info@
+EXTRA_DIST = emotion_private.h
index 1fb6166..adf1f25 100644 (file)
@@ -1,18 +1,19 @@
 #ifndef EMOTION_PRIVATE_H
 #define EMOTION_PRIVATE_H
 
 #ifndef EMOTION_PRIVATE_H
 #define EMOTION_PRIVATE_H
 
-#include <Evas.h>
-#include <Ecore.h>
-#include <Ecore_Job.h>
-#include <Ecore_Data.h>
-#include <Ecore_Str.h>
-#include <Emotion.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
 
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 
 
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 
-#include "config.h"
+#include <Evas.h>
+#include <Ecore.h>
+#include <Ecore_Job.h>
+#include <Ecore_Str.h>
+#include <Emotion.h>
 
 #define META_TRACK_TITLE 1
 #define META_TRACK_ARTIST 2
 
 #define META_TRACK_TITLE 1
 #define META_TRACK_ARTIST 2
index e3c54b4..ba733f2 100644 (file)
@@ -119,7 +119,7 @@ _emotion_module_open(const char *name, Evas_Object *obj, Emotion_Video_Module **
 {
    Eina_Emotion_Plugins *plugin;
    Smart_Data *sd;
 {
    Eina_Emotion_Plugins *plugin;
    Smart_Data *sd;
-   int index = 0;
+   unsigned int index = 0;
 
    E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
    if (!_backends)
 
    E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
    if (!_backends)
@@ -1028,7 +1028,7 @@ _emotion_spu_button_set(Evas_Object *obj, int button)
 /****************************/
 
 static void
 /****************************/
 
 static void
-_mouse_move(void *data, Evas *ev, Evas_Object *obj, void *event_info)
+_mouse_move(void *data, Evas *ev __UNUSED__, Evas_Object *obj, void *event_info)
 {
    Evas_Event_Mouse_Move *e;
    Smart_Data *sd;
 {
    Evas_Event_Mouse_Move *e;
    Smart_Data *sd;
@@ -1048,7 +1048,7 @@ _mouse_move(void *data, Evas *ev, Evas_Object *obj, void *event_info)
 }
 
 static void
 }
 
 static void
-_mouse_down(void *data, Evas *ev, Evas_Object *obj, void *event_info)
+_mouse_down(void *data, Evas *ev __UNUSED__, Evas_Object *obj, void *event_info)
 {
    Evas_Event_Mouse_Down *e;
    Smart_Data *sd;
 {
    Evas_Event_Mouse_Down *e;
    Smart_Data *sd;
index 533ab0c..2056ea3 100644 (file)
@@ -1,4 +1,3 @@
-
 MAINTAINERCLEANFILES = Makefile.in
 
 AM_CPPFLAGS = \
 MAINTAINERCLEANFILES = Makefile.in
 
 AM_CPPFLAGS = \
@@ -7,19 +6,18 @@ AM_CPPFLAGS = \
 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
+@EMOTION_CPPFLAGS@ \
 @EFL_EMOTION_BUILD@ \
 @EFL_EMOTION_BUILD@ \
-@EVAS_CFLAGS@ \
-@ECORE_CFLAGS@ \
-@GST_CFLAGS@
+@GSTREAMER_CFLAGS@
 
 
-if BUILD_GSTREAMER_MODULE
+if EMOTION_BUILD_GSTREAMER
+if !EMOTION_STATIC_BUILD_GSTREAMER
 
 pkgdir = $(libdir)/emotion
 
 pkg_LTLIBRARIES = gstreamer.la
 gstreamer_la_SOURCES = \
 emotion_gstreamer.c \
 
 pkgdir = $(libdir)/emotion
 
 pkg_LTLIBRARIES = gstreamer.la
 gstreamer_la_SOURCES = \
 emotion_gstreamer.c \
-emotion_gstreamer.h \
 emotion_gstreamer_pipeline.c \
 emotion_gstreamer_pipeline.h \
 emotion_gstreamer_pipeline_cdda.c \
 emotion_gstreamer_pipeline.c \
 emotion_gstreamer_pipeline.h \
 emotion_gstreamer_pipeline_cdda.c \
@@ -27,9 +25,12 @@ emotion_gstreamer_pipeline_dvd.c \
 emotion_gstreamer_pipeline_file.c \
 emotion_gstreamer_pipeline_uri.c \
 emotion_gstreamer_pipeline_v4l.c
 emotion_gstreamer_pipeline_file.c \
 emotion_gstreamer_pipeline_uri.c \
 emotion_gstreamer_pipeline_v4l.c
-gstreamer_la_LIBADD  = @EVAS_LIBS@ @ECORE_LIBS@ @GST_LIBS@ $(top_builddir)/src/lib/libemotion.la
+gstreamer_la_LIBADD  = @GSTREAMER_LIBS@ $(top_builddir)/src/lib/libemotion.la
 gstreamer_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
 gstreamer_la_LIBTOOLFLAGS = --tag=disable-static
 gstreamer_la_DEPENDENCIES = $(top_builddir)/config.h
 
 endif
 gstreamer_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
 gstreamer_la_LIBTOOLFLAGS = --tag=disable-static
 gstreamer_la_DEPENDENCIES = $(top_builddir)/config.h
 
 endif
+endif
+
+EXTRA_DIST = emotion_gstreamer.h
index 0de2cb0..5340612 100644 (file)
@@ -236,7 +236,7 @@ static Emotion_Video_Module em_module =
 static unsigned char
 em_init(Evas_Object  *obj,
        void        **emotion_video,
 static unsigned char
 em_init(Evas_Object  *obj,
        void        **emotion_video,
-       Emotion_Module_Options *opt)
+       Emotion_Module_Options *opt __UNUSED__)
 {
    Emotion_Gstreamer_Video *ev;
    GError                  *error;
 {
    Emotion_Gstreamer_Video *ev;
    GError                  *error;
@@ -494,7 +494,7 @@ em_file_close(void *video)
 
 static void
 em_play(void   *video,
 
 static void
 em_play(void   *video,
-       double  pos)
+       double  pos __UNUSED__)
 {
    Emotion_Gstreamer_Video *ev;
 
 {
    Emotion_Gstreamer_Video *ev;
 
@@ -714,7 +714,7 @@ em_vis_get(void *video)
 }
 
 static Eina_Bool
 }
 
 static Eina_Bool
-em_vis_supported(void *ef, Emotion_Vis vis)
+em_vis_supported(void *ef __UNUSED__, Emotion_Vis vis)
 {
    const char *name;
    GstElementFactory *factory;
 {
    const char *name;
    GstElementFactory *factory;
@@ -899,7 +899,7 @@ em_bgra_data_get(void *video, unsigned char **bgra_data)
 }
 
 static void
 }
 
 static void
-em_event_feed(void *video, int event)
+em_event_feed(void *video, int event __UNUSED__)
 {
    Emotion_Gstreamer_Video *ev;
 
 {
    Emotion_Gstreamer_Video *ev;
 
@@ -907,7 +907,7 @@ em_event_feed(void *video, int event)
 }
 
 static void
 }
 
 static void
-em_event_mouse_button_feed(void *video, int button, int x, int y)
+em_event_mouse_button_feed(void *video, int button __UNUSED__, int x __UNUSED__, int y __UNUSED__)
 {
    Emotion_Gstreamer_Video *ev;
 
 {
    Emotion_Gstreamer_Video *ev;
 
@@ -915,7 +915,7 @@ em_event_mouse_button_feed(void *video, int button, int x, int y)
 }
 
 static void
 }
 
 static void
-em_event_mouse_move_feed(void *video, int x, int y)
+em_event_mouse_move_feed(void *video, int x __UNUSED__, int y __UNUSED__)
 {
    Emotion_Gstreamer_Video *ev;
 
 {
    Emotion_Gstreamer_Video *ev;
 
@@ -957,7 +957,7 @@ em_video_channel_get(void *video)
 
 static const char *
 em_video_channel_name_get(void *video,
 
 static const char *
 em_video_channel_name_get(void *video,
-                         int   channel)
+                         int   channel __UNUSED__)
 {
    Emotion_Gstreamer_Video *ev;
 
 {
    Emotion_Gstreamer_Video *ev;
 
@@ -1023,7 +1023,7 @@ em_audio_channel_get(void *video)
 
 static const char *
 em_audio_channel_name_get(void *video,
 
 static const char *
 em_audio_channel_name_get(void *video,
-                         int   channel)
+                         int   channel __UNUSED__)
 {
    Emotion_Gstreamer_Video *ev;
 
 {
    Emotion_Gstreamer_Video *ev;
 
@@ -1109,7 +1109,7 @@ em_spu_channel_count(void *video)
 }
 
 static void
 }
 
 static void
-em_spu_channel_set(void *video, int channel)
+em_spu_channel_set(void *video, int channel __UNUSED__)
 {
    Emotion_Gstreamer_Video *ev;
 
 {
    Emotion_Gstreamer_Video *ev;
 
@@ -1127,7 +1127,7 @@ em_spu_channel_get(void *video)
 }
 
 static const char *
 }
 
 static const char *
-em_spu_channel_name_get(void *video, int channel)
+em_spu_channel_name_get(void *video, int channel __UNUSED__)
 {
    Emotion_Gstreamer_Video *ev;
 
 {
    Emotion_Gstreamer_Video *ev;
 
@@ -1136,7 +1136,7 @@ em_spu_channel_name_get(void *video, int channel)
 }
 
 static void
 }
 
 static void
-em_spu_channel_mute_set(void *video, int mute)
+em_spu_channel_mute_set(void *video, int mute __UNUSED__)
 {
    Emotion_Gstreamer_Video *ev;
 
 {
    Emotion_Gstreamer_Video *ev;
 
@@ -1163,7 +1163,7 @@ em_chapter_count(void *video)
 }
 
 static void
 }
 
 static void
-em_chapter_set(void *video, int chapter)
+em_chapter_set(void *video, int chapter __UNUSED__)
 {
    Emotion_Gstreamer_Video *ev;
 
 {
    Emotion_Gstreamer_Video *ev;
 
@@ -1181,7 +1181,7 @@ em_chapter_get(void *video)
 }
 
 static const char *
 }
 
 static const char *
-em_chapter_name_get(void *video, int chapter)
+em_chapter_name_get(void *video, int chapter __UNUSED__)
 {
    Emotion_Gstreamer_Video *ev;
 
 {
    Emotion_Gstreamer_Video *ev;
 
@@ -1191,7 +1191,7 @@ em_chapter_name_get(void *video, int chapter)
 }
 
 static void
 }
 
 static void
-em_speed_set(void *video, double speed)
+em_speed_set(void *video, double speed __UNUSED__)
 {
    Emotion_Gstreamer_Video *ev;
 
 {
    Emotion_Gstreamer_Video *ev;
 
@@ -1274,7 +1274,7 @@ module_open(Evas_Object           *obj,
 }
 
 static void
 }
 
 static void
-module_close(Emotion_Video_Module *module,
+module_close(Emotion_Video_Module *module __UNUSED__,
             void                 *video)
 {
    em_module.shutdown(video);
             void                 *video)
 {
    em_module.shutdown(video);
@@ -1434,7 +1434,7 @@ _free_metadata(Emotion_Gstreamer_Metadata *m)
 }
 
 static void
 }
 
 static void
-_em_buffer_read(void *data, void *buf, unsigned int nbyte)
+_em_buffer_read(void *data, void *buf, unsigned int nbyte __UNUSED__)
 {
    Emotion_Gstreamer_Video *ev;
    Emotion_Video_Sink      *vsink;
 {
    Emotion_Gstreamer_Video *ev;
    Emotion_Video_Sink      *vsink;
@@ -1444,7 +1444,11 @@ _em_buffer_read(void *data, void *buf, unsigned int nbyte)
    buffer = *((GstBuffer **)buf);
    _emotion_frame_new(ev->obj);
    vsink = (Emotion_Video_Sink *)eina_list_nth(ev->video_sinks, ev->video_sink_nbr);
    buffer = *((GstBuffer **)buf);
    _emotion_frame_new(ev->obj);
    vsink = (Emotion_Video_Sink *)eina_list_nth(ev->video_sinks, ev->video_sink_nbr);
-   if (vsink) _emotion_video_pos_update(ev->obj, ev->position, vsink->length_time);
+   if (vsink)
+     {
+       _emotion_video_pos_update(ev->obj, ev->position, vsink->length_time);
+       _emotion_frame_resize(ev->obj, vsink->width, vsink->height, ev->ratio);
+     }
 }
 
 static int
 }
 
 static int
index 6513b91..ccfe04e 100644 (file)
@@ -33,7 +33,7 @@ emotion_pipeline_pause(GstElement *pipeline)
 
 /* Send the video frame to the evas object */
 void
 
 /* Send the video frame to the evas object */
 void
-cb_handoff(GstElement *fakesrc,
+cb_handoff(GstElement *fakesrc __UNUSED__,
            GstBuffer  *buffer,
            GstPad     *pad,
            gpointer    user_data)
            GstBuffer  *buffer,
            GstPad     *pad,
            gpointer    user_data)
@@ -74,9 +74,9 @@ cb_handoff(GstElement *fakesrc,
 }
 
 void
 }
 
 void
-file_new_decoded_pad_cb(GstElement *decodebin,
+file_new_decoded_pad_cb(GstElement *decodebin __UNUSED__,
                         GstPad     *new_pad,
                         GstPad     *new_pad,
-                        gboolean    last,
+                        gboolean    last __UNUSED__,
                         gpointer    user_data)
 {
    Emotion_Gstreamer_Video *ev;
                         gpointer    user_data)
 {
    Emotion_Gstreamer_Video *ev;
index 48b9f00..465c2bb 100644 (file)
@@ -144,7 +144,7 @@ failure_dvdreadsrc:
 }
 
 static void
 }
 
 static void
-dvd_pad_added_cb(GstElement *dvddemuxer,
+dvd_pad_added_cb(GstElement *dvddemuxer __UNUSED__,
                  GObject    *new_pad,
                  gpointer    user_data)
 {
                  GObject    *new_pad,
                  gpointer    user_data)
 {
@@ -239,8 +239,8 @@ dvd_pad_added_cb(GstElement *dvddemuxer,
 }
 
 static void
 }
 
 static void
-dvd_no_more_pads_cb(GstElement *dvddemuxer,
-                    gpointer    user_data)
+dvd_no_more_pads_cb(GstElement *dvddemuxer __UNUSED__,
+                    gpointer    user_data __UNUSED__)
 {
   no_more_pads = 1;
 }
 {
   no_more_pads = 1;
 }
index f165d68..9e706ff 100644 (file)
@@ -1,4 +1,3 @@
-
 MAINTAINERCLEANFILES = Makefile.in
 
 AM_CPPFLAGS = \
 MAINTAINERCLEANFILES = Makefile.in
 
 AM_CPPFLAGS = \
@@ -8,22 +7,22 @@ AM_CPPFLAGS = \
 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
-@EVAS_CFLAGS@ \
-@ECORE_CFLAGS@ \
+@EMOTION_CPPFLAGS@ \
 @VLC_CFLAGS@
 
 @VLC_CFLAGS@
 
-if BUILD_VLC_MODULE
+if EMOTION_BUILD_VLC
+if !EMOTION_STATIC_BUILD_VLC
 
 pkgdir = $(libdir)/emotion
 
 pkg_LTLIBRARIES = vlc.la
 
 
 pkgdir = $(libdir)/emotion
 
 pkg_LTLIBRARIES = vlc.la
 
-vlc_la_SOURCES      = \
+vlc_la_SOURCES = \
 emotion_vlc.c \
 emotion_vlc.h
 emotion_vlc.c \
 emotion_vlc.h
-vlc_la_LIBADD       = @EVAS_LIBS@ @ECORE_LIBS@ @VLC_LIBS@ $(top_builddir)/src/lib/libemotion.la -lpthread
-vlc_la_LDFLAGS      = -no-undefined @lt_enable_auto_import@ -module -avoid-version
+vlc_la_LIBADD = @VLC_LIBS@ $(top_builddir)/src/lib/libemotion.la -lpthread
+vlc_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
 vlc_la_LIBTOOLFLAGS = --tag=disable-static
 vlc_la_LIBTOOLFLAGS = --tag=disable-static
-vlc_la_DEPENDENCIES = $(top_builddir)/config.h
 
 endif
 
 endif
+endif
index 7f64180..bf0c9cc 100644 (file)
@@ -3,8 +3,8 @@
  * code@ife-sit.info
  */
 
  * code@ife-sit.info
  */
 
-#ifndef EMOTION_VLC_C
-#define EMOTION_VLC_C
+#include <sys/types.h>
+#include <unistd.h>
 
 #include "Emotion.h"
 #include "emotion_private.h"
 
 #include "Emotion.h"
 #include "emotion_private.h"
@@ -1241,6 +1241,3 @@ EINA_MODULE_SHUTDOWN(vlc_module_shutdown);
 
 #endif
 
 
 #endif
 
-
-#endif /* EMOTION_VLC_C */
-
index 3dfcba7..a716243 100644 (file)
@@ -1,4 +1,3 @@
-
 MAINTAINERCLEANFILES = Makefile.in
 
 AM_CPPFLAGS = \
 MAINTAINERCLEANFILES = Makefile.in
 
 AM_CPPFLAGS = \
@@ -8,23 +7,23 @@ AM_CPPFLAGS = \
 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
-@EVAS_CFLAGS@ \
-@ECORE_CFLAGS@ \
+@EMOTION_CPPFLAGS@ \
 @XINE_CFLAGS@
 
 @XINE_CFLAGS@
 
-if BUILD_XINE_MODULE
+if EMOTION_BUILD_XINE
+if !EMOTION_STATIC_BUILD_XINE
 
 pkgdir = $(libdir)/emotion
 
 pkg_LTLIBRARIES = xine.la
 
 
 pkgdir = $(libdir)/emotion
 
 pkg_LTLIBRARIES = xine.la
 
-xine_la_SOURCES      = \
+xine_la_SOURCES = \
 emotion_xine.c \
 emotion_xine.h \
 emotion_xine_vo_out.c
 emotion_xine.c \
 emotion_xine.h \
 emotion_xine_vo_out.c
-xine_la_LIBADD       = @EVAS_LIBS@ @ECORE_LIBS@ @XINE_LIBS@ $(top_builddir)/src/lib/libemotion.la -lpthread
-xine_la_LDFLAGS      = -no-undefined @lt_enable_auto_import@ -module -avoid-version
+xine_la_LIBADD = @XINE_LIBS@ $(top_builddir)/src/lib/libemotion.la -lpthread
+xine_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
 xine_la_LIBTOOLFLAGS = --tag=disable-static
 xine_la_LIBTOOLFLAGS = --tag=disable-static
-xine_la_DEPENDENCIES = $(top_builddir)/config.h
 
 endif
 
 endif
+endif
index 15d1556..99b3139 100644 (file)
@@ -439,7 +439,7 @@ em_shutdown(void *ef)
 }
 
 static unsigned char
 }
 
 static unsigned char
-em_file_open(const char *file, Evas_Object *obj, void *ef)
+em_file_open(const char *file, Evas_Object *obj __UNUSED__, void *ef)
 {
    Emotion_Xine_Video *ev;
 
 {
    Emotion_Xine_Video *ev;
 
@@ -573,7 +573,7 @@ em_vis_get(void *ef)
 }
 
 static Eina_Bool
 }
 
 static Eina_Bool
-em_vis_supported(void *ef, Emotion_Vis vis)
+em_vis_supported(void *ef __UNUSED__, Emotion_Vis vis __UNUSED__)
 {
    return EINA_FALSE;
 }
 {
    return EINA_FALSE;
 }
@@ -665,7 +665,7 @@ em_video_data_size_get(void *ef, int *w, int *h)
 }
 
 static int
 }
 
 static int
-em_yuv_rows_get(void *ef, int w, int h, unsigned char **yrows, unsigned char **urows, unsigned char **vrows)
+em_yuv_rows_get(void *ef, int w __UNUSED__, int h, unsigned char **yrows, unsigned char **urows, unsigned char **vrows)
 {
    Emotion_Xine_Video *ev;
    volatile Emotion_Xine_Video_Frame *fr;
 {
    Emotion_Xine_Video *ev;
    volatile Emotion_Xine_Video_Frame *fr;
@@ -808,7 +808,7 @@ em_event_feed(void *ef, int event)
 }
 
 static void
 }
 
 static void
-em_event_mouse_button_feed(void *ef, int button, int x, int y)
+em_event_mouse_button_feed(void *ef, int button __UNUSED__, int x, int y)
 {
    Emotion_Xine_Video *ev;
    xine_event_t xine_event;
 {
    Emotion_Xine_Video *ev;
    xine_event_t xine_event;
@@ -883,7 +883,7 @@ em_video_channel_get(void *ef)
 }
 
 static const char *
 }
 
 static const char *
-em_video_channel_name_get(void *ef, int channel)
+em_video_channel_name_get(void *ef, int channel __UNUSED__)
 {
    Emotion_Xine_Video *ev;
    
 {
    Emotion_Xine_Video *ev;
    
@@ -1072,7 +1072,7 @@ em_chapter_count(void *ef)
 }
 
 static void
 }
 
 static void
-em_chapter_set(void *ef, int chapter)
+em_chapter_set(void *ef, int chapter __UNUSED__)
 {
    Emotion_Xine_Video *ev;
    
 {
    Emotion_Xine_Video *ev;
    
@@ -1089,7 +1089,7 @@ em_chapter_get(void *ef)
 }
 
 static const char *
 }
 
 static const char *
-em_chapter_name_get(void *ef, int chapter)
+em_chapter_name_get(void *ef, int chapter __UNUSED__)
 {
    Emotion_Xine_Video *ev;
    
 {
    Emotion_Xine_Video *ev;
    
@@ -1098,7 +1098,7 @@ em_chapter_name_get(void *ef, int chapter)
 }
 
 static void
 }
 
 static void
-em_speed_set(void *ef, double speed)
+em_speed_set(void *ef, double speed __UNUSED__)
 {
    Emotion_Xine_Video *ev;
    
 {
    Emotion_Xine_Video *ev;
    
@@ -1540,7 +1540,7 @@ module_open(Evas_Object *obj, const Emotion_Video_Module **module, void **video,
 }
 
 static void
 }
 
 static void
-module_close(Emotion_Video_Module *module, void *video)
+module_close(Emotion_Video_Module *module __UNUSED__, void *video)
 {
    em_module.shutdown(video);
 }
 {
    em_module.shutdown(video);
 }
index e3bf7d5..92f66eb 100644 (file)
@@ -111,7 +111,7 @@ plugin_info_t emotion_xine_plugin_info[] =
 
 /***************************************************************************/
 static void *
 
 /***************************************************************************/
 static void *
-_emotion_class_init(xine_t *xine, void *visual)
+_emotion_class_init(xine_t *xine, void *visual __UNUSED__)
 {
    Emotion_Class *cl;
    
 {
    Emotion_Class *cl;
    
@@ -225,7 +225,7 @@ _emotion_capabilities_get(vo_driver_t *vo_driver)
 
 /***************************************************************************/
 static int
 
 /***************************************************************************/
 static int
-_emotion_gui_data_exchange(vo_driver_t *vo_driver, int data_type, void *data)
+_emotion_gui_data_exchange(vo_driver_t *vo_driver, int data_type, void *data __UNUSED__)
 {
    Emotion_Driver *dv;
    
 {
    Emotion_Driver *dv;
    
@@ -292,7 +292,7 @@ _emotion_property_get(vo_driver_t *vo_driver, int property)
 }
 
 static void
 }
 
 static void
-_emotion_property_min_max_get(vo_driver_t *vo_driver, int property, int *min, int *max)
+_emotion_property_min_max_get(vo_driver_t *vo_driver, int property __UNUSED__, int *min, int *max)
 {
    Emotion_Driver *dv;
    
 {
    Emotion_Driver *dv;
    
@@ -339,7 +339,7 @@ _emotion_frame_dispose(vo_frame_t *vo_frame)
 }
 
 static void
 }
 
 static void
-_emotion_frame_format_update(vo_driver_t *vo_driver, vo_frame_t *vo_frame, uint32_t width, uint32_t height, double ratio, int format, int flags)
+_emotion_frame_format_update(vo_driver_t *vo_driver, vo_frame_t *vo_frame, uint32_t width, uint32_t height, double ratio, int format, int flags __UNUSED__)
 {
    Emotion_Driver *dv;
    Emotion_Frame *fr;
 {
    Emotion_Driver *dv;
    Emotion_Frame *fr;
@@ -468,7 +468,7 @@ _emotion_frame_display(vo_driver_t *vo_driver, vo_frame_t *vo_frame)
 }
 
 static void
 }
 
 static void
-_emotion_frame_field(vo_frame_t *vo_frame, int which_field)
+_emotion_frame_field(vo_frame_t *vo_frame, int which_field __UNUSED__)
 {
    Emotion_Frame *fr;
    
 {
    Emotion_Frame *fr;
    
@@ -510,7 +510,7 @@ _emotion_frame_data_unlock(Emotion_Frame *fr)
 
 /***************************************************************************/
 static void
 
 /***************************************************************************/
 static void
-_emotion_overlay_begin(vo_driver_t *vo_driver, vo_frame_t *vo_frame, int changed)
+_emotion_overlay_begin(vo_driver_t *vo_driver, vo_frame_t *vo_frame, int changed __UNUSED__)
 {
    Emotion_Driver *dv;
    Emotion_Frame *fr;
 {
    Emotion_Driver *dv;
    Emotion_Frame *fr;