modify spec to build and merge prev modification 00/52700/2 submit/tizen/20151127.020604 submit/tizen/20151127.065352
authorEunhae Choi <eunhae1.choi@samsung.com>
Thu, 26 Nov 2015 04:29:33 +0000 (13:29 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Thu, 26 Nov 2015 08:51:51 +0000 (17:51 +0900)
Change-Id: I8cdc43e6a576f0f795f00fcb9f1a358782079fab

.gbs.conf
Makefile.am
configure.ac
ext/pulse/pulsesink.c
ext/pulse/pulseutil.c
packaging/common.tar.bz2 [deleted file]
packaging/common.tar.gz [new file with mode: 0644]
packaging/gst-plugins-good.spec

index 1b88822..7302e56 100644 (file)
--- a/.gbs.conf
+++ b/.gbs.conf
@@ -1,3 +1,3 @@
 [general]
-upstream_branch = tizen
+upstream_branch = upstream/1.6
 upstream_tag = ${upstreamversion}
index 6c9786f..75af3fc 100644 (file)
@@ -1,9 +1,8 @@
-DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
+DISTCHECK_CONFIGURE_FLAGS=--disable-gtk-doc
 
 ALWAYS_SUBDIRS =               \
        gst sys ext             \
        tests                   \
-       docs                    \
        po                      \
        common                  \
        m4                      \
@@ -35,18 +34,14 @@ include $(top_srcdir)/common/release.mak
 include $(top_srcdir)/common/po.mak
 
 check-valgrind:
-       $(MAKE) -C tests/check check-valgrind
+       cd tests/check && make check-valgrind
 
 if HAVE_GST_CHECK
 check-torture:
-       $(MAKE) -C tests/check torture
-build-checks:
-       $(MAKE) -C tests/check build-checks
+       cd tests/check && make torture
 else
 check-torture:
        true
-build-checks:
-       true
 endif
 
 win32-update:
index d51b434..c06a45b 100644 (file)
@@ -575,29 +575,55 @@ dnl Check for X11
 translit(dnm, m, l) AM_CONDITIONAL(USE_X, true)
 AG_GST_CHECK_FEATURE(X, [X libraries and plugins],
                   [ximagesrc], [
-  PKG_CHECK_MODULES([X], [x11], [
-    HAVE_X="yes"
+  AG_GST_CHECK_X
+
+  if test "x$HAVE_X" = "xyes"
+  then
     dnl check for Xfixes
-    PKG_CHECK_MODULES([XFIXES], [ xfixes ], [
-      AC_DEFINE(HAVE_XFIXES, 1, [Defined if Xfixes is available])
-    ], [ HAVE_XFIXES="no" ])
+    PKG_CHECK_MODULES(XFIXES, xfixes, HAVE_XFIXES="yes", HAVE_XFIXES="no")
+    if test "x$HAVE_XFIXES" = "xyes"
+    then
+        XFIXES_CFLAGS="-DHAVE_XFIXES $XFIXES_CFLAGS"
+    fi
+    AC_SUBST(XFIXES_LIBS)
+    AC_SUBST(XFIXES_CFLAGS)
 
     dnl check for Xdamage
-    PKG_CHECK_MODULES([XDAMAGE], [ xdamage ], [
-      AC_DEFINE(HAVE_XDAMAGE, 1, [Defined if Xdamage is available])
-    ], [ HAVE_XDAMAGE="no" ])
-
-    dnl check for X Shm
-    PKG_CHECK_MODULES([XEXT], [ xext ], [
-      AC_CHECK_LIB([Xext], [ XShmAttach ], [
-        AC_DEFINE(HAVE_XSHM, 1, [Defined if XShm is available])
-        XSHM_LIBS="$XEXT_LIBS"
-        XSHM_CFLAGS="$XEXT_CFLAGS"
-      ], [ HAVE_XEXT="no" ] , [ $X_LIBS ])
-    ])
-    AC_SUBST(XSHM_LIBS)
-    AC_SUBST(XSHM_CFLAGS)
-  ], [ HAVE_X="no" ])
+    PKG_CHECK_MODULES(XDAMAGE, xdamage, HAVE_XDAMAGE="yes", HAVE_XDAMAGE="no")
+    if test "x$HAVE_XDAMAGE" = "xyes"
+    then
+        XDAMAGE_CFLAGS="-DHAVE_XDAMAGE $XDAMAGE_CFLAGS"
+    fi
+    AC_SUBST(XDAMAGE_LIBS)
+    AC_SUBST(XDAMAGE_CFLAGS)
+  fi
+])
+
+dnl FIXME: this should be rolled into the test above, it's just an additional
+dnl feature of the ximagesrc plug-in
+dnl This is the same as in gst-plugins-base
+dnl check for X Shm
+translit(dnm, m, l) AM_CONDITIONAL(USE_XSHM, true)
+AG_GST_CHECK_FEATURE(XSHM, [X Shared Memory extension], , [
+  if test x$HAVE_X = xyes; then
+    AC_CHECK_LIB(Xext, XShmAttach,
+                 HAVE_XSHM="yes", HAVE_XSHM="no",
+                 $X_LIBS)
+    if test "x$HAVE_XSHM" = "xyes"; then
+      XSHM_LIBS="-lXext"
+    else
+      dnl On AIX, it is in XextSam instead, but we still need -lXext
+      AC_CHECK_LIB(XextSam, XShmAttach,
+                   HAVE_XSHM="yes", HAVE_XSHM="no",
+                   $X_LIBS)
+      if test "x$HAVE_XSHM" = "xyes"; then
+        XSHM_LIBS="-lXext -lXextSam"
+      fi
+    fi
+  fi
+], ,[
+  AC_SUBST(HAVE_XSHM)
+  AC_SUBST(XSHM_LIBS)
 ])
 
 dnl *** ext plug-ins ***
@@ -889,6 +915,7 @@ AM_CONDITIONAL(USE_VPX, false)
 AM_CONDITIONAL(USE_WAVEFORM, false)
 AM_CONDITIONAL(USE_WAVPACK, false)
 AM_CONDITIONAL(USE_X, false)
+AM_CONDITIONAL(USE_XSHM, false)
 AM_CONDITIONAL(USE_ZLIB, false)
 
 fi dnl of EXT plugins
index c10eae9..e49500f 100644 (file)
@@ -75,7 +75,7 @@ GST_DEBUG_CATEGORY_EXTERN (pulse_debug);
 #define DEFAULT_MUTE            FALSE
 #define MAX_VOLUME              10.0
 #ifdef __TIZEN__
-#define DEFAULT_AUDIO_LATENCY   "high"
+#define DEFAULT_AUDIO_LATENCY   "mid"
 #endif /* __TIZEN__ */
 
 enum
@@ -560,9 +560,12 @@ gst_pulseringbuffer_open_device (GstAudioRingBuffer * buf)
     pa_context_set_subscribe_callback (pctx->context,
         gst_pulsering_context_subscribe_cb, pctx);
 
+    /* try to connect to the server and wait for completion, we don't want to
+     * autospawn a deamon */
     GST_LOG_OBJECT (psink, "connect to server %s",
         GST_STR_NULL (psink->server));
-    if (pa_context_connect (pctx->context, psink->server, 0, NULL) < 0)
+    if (pa_context_connect (pctx->context, psink->server,
+            PA_CONTEXT_NOAUTOSPAWN, NULL) < 0)
       goto connect_failed;
   } else {
     GST_INFO_OBJECT (psink,
@@ -890,39 +893,6 @@ gst_pulsering_wait_for_stream_ready (GstPulseSink * psink, pa_stream * stream)
   }
 }
 
-static void
-gst_pulsesink_sink_exist_cb (pa_context * c, const pa_sink_info * i, int eol,
-    void *userdata)
-{
-  gboolean *is_sink_exist = (gboolean *) userdata;
-
-  if (!i)
-    *is_sink_exist = FALSE;
-  else
-    *is_sink_exist = TRUE;
-  pa_threaded_mainloop_signal (mainloop, 0);
-}
-
-static gboolean
-gst_pulsesink_device_exist(pa_context *context, gchar *dev)
-{
-  pa_operation* o = NULL;
-  gboolean device_exist = FALSE;
-
-  if (!(o = pa_context_get_sink_info_by_name (context, dev,
-          gst_pulsesink_sink_exist_cb, &device_exist)))
-    return device_exist;
-
-  while (pa_operation_get_state (o) == PA_OPERATION_RUNNING) {
-    pa_threaded_mainloop_wait (mainloop);
-    if (!CONTEXT_OK (context))
-      break;
-  }
-
-  pa_operation_unref (o);
-  return device_exist;
-}
-
 
 /* This method should create a new stream of the given @spec. No playback should
  * start yet so we start in the corked state. */
@@ -2190,12 +2160,6 @@ gst_pulsesink_create_probe_stream (GstPulseSink * psink,
 
   pa_stream_set_state_callback (stream, gst_pulsering_stream_state_cb, pbuf);
 
-  if (psink->device && !gst_pulsesink_device_exist (pbuf->context, psink->device))
-  {
-    GST_WARNING_OBJECT (psink, "Sink:%s is not exist, set sink name to NULL", psink->device);
-    g_free (psink->device);
-    psink->device = NULL;
-  }
   if (pa_stream_connect_playback (stream, psink->device, NULL, flags, NULL,
           NULL) < 0)
     goto error;
index 3ce5a63..f4f7c97 100644 (file)
@@ -358,9 +358,11 @@ make_proplist_item (GQuark field_id, const GValue * value, gpointer user_data)
     case G_TYPE_STRING:
       pa_proplist_sets (p, prop_id, g_value_get_string (value));
       break;
+#ifdef __TIZEN__
     case G_TYPE_INT:
       pa_proplist_setf (p, prop_id, "%d", g_value_get_int (value));
       break;
+#endif
     default:
       GST_WARNING ("unmapped property type %s", G_VALUE_TYPE_NAME (value));
       break;
diff --git a/packaging/common.tar.bz2 b/packaging/common.tar.bz2
deleted file mode 100644 (file)
index 8588f6f..0000000
Binary files a/packaging/common.tar.bz2 and /dev/null differ
diff --git a/packaging/common.tar.gz b/packaging/common.tar.gz
new file mode 100644 (file)
index 0000000..f3d1043
Binary files /dev/null and b/packaging/common.tar.gz differ
index 020aa8f..bb4e978 100644 (file)
@@ -1,15 +1,15 @@
-%bcond_with x
+#%bcond_with x
 %define gst_branch 1.0
 
 Name:           gst-plugins-good
-Version:        1.4.1
-Release:        5
+Version:        1.6.1
+Release:        1
 License:        LGPL-2.1+
 Summary:        GStreamer Streaming-Media Framework Plug-Ins
 Url:            http://gstreamer.freedesktop.org/
 Group:          Multimedia/Framework
 Source:         http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-%{version}.tar.xz
-Source100:      common.tar.bz2
+Source100:      common.tar.gz
 BuildRequires:  gcc-c++
 BuildRequires:  gettext-tools
 BuildRequires:  glib2-devel >= 2.31.14
@@ -65,7 +65,7 @@ This package provides complementary plugins for
 %{name}.
 
 %prep
-%setup -q
+%setup -q -n gst-plugins-good-%{version}
 %setup -q -T -D -a 100
 
 %build
@@ -83,7 +83,7 @@ export CFLAGS+=" -DGST_EXT_V4L2SRC_MODIFIED"
        --disable-gtk-doc\
        --with-gtk=3.0\
        --enable-experimental
-make %{?_smp_mflags}
+make %{?_smp_mflags} CFLAGS+="-Wno-error" CXXFLAGS+="-Wno-error"
 
 %install
 %make_install