Remove gsettings plugin which was never ported
authorTim-Philipp Müller <tim@centricular.com>
Sun, 31 Jan 2016 19:04:20 +0000 (19:04 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Sun, 31 Jan 2016 19:07:46 +0000 (19:07 +0000)
Don't think we need this any longer or want to
support it, and clearly no one has been missing
it all these years either, so let's just get rid
of it.

24 files changed:
.gitignore
configure.ac
docs/plugins/gst-plugins-bad-plugins.args
docs/plugins/gst-plugins-bad-plugins.interfaces
ext/Makefile.am
ext/gsettings/Makefile.am [deleted file]
ext/gsettings/gstgsettings.h [deleted file]
ext/gsettings/gstgsettingsaudiosink.c [deleted file]
ext/gsettings/gstgsettingsaudiosink.h [deleted file]
ext/gsettings/gstgsettingsaudiosrc.c [deleted file]
ext/gsettings/gstgsettingsaudiosrc.h [deleted file]
ext/gsettings/gstgsettingsvideosink.c [deleted file]
ext/gsettings/gstgsettingsvideosink.h [deleted file]
ext/gsettings/gstgsettingsvideosrc.c [deleted file]
ext/gsettings/gstgsettingsvideosrc.h [deleted file]
ext/gsettings/gstswitchsink.c [deleted file]
ext/gsettings/gstswitchsink.h [deleted file]
ext/gsettings/gstswitchsrc.c [deleted file]
ext/gsettings/gstswitchsrc.h [deleted file]
ext/gsettings/org.freedesktop.gstreamer.default-elements.gschema.xml.in [deleted file]
ext/gsettings/plugin.c [deleted file]
m4/gsettings.m4 [deleted file]
po/POTFILES.in
tests/check/Makefile.am

index 1b853fc..726d929 100644 (file)
@@ -47,10 +47,6 @@ Makefile
 tmp-orc.c
 gst*orc.h
 
-/ext/gsettings/org.freedesktop.gstreamer.default-elements.gschema.xml
-/ext/gsettings/org.freedesktop.gstreamer-0.10.default-elements.gschema.valid
-/ext/gsettings/org.freedesktop.gstreamer-0.10.default-elements.gschema.xml
-
 /tests/check/orc
 /tests/check/elements/videoframe-audiolevel
 /tests/examples/codecparsers/parse-jpeg
index bb1e270..9216987 100644 (file)
@@ -451,7 +451,6 @@ GST_PLUGINS_NONPORTED=" cdxaparse \
  videomeasure \
  linsys \
  apexsink dc1394 \
- gsettings \
  musepack nas sdl timidity \
  wininet \
  xvid lv2 sndio libvisual"
@@ -3185,15 +3184,6 @@ AG_GST_CHECK_FEATURE(SPANDSP, [Spandsp], spandsp, [
 AC_SUBST(SPANDSP_CFLAGS)
 AC_SUBST(SPANDSP_LIBS)
 
-dnl *** GSettings ***
-translit(dnm, m, l) AM_CONDITIONAL(USE_GSETTINGS, true)
-AG_GST_CHECK_FEATURE(GSETTINGS, [GSettings plugin], gsettings, [
-  AG_GST_PKG_CHECK_MODULES(GSETTINGS, gio-2.0 >= 2.25.0)
-  if test "x$HAVE_GSETTINGS" = "xyes"; then
-    GLIB_GSETTINGS
-  fi
-])
-
 dnl *** sndio ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_SNDIO, true)
 AG_GST_CHECK_FEATURE(SNDIO, [sndio audio], sndio, [
@@ -3340,7 +3330,6 @@ AM_CONDITIONAL(USE_SPANDSP, false)
 AM_CONDITIONAL(USE_SPC, false)
 AM_CONDITIONAL(USE_SRTP, false)
 AM_CONDITIONAL(USE_GME, false)
-AM_CONDITIONAL(USE_GSETTINGS, false)
 AM_CONDITIONAL(USE_XVID, false)
 AM_CONDITIONAL(USE_DVB, false)
 AM_CONDITIONAL(USE_WININET, false)
@@ -3658,8 +3647,6 @@ ext/sndio/Makefile
 ext/srtp/Makefile
 ext/teletextdec/Makefile
 ext/gme/Makefile
-ext/gsettings/Makefile
-ext/gsettings/org.freedesktop.gstreamer.default-elements.gschema.xml
 ext/spc/Makefile
 ext/timidity/Makefile
 ext/webp/Makefile
index 3c6b35b..0242d36 100644 (file)
 </ARG>
 
 <ARG>
-<NAME>GstGSettingsAudioSink::profile</NAME>
-<TYPE>GstGSettingsAudioSinkProfile</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Profile</NICK>
-<BLURB>Profile.</BLURB>
-<DEFAULT>Sound Events</DEFAULT>
-</ARG>
-
-<ARG>
 <NAME>Gstsolarize::silent</NAME>
 <TYPE>gboolean</TYPE>
 <RANGE></RANGE>
index 6b16fd5..263e5bc 100644 (file)
@@ -46,12 +46,6 @@ GstGLStereoMix GstChildProxy
 GstGLVideoMixer GstChildProxy
 GstGLVideoMixerBin GstChildProxy
 GstGSMEnc GstPreset
-GstGSettingsAudioSink GstChildProxy
-GstGSettingsAudioSrc GstChildProxy
-GstGSettingsSwitchSink GstChildProxy
-GstGSettingsSwitchSrc GstChildProxy
-GstGSettingsVideoSink GstChildProxy
-GstGSettingsVideoSrc GstChildProxy
 GstGtkBaseSink GstNavigation
 GstGtkGLSink GstNavigation
 GstGtkSink GstNavigation
index 33ddba7..15f2708 100644 (file)
@@ -382,12 +382,6 @@ else
 TELETEXTDEC_DIR=
 endif
 
-if USE_GSETTINGS
-GSETTINGS_DIR=gsettings
-else
-GSETTINGS_DIR=
-endif
-
 if USE_XVID
 XVID_DIR=xvid
 else
@@ -454,7 +448,6 @@ SUBDIRS=\
        $(FAAD_DIR) \
        $(FLITE_DIR) \
        $(FLUIDSYNTH_DIR) \
-       $(GSETTINGS_DIR) \
        $(GSM_DIR) \
        $(G729_DIR) \
        $(KATE_DIR) \
@@ -518,7 +511,6 @@ DIST_SUBDIRS = \
        faad \
        flite \
        fluidsynth \
-       gsettings \
        gsm \
        hls \
        ladspa \
diff --git a/ext/gsettings/Makefile.am b/ext/gsettings/Makefile.am
deleted file mode 100644 (file)
index 4cba8ac..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-gsettings_SCHEMAS = org.freedesktop.gstreamer-@GST_API_VERSION@.default-elements.gschema.xml
-
-org.freedesktop.gstreamer-@GST_API_VERSION@.default-elements.gschema.xml: org.freedesktop.gstreamer.default-elements.gschema.xml
-       cp org.freedesktop.gstreamer.default-elements.gschema.xml org.freedesktop.gstreamer-@GST_API_VERSION@.default-elements.gschema.xml
-
-if USE_GSETTINGS
-@GSETTINGS_RULES@
-endif
-
-plugin_LTLIBRARIES = libgstgsettingselements.la
-
-libgstgsettingselements_la_SOURCES = \
-        gstgsettingsaudiosink.c \
-        gstgsettingsaudiosrc.c \
-        gstgsettingsvideosink.c \
-        gstgsettingsvideosrc.c \
-        gstswitchsink.c \
-        gstswitchsrc.c \
-       plugin.c
-
-libgstgsettingselements_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS) $(GSETTINGS_CFLAGS) $(DIR_CFLAGS) \
-       -DGstSwitchSrc=GstGSettingsSwitchSrc \
-       -DGstSwitchSrcClass=GstGSettingsSwitchSrcClass \
-       -DGstSwitchSink=GstGSettingsSwitchSink \
-       -DGstSwitchSinkClass=GstGSettingsSwitchSinkClass
-libgstgsettingselements_la_LIBADD = $(GST_LIBS) $(GSETTINGS_LIBS)
-libgstgsettingselements_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstgsettingselements_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-noinst_HEADERS = \
-        gstgsettingsaudiosink.h \
-        gstgsettingsaudiosrc.h \
-        gstgsettingsvideosink.h \
-        gstgsettingsvideosrc.h \
-        gstswitchsink.h \
-        gstswitchsrc.h \
-       gstgsettings.h
-
-EXTRA_DIST = org.freedesktop.gstreamer.default-elements.gschema.xml
-
-CLEANFILES = $(gsettings_SCHEMAS)
diff --git a/ext/gsettings/gstgsettings.h b/ext/gsettings/gstgsettings.h
deleted file mode 100644 (file)
index a49aee7..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/* GStreamer
- * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef __GST_GSETTINGS_H__
-#define __GST_GSETTINGS_H__
-
-#include <gst/gst.h>
-
-G_BEGIN_DECLS
-
-#define GST_GSETTINGS_SCHEMA "org.freedesktop.gstreamer-0.10.default-elements"
-#define GST_GSETTINGS_PATH "/desktop/gstreamer/0.10/default-elements/"
-
-#define GST_GSETTINGS_KEY_SOUNDS_AUDIOSINK "sounds-audiosink"
-#define GST_GSETTINGS_KEY_MUSIC_AUDIOSINK "music-audiosink"
-#define GST_GSETTINGS_KEY_CHAT_AUDIOSINK "chat-audiosink"
-#define GST_GSETTINGS_KEY_AUDIOSRC "audiosrc"
-#define GST_GSETTINGS_KEY_VIDEOSINK "videosink"
-#define GST_GSETTINGS_KEY_VIDEOSRC "videosrc"
-#define GST_GSETTINGS_KEY_VISUALIZATION "visualization"
-
-G_END_DECLS
-
-#endif /* __GST_GSETTINGS_H__ */
diff --git a/ext/gsettings/gstgsettingsaudiosink.c b/ext/gsettings/gstgsettingsaudiosink.c
deleted file mode 100644 (file)
index f080cb5..0000000
+++ /dev/null
@@ -1,355 +0,0 @@
-/* GStreamer
- * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-/**
- * SECTION:element-gsettingsaudiosink
- *
- * This element outputs sound to the audiosink that has been configured in
- * GSettings by the user.
- * 
- * <refsect2>
- * <title>Example launch line</title>
- * |[
- * gst-launch audiotestsrc ! audioconvert ! audioresample ! gsettingsaudiosink
- * ]| Play on configured audiosink
- * </refsect2>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gst/gst.h>
-#include <gst/glib-compat-private.h>
-#include <string.h>
-
-#include "gstgsettingsaudiosink.h"
-#include "gstgsettings.h"
-
-#define GST_TYPE_GSETTINGS_AUDIOSINK_PROFILE (gst_gsettings_audiosink_profile_get_type())
-static GType
-gst_gsettings_audiosink_profile_get_type (void)
-{
-  static GType gsettings_profile_type = 0;
-  static const GEnumValue gsettings_profiles[] = {
-    {GST_GSETTINGS_AUDIOSINK_PROFILE_SOUNDS, "Sound Events", "sounds"},
-    {GST_GSETTINGS_AUDIOSINK_PROFILE_MUSIC, "Music and Movies (default)",
-        "music"},
-    {GST_GSETTINGS_AUDIOSINK_PROFILE_CHAT, "Audio/Video Conferencing", "chat"},
-    {0, NULL, NULL}
-  };
-
-  if (!gsettings_profile_type) {
-    gsettings_profile_type =
-        g_enum_register_static ("GstGSettingsAudioSinkProfile",
-        gsettings_profiles);
-  }
-  return gsettings_profile_type;
-}
-
-enum
-{
-  PROP_0,
-  PROP_PROFILE
-};
-
-GST_BOILERPLATE (GstGSettingsAudioSink, gst_gsettings_audio_sink, GstSwitchSink,
-    GST_TYPE_SWITCH_SINK);
-
-static gboolean
-gst_gsettings_audio_sink_change_child (GstGSettingsAudioSink * sink)
-{
-  const gchar *key = NULL;
-  gchar *new_string;
-  GError *err = NULL;
-  GstElement *new_kid;
-
-  GST_OBJECT_LOCK (sink);
-  switch (sink->profile) {
-    case GST_GSETTINGS_AUDIOSINK_PROFILE_SOUNDS:
-      key = GST_GSETTINGS_KEY_SOUNDS_AUDIOSINK;
-      break;
-    case GST_GSETTINGS_AUDIOSINK_PROFILE_MUSIC:
-      key = GST_GSETTINGS_KEY_MUSIC_AUDIOSINK;
-      break;
-    case GST_GSETTINGS_AUDIOSINK_PROFILE_CHAT:
-      key = GST_GSETTINGS_KEY_CHAT_AUDIOSINK;
-      break;
-    default:
-      break;
-  }
-
-  new_string = g_settings_get_string (sink->settings, key);
-
-  if (new_string != NULL && sink->gsettings_str != NULL &&
-      (strlen (new_string) == 0 ||
-          strcmp (sink->gsettings_str, new_string) == 0)) {
-    g_free (new_string);
-    GST_DEBUG_OBJECT (sink,
-        "GSettings key was updated, but it didn't change. Ignoring");
-    GST_OBJECT_UNLOCK (sink);
-    return TRUE;
-  }
-  GST_OBJECT_UNLOCK (sink);
-
-  GST_DEBUG_OBJECT (sink, "GSettings key changed from '%s' to '%s'",
-      GST_STR_NULL (sink->gsettings_str), GST_STR_NULL (new_string));
-
-  if (new_string) {
-    new_kid = gst_parse_bin_from_description (new_string, TRUE, &err);
-    if (err) {
-      GST_ERROR_OBJECT (sink, "error creating bin '%s': %s", new_string,
-          err->message);
-      g_error_free (err);
-    }
-  } else {
-    new_kid = NULL;
-  }
-
-  if (new_kid == NULL) {
-    GST_ELEMENT_ERROR (sink, LIBRARY, SETTINGS, (NULL),
-        ("Failed to render audio sink from GSettings"));
-    goto fail;
-  }
-
-  if (!gst_switch_sink_set_child (GST_SWITCH_SINK (sink), new_kid)) {
-    GST_WARNING_OBJECT (sink, "Failed to update child element");
-    goto fail;
-  }
-
-  g_free (sink->gsettings_str);
-  sink->gsettings_str = new_string;
-
-  return TRUE;
-
-fail:
-  g_free (new_string);
-  return FALSE;
-}
-
-static gboolean
-gst_gsettings_audio_sink_switch_profile (GstGSettingsAudioSink * sink,
-    GstGSettingsAudioSinkProfile profile)
-{
-  if (sink->settings == NULL)
-    return TRUE;
-
-  GST_OBJECT_LOCK (sink);
-  sink->profile = profile;
-  GST_OBJECT_UNLOCK (sink);
-
-  return gst_gsettings_audio_sink_change_child (sink);
-}
-
-static void
-on_changed (GSettings * settings, gchar * key, GstGSettingsAudioSink * sink)
-{
-  gboolean changed = FALSE;
-
-  if (!g_str_has_suffix (key, "audiosink"))
-    return;
-
-  GST_OBJECT_LOCK (sink);
-  if ((sink->profile == GST_GSETTINGS_AUDIOSINK_PROFILE_SOUNDS &&
-          g_str_equal (key, GST_GSETTINGS_KEY_SOUNDS_AUDIOSINK)) ||
-      (sink->profile == GST_GSETTINGS_AUDIOSINK_PROFILE_MUSIC &&
-          g_str_equal (key, GST_GSETTINGS_KEY_MUSIC_AUDIOSINK)) ||
-      (sink->profile == GST_GSETTINGS_AUDIOSINK_PROFILE_CHAT &&
-          g_str_equal (key, GST_GSETTINGS_KEY_CHAT_AUDIOSINK)))
-    changed = TRUE;
-  GST_OBJECT_UNLOCK (sink);
-
-  if (changed)
-    gst_gsettings_audio_sink_change_child (sink);
-}
-
-static gboolean
-gst_gsettings_audio_sink_start (GstGSettingsAudioSink * sink)
-{
-  GError *err = NULL;
-  GThread *thread;
-
-  sink->loop = g_main_loop_new (sink->context, FALSE);
-
-  thread =
-      g_thread_create ((GThreadFunc) g_main_loop_run, sink->loop, FALSE, &err);
-  if (!thread) {
-    GST_ELEMENT_ERROR (sink, CORE, STATE_CHANGE, (NULL),
-        ("Failed to create new thread: %s", err->message));
-    g_error_free (err);
-    g_main_loop_unref (sink->loop);
-    sink->loop = NULL;
-    return FALSE;
-  }
-
-  g_main_context_push_thread_default (sink->context);
-  sink->settings = g_settings_new (GST_GSETTINGS_SCHEMA);
-  sink->changed_id =
-      g_signal_connect_data (G_OBJECT (sink->settings), "changed",
-      G_CALLBACK (on_changed), gst_object_ref (sink),
-      (GClosureNotify) gst_object_unref, 0);
-  g_main_context_pop_thread_default (sink->context);
-
-  return TRUE;
-}
-
-static gboolean
-gst_gsettings_audio_sink_reset (GstGSettingsAudioSink * sink)
-{
-  gst_switch_sink_set_child (GST_SWITCH_SINK (sink), NULL);
-
-  if (sink->changed_id) {
-    g_signal_handler_disconnect (sink->settings, sink->changed_id);
-    sink->changed_id = 0;
-  }
-
-  if (sink->loop) {
-    g_main_loop_quit (sink->loop);
-    g_main_loop_unref (sink->loop);
-    sink->loop = NULL;
-  }
-
-  if (sink->settings) {
-    g_object_unref (sink->settings);
-    sink->settings = NULL;
-  }
-
-  GST_OBJECT_LOCK (sink);
-  g_free (sink->gsettings_str);
-  sink->gsettings_str = NULL;
-  GST_OBJECT_UNLOCK (sink);
-
-  return TRUE;
-}
-
-static void
-gst_gsettings_audio_sink_finalize (GObject * object)
-{
-  GstGSettingsAudioSink *sink = GST_GSETTINGS_AUDIO_SINK (object);
-
-  g_free (sink->gsettings_str);
-  g_main_context_unref (sink->context);
-
-  GST_CALL_PARENT (G_OBJECT_CLASS, finalize, ((GObject *) (sink)));
-}
-
-static void
-gst_gsettings_audio_sink_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec)
-{
-  GstGSettingsAudioSink *sink = GST_GSETTINGS_AUDIO_SINK (object);
-
-  switch (prop_id) {
-    case PROP_PROFILE:
-      gst_gsettings_audio_sink_switch_profile (sink, g_value_get_enum (value));
-      break;
-    default:
-      break;
-  }
-}
-
-static void
-gst_gsettings_audio_sink_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec)
-{
-  GstGSettingsAudioSink *sink = GST_GSETTINGS_AUDIO_SINK (object);
-
-  switch (prop_id) {
-    case PROP_PROFILE:
-      g_value_set_enum (value, sink->profile);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static GstStateChangeReturn
-gst_gsettings_audio_sink_change_state (GstElement * element,
-    GstStateChange transition)
-{
-  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
-  GstGSettingsAudioSink *sink = GST_GSETTINGS_AUDIO_SINK (element);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_NULL_TO_READY:
-      if (!gst_gsettings_audio_sink_start (sink))
-        return GST_STATE_CHANGE_FAILURE;
-
-      if (!gst_gsettings_audio_sink_change_child (sink)) {
-        gst_gsettings_audio_sink_reset (sink);
-        return GST_STATE_CHANGE_FAILURE;
-      }
-      break;
-    default:
-      break;
-  }
-
-  ret = GST_CALL_PARENT_WITH_DEFAULT (GST_ELEMENT_CLASS, change_state,
-      (element, transition), GST_STATE_CHANGE_SUCCESS);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_READY_TO_NULL:
-      gst_gsettings_audio_sink_reset (sink);
-      break;
-    default:
-      break;
-  }
-
-  return ret;
-}
-
-static void
-gst_gsettings_audio_sink_init (GstGSettingsAudioSink * sink,
-    GstGSettingsAudioSinkClass * g_class)
-{
-  sink->context = g_main_context_new ();
-  gst_gsettings_audio_sink_reset (sink);
-
-  sink->profile = GST_GSETTINGS_AUDIOSINK_PROFILE_MUSIC;
-}
-
-static void
-gst_gsettings_audio_sink_base_init (gpointer klass)
-{
-  GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
-
-  gst_element_class_set_static_metadata (eklass, "GSettings audio sink",
-      "Sink/Audio",
-      "Audio sink embedding the GSettings preferences for audio output",
-      "Sebastian Dröge <sebastian.droege@collabora.co.uk>");
-}
-
-static void
-gst_gsettings_audio_sink_class_init (GstGSettingsAudioSinkClass * klass)
-{
-  GObjectClass *oklass = G_OBJECT_CLASS (klass);
-  GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
-
-  oklass->finalize = gst_gsettings_audio_sink_finalize;
-  oklass->set_property = gst_gsettings_audio_sink_set_property;
-  oklass->get_property = gst_gsettings_audio_sink_get_property;
-
-  g_object_class_install_property (oklass, PROP_PROFILE,
-      g_param_spec_enum ("profile", "Profile", "Profile",
-          GST_TYPE_GSETTINGS_AUDIOSINK_PROFILE,
-          GST_GSETTINGS_AUDIOSINK_PROFILE_SOUNDS,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  eklass->change_state = gst_gsettings_audio_sink_change_state;
-}
diff --git a/ext/gsettings/gstgsettingsaudiosink.h b/ext/gsettings/gstgsettingsaudiosink.h
deleted file mode 100644 (file)
index 7a15190..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/* GStreamer
- * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef __GST_GSETTINGS_AUDIO_SINK_H__
-#define __GST_GSETTINGS_AUDIO_SINK_H__
-
-#include <gst/gst.h>
-#include <gio/gio.h>
-#include "gstswitchsink.h"
-
-G_BEGIN_DECLS
-
-#define GST_TYPE_GSETTINGS_AUDIO_SINK \
-  (gst_gsettings_audio_sink_get_type ())
-#define GST_GSETTINGS_AUDIO_SINK(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GSETTINGS_AUDIO_SINK, \
-                               GstGSettingsAudioSink))
-#define GST_GSETTINGS_AUDIO_SINK_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GSETTINGS_AUDIO_SINK, \
-                            GstGSettingsAudioSinkClass))
-#define GST_IS_GSETTINGS_AUDIO_SINK(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GSETTINGS_AUDIO_SINK))
-#define GST_IS_GSETTINGS_AUDIO_SINK_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GSETTINGS_AUDIO_SINK))
-
-typedef enum
-{
-  GST_GSETTINGS_AUDIOSINK_PROFILE_SOUNDS,
-  GST_GSETTINGS_AUDIOSINK_PROFILE_MUSIC,
-  GST_GSETTINGS_AUDIOSINK_PROFILE_CHAT,
-  GST_GSETTINGS_AUDIOSINK_PROFILE_NONE /* Internal value only */
-} GstGSettingsAudioSinkProfile;
-
-typedef struct _GstGSettingsAudioSink {
-  GstSwitchSink parent;
-
-  GSettings *settings;
-
-  GMainContext *context;
-  GMainLoop *loop;
-  gulong changed_id;
-
-  GstGSettingsAudioSinkProfile profile;
-  gchar *gsettings_str;
-} GstGSettingsAudioSink;
-
-typedef struct _GstGSettingsAudioSinkClass {
-  GstSwitchSinkClass parent_class;
-} GstGSettingsAudioSinkClass;
-
-GType   gst_gsettings_audio_sink_get_type   (void);
-
-G_END_DECLS
-
-#endif /* __GST_GSETTINGS_AUDIO_SINK_H__ */
diff --git a/ext/gsettings/gstgsettingsaudiosrc.c b/ext/gsettings/gstgsettingsaudiosrc.c
deleted file mode 100644 (file)
index ccd7c79..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-/* GStreamer
- * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-/**
- * SECTION:element-gsettingsaudiosrc
- *
- * This element outputs sound to the audiosrc that has been configured in
- * GSettings by the user.
- * 
- * <refsect2>
- * <title>Example launch line</title>
- * |[
- * gst-launch gsettingsaudiosrc ! audioconvert ! audioresample ! autoaudiosink
- * ]| Play from configured audiosrc
- * </refsect2>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gst/gst.h>
-#include <gst/glib-compat-private.h>
-#include <string.h>
-
-#include "gstgsettingsaudiosrc.h"
-#include "gstgsettings.h"
-
-GST_BOILERPLATE (GstGSettingsAudioSrc, gst_gsettings_audio_src, GstSwitchSrc,
-    GST_TYPE_SWITCH_SRC);
-
-static gboolean
-gst_gsettings_audio_src_change_child (GstGSettingsAudioSrc * src)
-{
-  gchar *new_string;
-  GError *err = NULL;
-  GstElement *new_kid;
-
-  GST_OBJECT_LOCK (src);
-  new_string =
-      g_settings_get_string (src->settings, GST_GSETTINGS_KEY_AUDIOSRC);
-
-  if (new_string != NULL && src->gsettings_str != NULL &&
-      (strlen (new_string) == 0 ||
-          strcmp (src->gsettings_str, new_string) == 0)) {
-    g_free (new_string);
-    GST_DEBUG_OBJECT (src,
-        "GSettings key was updated, but it didn't change. Ignoring");
-    GST_OBJECT_UNLOCK (src);
-    return TRUE;
-  }
-  GST_OBJECT_UNLOCK (src);
-
-  GST_DEBUG_OBJECT (src, "GSettings key changed from '%s' to '%s'",
-      GST_STR_NULL (src->gsettings_str), GST_STR_NULL (new_string));
-
-  if (new_string) {
-    new_kid = gst_parse_bin_from_description (new_string, TRUE, &err);
-    if (err) {
-      GST_ERROR_OBJECT (src, "error creating bin '%s': %s", new_string,
-          err->message);
-      g_error_free (err);
-    }
-  } else {
-    new_kid = NULL;
-  }
-
-  if (new_kid == NULL) {
-    GST_ELEMENT_ERROR (src, LIBRARY, SETTINGS, (NULL),
-        ("Failed to render audio src from GSettings"));
-    goto fail;
-  }
-
-  if (!gst_switch_src_set_child (GST_SWITCH_SRC (src), new_kid)) {
-    GST_WARNING_OBJECT (src, "Failed to update child element");
-    goto fail;
-  }
-
-  g_free (src->gsettings_str);
-  src->gsettings_str = new_string;
-
-  return TRUE;
-
-fail:
-  g_free (new_string);
-  return FALSE;
-}
-
-static void
-on_changed (GSettings * settings, gchar * key, GstGSettingsAudioSrc * src)
-{
-  if (!g_str_equal (key, "audiosrc"))
-    return;
-
-  gst_gsettings_audio_src_change_child (src);
-}
-
-static gboolean
-gst_gsettings_audio_src_start (GstGSettingsAudioSrc * src)
-{
-  GError *err = NULL;
-  GThread *thread;
-
-  src->loop = g_main_loop_new (src->context, FALSE);
-
-  thread =
-      g_thread_create ((GThreadFunc) g_main_loop_run, src->loop, FALSE, &err);
-  if (!thread) {
-    GST_ELEMENT_ERROR (src, CORE, STATE_CHANGE, (NULL),
-        ("Failed to create new thread: %s", err->message));
-    g_error_free (err);
-    g_main_loop_unref (src->loop);
-    src->loop = NULL;
-    return FALSE;
-  }
-
-  g_main_context_push_thread_default (src->context);
-  src->settings = g_settings_new (GST_GSETTINGS_SCHEMA);
-  src->changed_id =
-      g_signal_connect_data (G_OBJECT (src->settings), "changed",
-      G_CALLBACK (on_changed), gst_object_ref (src),
-      (GClosureNotify) gst_object_unref, 0);
-  g_main_context_pop_thread_default (src->context);
-
-  return TRUE;
-}
-
-static gboolean
-gst_gsettings_audio_src_reset (GstGSettingsAudioSrc * src)
-{
-  gst_switch_src_set_child (GST_SWITCH_SRC (src), NULL);
-
-  if (src->changed_id) {
-    g_signal_handler_disconnect (src->settings, src->changed_id);
-    src->changed_id = 0;
-  }
-
-  if (src->loop) {
-    g_main_loop_quit (src->loop);
-    g_main_loop_unref (src->loop);
-    src->loop = NULL;
-  }
-
-  if (src->settings) {
-    g_object_unref (src->settings);
-    src->settings = NULL;
-  }
-
-  GST_OBJECT_LOCK (src);
-  g_free (src->gsettings_str);
-  src->gsettings_str = NULL;
-  GST_OBJECT_UNLOCK (src);
-
-  return TRUE;
-}
-
-static void
-gst_gsettings_audio_src_finalize (GObject * object)
-{
-  GstGSettingsAudioSrc *src = GST_GSETTINGS_AUDIO_SRC (object);
-
-  g_free (src->gsettings_str);
-  g_main_context_unref (src->context);
-
-  GST_CALL_PARENT (G_OBJECT_CLASS, finalize, ((GObject *) (src)));
-}
-
-static GstStateChangeReturn
-gst_gsettings_audio_src_change_state (GstElement * element,
-    GstStateChange transition)
-{
-  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
-  GstGSettingsAudioSrc *src = GST_GSETTINGS_AUDIO_SRC (element);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_NULL_TO_READY:
-      if (!gst_gsettings_audio_src_start (src))
-        return GST_STATE_CHANGE_FAILURE;
-
-      if (!gst_gsettings_audio_src_change_child (src)) {
-        gst_gsettings_audio_src_reset (src);
-        return GST_STATE_CHANGE_FAILURE;
-      }
-      break;
-    default:
-      break;
-  }
-
-  ret = GST_CALL_PARENT_WITH_DEFAULT (GST_ELEMENT_CLASS, change_state,
-      (element, transition), GST_STATE_CHANGE_SUCCESS);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_READY_TO_NULL:
-      gst_gsettings_audio_src_reset (src);
-      break;
-    default:
-      break;
-  }
-
-  return ret;
-}
-
-static void
-gst_gsettings_audio_src_init (GstGSettingsAudioSrc * src,
-    GstGSettingsAudioSrcClass * g_class)
-{
-  src->context = g_main_context_new ();
-  gst_gsettings_audio_src_reset (src);
-}
-
-static void
-gst_gsettings_audio_src_base_init (gpointer klass)
-{
-  GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
-
-  gst_element_class_set_static_metadata (eklass, "GSettings audio src",
-      "Src/Audio",
-      "Audio src embedding the GSettings preferences for audio input",
-      "Sebastian Dröge <sebastian.droege@collabora.co.uk>");
-}
-
-static void
-gst_gsettings_audio_src_class_init (GstGSettingsAudioSrcClass * klass)
-{
-  GObjectClass *oklass = G_OBJECT_CLASS (klass);
-  GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
-
-  oklass->finalize = gst_gsettings_audio_src_finalize;
-
-  eklass->change_state = gst_gsettings_audio_src_change_state;
-}
diff --git a/ext/gsettings/gstgsettingsaudiosrc.h b/ext/gsettings/gstgsettingsaudiosrc.h
deleted file mode 100644 (file)
index d5c3fc3..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/* GStreamer
- * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef __GST_GSETTINGS_AUDIO_SRC_H__
-#define __GST_GSETTINGS_AUDIO_SRC_H__
-
-#include <gst/gst.h>
-#include <gio/gio.h>
-#include "gstswitchsrc.h"
-
-G_BEGIN_DECLS
-
-#define GST_TYPE_GSETTINGS_AUDIO_SRC \
-  (gst_gsettings_audio_src_get_type ())
-#define GST_GSETTINGS_AUDIO_SRC(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GSETTINGS_AUDIO_SRC, \
-                               GstGSettingsAudioSrc))
-#define GST_GSETTINGS_AUDIO_SRC_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GSETTINGS_AUDIO_SRC, \
-                            GstGSettingsAudioSrcClass))
-#define GST_IS_GSETTINGS_AUDIO_SRC(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GSETTINGS_AUDIO_SRC))
-#define GST_IS_GSETTINGS_AUDIO_SRC_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GSETTINGS_AUDIO_SRC))
-
-typedef struct _GstGSettingsAudioSrc {
-  GstSwitchSrc parent;
-
-  GSettings *settings;
-
-  GMainContext *context;
-  GMainLoop *loop;
-  gulong changed_id;
-
-  gchar *gsettings_str;
-} GstGSettingsAudioSrc;
-
-typedef struct _GstGSettingsAudioSrcClass {
-  GstSwitchSrcClass parent_class;
-} GstGSettingsAudioSrcClass;
-
-GType   gst_gsettings_audio_src_get_type   (void);
-
-G_END_DECLS
-
-#endif /* __GST_GSETTINGS_AUDIO_SRC_H__ */
diff --git a/ext/gsettings/gstgsettingsvideosink.c b/ext/gsettings/gstgsettingsvideosink.c
deleted file mode 100644 (file)
index b7a0a25..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-/* GStreamer
- * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-/**
- * SECTION:element-gsettingsvideosink
- *
- * This element outputs sound to the videosink that has been configured in
- * GSettings by the user.
- * 
- * <refsect2>
- * <title>Example launch line</title>
- * |[
- * gst-launch videotestsrc ! videoconvert ! videoscale ! gsettingsvideosink
- * ]| Play on configured videosink
- * </refsect2>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gst/gst.h>
-#include <gst/glib-compat-private.h>
-#include <string.h>
-
-#include "gstgsettingsvideosink.h"
-#include "gstgsettings.h"
-
-GST_BOILERPLATE (GstGSettingsVideoSink, gst_gsettings_video_sink, GstSwitchSink,
-    GST_TYPE_SWITCH_SINK);
-
-static gboolean
-gst_gsettings_video_sink_change_child (GstGSettingsVideoSink * sink)
-{
-  gchar *new_string;
-  GError *err = NULL;
-  GstElement *new_kid;
-
-  GST_OBJECT_LOCK (sink);
-  new_string =
-      g_settings_get_string (sink->settings, GST_GSETTINGS_KEY_VIDEOSINK);
-
-  if (new_string != NULL && sink->gsettings_str != NULL &&
-      (strlen (new_string) == 0 ||
-          strcmp (sink->gsettings_str, new_string) == 0)) {
-    g_free (new_string);
-    GST_DEBUG_OBJECT (sink,
-        "GSettings key was updated, but it didn't change. Ignoring");
-    GST_OBJECT_UNLOCK (sink);
-    return TRUE;
-  }
-  GST_OBJECT_UNLOCK (sink);
-
-  GST_DEBUG_OBJECT (sink, "GSettings key changed from '%s' to '%s'",
-      GST_STR_NULL (sink->gsettings_str), GST_STR_NULL (new_string));
-
-  if (new_string) {
-    new_kid = gst_parse_bin_from_description (new_string, TRUE, &err);
-    if (err) {
-      GST_ERROR_OBJECT (sink, "error creating bin '%s': %s", new_string,
-          err->message);
-      g_error_free (err);
-    }
-  } else {
-    new_kid = NULL;
-  }
-
-  if (new_kid == NULL) {
-    GST_ELEMENT_ERROR (sink, LIBRARY, SETTINGS, (NULL),
-        ("Failed to render video sink from GSettings"));
-    goto fail;
-  }
-
-  if (!gst_switch_sink_set_child (GST_SWITCH_SINK (sink), new_kid)) {
-    GST_WARNING_OBJECT (sink, "Failed to update child element");
-    goto fail;
-  }
-
-  g_free (sink->gsettings_str);
-  sink->gsettings_str = new_string;
-
-  return TRUE;
-
-fail:
-  g_free (new_string);
-  return FALSE;
-}
-
-static void
-on_changed (GSettings * settings, gchar * key, GstGSettingsVideoSink * sink)
-{
-  if (!g_str_has_suffix (key, "videosink"))
-    return;
-
-  gst_gsettings_video_sink_change_child (sink);
-}
-
-static gboolean
-gst_gsettings_video_sink_start (GstGSettingsVideoSink * sink)
-{
-  GError *err = NULL;
-  GThread *thread;
-
-  sink->loop = g_main_loop_new (sink->context, FALSE);
-
-  thread =
-      g_thread_create ((GThreadFunc) g_main_loop_run, sink->loop, FALSE, &err);
-  if (!thread) {
-    GST_ELEMENT_ERROR (sink, CORE, STATE_CHANGE, (NULL),
-        ("Failed to create new thread: %s", err->message));
-    g_error_free (err);
-    g_main_loop_unref (sink->loop);
-    sink->loop = NULL;
-    return FALSE;
-  }
-
-  g_main_context_push_thread_default (sink->context);
-  sink->settings = g_settings_new (GST_GSETTINGS_SCHEMA);
-  sink->changed_id =
-      g_signal_connect_data (G_OBJECT (sink->settings), "changed",
-      G_CALLBACK (on_changed), gst_object_ref (sink),
-      (GClosureNotify) gst_object_unref, 0);
-  g_main_context_pop_thread_default (sink->context);
-
-  return TRUE;
-}
-
-static gboolean
-gst_gsettings_video_sink_reset (GstGSettingsVideoSink * sink)
-{
-  gst_switch_sink_set_child (GST_SWITCH_SINK (sink), NULL);
-
-  if (sink->changed_id) {
-    g_signal_handler_disconnect (sink->settings, sink->changed_id);
-    sink->changed_id = 0;
-  }
-
-  if (sink->loop) {
-    g_main_loop_quit (sink->loop);
-    g_main_loop_unref (sink->loop);
-    sink->loop = NULL;
-  }
-
-  if (sink->settings) {
-    g_object_unref (sink->settings);
-    sink->settings = NULL;
-  }
-
-  GST_OBJECT_LOCK (sink);
-  g_free (sink->gsettings_str);
-  sink->gsettings_str = NULL;
-  GST_OBJECT_UNLOCK (sink);
-
-  return TRUE;
-}
-
-static void
-gst_gsettings_video_sink_finalize (GObject * object)
-{
-  GstGSettingsVideoSink *sink = GST_GSETTINGS_VIDEO_SINK (object);
-
-  g_free (sink->gsettings_str);
-  g_main_context_unref (sink->context);
-
-  GST_CALL_PARENT (G_OBJECT_CLASS, finalize, ((GObject *) (sink)));
-}
-
-static GstStateChangeReturn
-gst_gsettings_video_sink_change_state (GstElement * element,
-    GstStateChange transition)
-{
-  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
-  GstGSettingsVideoSink *sink = GST_GSETTINGS_VIDEO_SINK (element);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_NULL_TO_READY:
-      if (!gst_gsettings_video_sink_start (sink))
-        return GST_STATE_CHANGE_FAILURE;
-
-      if (!gst_gsettings_video_sink_change_child (sink)) {
-        gst_gsettings_video_sink_reset (sink);
-        return GST_STATE_CHANGE_FAILURE;
-      }
-      break;
-    default:
-      break;
-  }
-
-  ret = GST_CALL_PARENT_WITH_DEFAULT (GST_ELEMENT_CLASS, change_state,
-      (element, transition), GST_STATE_CHANGE_SUCCESS);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_READY_TO_NULL:
-      gst_gsettings_video_sink_reset (sink);
-      break;
-    default:
-      break;
-  }
-
-  return ret;
-}
-
-static void
-gst_gsettings_video_sink_init (GstGSettingsVideoSink * sink,
-    GstGSettingsVideoSinkClass * g_class)
-{
-  sink->context = g_main_context_new ();
-  gst_gsettings_video_sink_reset (sink);
-}
-
-static void
-gst_gsettings_video_sink_base_init (gpointer klass)
-{
-  GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
-
-  gst_element_class_set_static_metadata (eklass, "GSettings video sink",
-      "Sink/Video",
-      "Video sink embedding the GSettings preferences for video input",
-      "Sebastian Dröge <sebastian.droege@collabora.co.uk>");
-}
-
-static void
-gst_gsettings_video_sink_class_init (GstGSettingsVideoSinkClass * klass)
-{
-  GObjectClass *oklass = G_OBJECT_CLASS (klass);
-  GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
-
-  oklass->finalize = gst_gsettings_video_sink_finalize;
-
-  eklass->change_state = gst_gsettings_video_sink_change_state;
-}
diff --git a/ext/gsettings/gstgsettingsvideosink.h b/ext/gsettings/gstgsettingsvideosink.h
deleted file mode 100644 (file)
index d1f9bc6..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/* GStreamer
- * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef __GST_GSETTINGS_VIDEO_SINK_H__
-#define __GST_GSETTINGS_VIDEO_SINK_H__
-
-#include <gst/gst.h>
-#include <gio/gio.h>
-#include "gstswitchsink.h"
-
-G_BEGIN_DECLS
-
-#define GST_TYPE_GSETTINGS_VIDEO_SINK \
-  (gst_gsettings_video_sink_get_type ())
-#define GST_GSETTINGS_VIDEO_SINK(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GSETTINGS_VIDEO_SINK, \
-                               GstGSettingsVideoSink))
-#define GST_GSETTINGS_VIDEO_SINK_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GSETTINGS_VIDEO_SINK, \
-                            GstGSettingsVideoSinkClass))
-#define GST_IS_GSETTINGS_VIDEO_SINK(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GSETTINGS_VIDEO_SINK))
-#define GST_IS_GSETTINGS_VIDEO_SINK_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GSETTINGS_VIDEO_SINK))
-
-typedef struct _GstGSettingsVideoSink {
-  GstSwitchSink parent;
-
-  GSettings *settings;
-
-  GMainContext *context;
-  GMainLoop *loop;
-  gulong changed_id;
-
-  gchar *gsettings_str;
-} GstGSettingsVideoSink;
-
-typedef struct _GstGSettingsVideoSinkClass {
-  GstSwitchSinkClass parent_class;
-} GstGSettingsVideoSinkClass;
-
-GType   gst_gsettings_video_sink_get_type   (void);
-
-G_END_DECLS
-
-#endif /* __GST_GSETTINGS_VIDEO_SINK_H__ */
diff --git a/ext/gsettings/gstgsettingsvideosrc.c b/ext/gsettings/gstgsettingsvideosrc.c
deleted file mode 100644 (file)
index 2b76867..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-/* GStreamer
- * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-/**
- * SECTION:element-gsettingsvideosrc
- *
- * This element outputs sound to the videosrc that has been configured in
- * GSettings by the user.
- * 
- * <refsect2>
- * <title>Example launch line</title>
- * |[
- * gst-launch gsettingsvideosrc ! videoconvert ! videoscale ! autovideosink
- * ]| Play from configured videosrc
- * </refsect2>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gst/gst.h>
-#include <gst/glib-compat-private.h>
-#include <string.h>
-
-#include "gstgsettingsvideosrc.h"
-#include "gstgsettings.h"
-
-GST_BOILERPLATE (GstGSettingsVideoSrc, gst_gsettings_video_src, GstSwitchSrc,
-    GST_TYPE_SWITCH_SRC);
-
-static gboolean
-gst_gsettings_video_src_change_child (GstGSettingsVideoSrc * src)
-{
-  gchar *new_string;
-  GError *err = NULL;
-  GstElement *new_kid;
-
-  GST_OBJECT_LOCK (src);
-  new_string =
-      g_settings_get_string (src->settings, GST_GSETTINGS_KEY_VIDEOSRC);
-
-  if (new_string != NULL && src->gsettings_str != NULL &&
-      (strlen (new_string) == 0 ||
-          strcmp (src->gsettings_str, new_string) == 0)) {
-    g_free (new_string);
-    GST_DEBUG_OBJECT (src,
-        "GSettings key was updated, but it didn't change. Ignoring");
-    GST_OBJECT_UNLOCK (src);
-    return TRUE;
-  }
-  GST_OBJECT_UNLOCK (src);
-
-  GST_DEBUG_OBJECT (src, "GSettings key changed from '%s' to '%s'",
-      GST_STR_NULL (src->gsettings_str), GST_STR_NULL (new_string));
-
-  if (new_string) {
-    new_kid = gst_parse_bin_from_description (new_string, TRUE, &err);
-    if (err) {
-      GST_ERROR_OBJECT (src, "error creating bin '%s': %s", new_string,
-          err->message);
-      g_error_free (err);
-    }
-  } else {
-    new_kid = NULL;
-  }
-
-  if (new_kid == NULL) {
-    GST_ELEMENT_ERROR (src, LIBRARY, SETTINGS, (NULL),
-        ("Failed to render video src from GSettings"));
-    goto fail;
-  }
-
-  if (!gst_switch_src_set_child (GST_SWITCH_SRC (src), new_kid)) {
-    GST_WARNING_OBJECT (src, "Failed to update child element");
-    goto fail;
-  }
-
-  g_free (src->gsettings_str);
-  src->gsettings_str = new_string;
-
-  return TRUE;
-
-fail:
-  g_free (new_string);
-  return FALSE;
-}
-
-static void
-on_changed (GSettings * settings, gchar * key, GstGSettingsVideoSrc * src)
-{
-  if (!g_str_equal (key, "videosrc"))
-    return;
-
-  gst_gsettings_video_src_change_child (src);
-}
-
-static gboolean
-gst_gsettings_video_src_start (GstGSettingsVideoSrc * src)
-{
-  GError *err = NULL;
-  GThread *thread;
-
-  src->loop = g_main_loop_new (src->context, FALSE);
-
-  thread =
-      g_thread_create ((GThreadFunc) g_main_loop_run, src->loop, FALSE, &err);
-  if (!thread) {
-    GST_ELEMENT_ERROR (src, CORE, STATE_CHANGE, (NULL),
-        ("Failed to create new thread: %s", err->message));
-    g_error_free (err);
-    g_main_loop_unref (src->loop);
-    src->loop = NULL;
-    return FALSE;
-  }
-
-  g_main_context_push_thread_default (src->context);
-  src->settings = g_settings_new (GST_GSETTINGS_SCHEMA);
-  src->changed_id =
-      g_signal_connect_data (G_OBJECT (src->settings), "changed",
-      G_CALLBACK (on_changed), gst_object_ref (src),
-      (GClosureNotify) gst_object_unref, 0);
-  g_main_context_pop_thread_default (src->context);
-
-  return TRUE;
-}
-
-static gboolean
-gst_gsettings_video_src_reset (GstGSettingsVideoSrc * src)
-{
-  gst_switch_src_set_child (GST_SWITCH_SRC (src), NULL);
-
-  if (src->changed_id) {
-    g_signal_handler_disconnect (src->settings, src->changed_id);
-    src->changed_id = 0;
-  }
-
-  if (src->loop) {
-    g_main_loop_quit (src->loop);
-    g_main_loop_unref (src->loop);
-    src->loop = NULL;
-  }
-
-  if (src->settings) {
-    g_object_unref (src->settings);
-    src->settings = NULL;
-  }
-
-  GST_OBJECT_LOCK (src);
-  g_free (src->gsettings_str);
-  src->gsettings_str = NULL;
-  GST_OBJECT_UNLOCK (src);
-
-  return TRUE;
-}
-
-static void
-gst_gsettings_video_src_finalize (GObject * object)
-{
-  GstGSettingsVideoSrc *src = GST_GSETTINGS_VIDEO_SRC (object);
-
-  g_free (src->gsettings_str);
-  g_main_context_unref (src->context);
-
-  GST_CALL_PARENT (G_OBJECT_CLASS, finalize, ((GObject *) (src)));
-}
-
-static GstStateChangeReturn
-gst_gsettings_video_src_change_state (GstElement * element,
-    GstStateChange transition)
-{
-  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
-  GstGSettingsVideoSrc *src = GST_GSETTINGS_VIDEO_SRC (element);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_NULL_TO_READY:
-      if (!gst_gsettings_video_src_start (src))
-        return GST_STATE_CHANGE_FAILURE;
-
-      if (!gst_gsettings_video_src_change_child (src)) {
-        gst_gsettings_video_src_reset (src);
-        return GST_STATE_CHANGE_FAILURE;
-      }
-      break;
-    default:
-      break;
-  }
-
-  ret = GST_CALL_PARENT_WITH_DEFAULT (GST_ELEMENT_CLASS, change_state,
-      (element, transition), GST_STATE_CHANGE_SUCCESS);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_READY_TO_NULL:
-      gst_gsettings_video_src_reset (src);
-      break;
-    default:
-      break;
-  }
-
-  return ret;
-}
-
-static void
-gst_gsettings_video_src_init (GstGSettingsVideoSrc * src,
-    GstGSettingsVideoSrcClass * g_class)
-{
-  src->context = g_main_context_new ();
-  gst_gsettings_video_src_reset (src);
-}
-
-static void
-gst_gsettings_video_src_base_init (gpointer klass)
-{
-  GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
-
-  gst_element_class_set_static_metadata (eklass, "GSettings video src",
-      "Src/Video",
-      "Video src embedding the GSettings preferences for video input",
-      "Sebastian Dröge <sebastian.droege@collabora.co.uk>");
-}
-
-static void
-gst_gsettings_video_src_class_init (GstGSettingsVideoSrcClass * klass)
-{
-  GObjectClass *oklass = G_OBJECT_CLASS (klass);
-  GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
-
-  oklass->finalize = gst_gsettings_video_src_finalize;
-
-  eklass->change_state = gst_gsettings_video_src_change_state;
-}
diff --git a/ext/gsettings/gstgsettingsvideosrc.h b/ext/gsettings/gstgsettingsvideosrc.h
deleted file mode 100644 (file)
index 4b7a6cd..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/* GStreamer
- * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef __GST_GSETTINGS_VIDEO_SRC_H__
-#define __GST_GSETTINGS_VIDEO_SRC_H__
-
-#include <gst/gst.h>
-#include <gio/gio.h>
-#include "gstswitchsrc.h"
-
-G_BEGIN_DECLS
-
-#define GST_TYPE_GSETTINGS_VIDEO_SRC \
-  (gst_gsettings_video_src_get_type ())
-#define GST_GSETTINGS_VIDEO_SRC(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GSETTINGS_VIDEO_SRC, \
-                               GstGSettingsVideoSrc))
-#define GST_GSETTINGS_VIDEO_SRC_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GSETTINGS_VIDEO_SRC, \
-                            GstGSettingsVideoSrcClass))
-#define GST_IS_GSETTINGS_VIDEO_SRC(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GSETTINGS_VIDEO_SRC))
-#define GST_IS_GSETTINGS_VIDEO_SRC_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GSETTINGS_VIDEO_SRC))
-
-typedef struct _GstGSettingsVideoSrc {
-  GstSwitchSrc parent;
-
-  GSettings *settings;
-
-  GMainContext *context;
-  GMainLoop *loop;
-  gulong changed_id;
-
-  gchar *gsettings_str;
-} GstGSettingsVideoSrc;
-
-typedef struct _GstGSettingsVideoSrcClass {
-  GstSwitchSrcClass parent_class;
-} GstGSettingsVideoSrcClass;
-
-GType   gst_gsettings_video_src_get_type   (void);
-
-G_END_DECLS
-
-#endif /* __GST_GSETTINGS_VIDEO_SRC_H__ */
diff --git a/ext/gsettings/gstswitchsink.c b/ext/gsettings/gstswitchsink.c
deleted file mode 100644 (file)
index ce042ce..0000000
+++ /dev/null
@@ -1,270 +0,0 @@
-/* GStreamer
- * Copyright (c) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
- * Copyright (c) 2006 Jürg Billeter <j@bitron.ch>
- * Copyright (c) 2007 Jan Schmidt <thaytan@noraisin.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <string.h>
-
-#include "gstswitchsink.h"
-
-GST_DEBUG_CATEGORY_STATIC (switch_debug);
-#define GST_CAT_DEFAULT switch_debug
-
-static void gst_switch_sink_dispose (GObject * object);
-static GstStateChangeReturn
-gst_switch_sink_change_state (GstElement * element, GstStateChange transition);
-
-enum
-{
-  PROP_0
-};
-
-GST_BOILERPLATE (GstSwitchSink, gst_switch_sink, GstBin, GST_TYPE_BIN);
-
-static void
-gst_switch_sink_base_init (gpointer klass)
-{
-  GST_DEBUG_CATEGORY_INIT (switch_debug, "switchsink", 0, "switchsink element");
-}
-
-static void
-gst_switch_sink_class_init (GstSwitchSinkClass * klass)
-{
-  GObjectClass *oklass = G_OBJECT_CLASS (klass);
-  GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
-  static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
-      GST_PAD_SINK,
-      GST_PAD_ALWAYS,
-      GST_STATIC_CAPS_ANY);
-  GstPadTemplate *child_pad_templ;
-
-  oklass->dispose = gst_switch_sink_dispose;
-  eklass->change_state = gst_switch_sink_change_state;
-
-  /* Provide a default pad template if the child didn't */
-  child_pad_templ = gst_element_class_get_pad_template (eklass, "sink");
-  if (child_pad_templ == NULL) {
-    gst_element_class_add_pad_template (eklass,
-        gst_static_pad_template_get (&sink_template));
-  }
-}
-
-static gboolean
-gst_switch_sink_reset (GstSwitchSink * sink)
-{
-  /* this will install fakesink if no other child has been set,
-   * otherwise we rely on the subclass to know when to unset its
-   * custom kid */
-  if (sink->kid == NULL) {
-    return gst_switch_sink_set_child (sink, NULL);
-  }
-
-  return TRUE;
-}
-
-static void
-gst_switch_sink_init (GstSwitchSink * sink, GstSwitchSinkClass * g_class)
-{
-  GstElementClass *eklass = GST_ELEMENT_GET_CLASS (sink);
-  GstPadTemplate *templ;
-
-  templ = gst_element_class_get_pad_template (eklass, "sink");
-  sink->pad = gst_ghost_pad_new_no_target_from_template ("sink", templ);
-  gst_element_add_pad (GST_ELEMENT (sink), sink->pad);
-
-  gst_switch_sink_reset (sink);
-
-  GST_OBJECT_FLAG_SET (sink, GST_ELEMENT_IS_SINK);
-}
-
-static void
-gst_switch_sink_dispose (GObject * object)
-{
-  GstSwitchSink *sink = GST_SWITCH_SINK (object);
-  GstObject *new_kid, *kid;
-
-  GST_OBJECT_LOCK (sink);
-  new_kid = GST_OBJECT_CAST (sink->new_kid);
-  sink->new_kid = NULL;
-
-  kid = GST_OBJECT_CAST (sink->kid);
-  sink->kid = NULL;
-  GST_OBJECT_UNLOCK (sink);
-
-  gst_object_replace (&new_kid, NULL);
-  gst_object_replace (&kid, NULL);
-
-  GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object));
-}
-
-static gboolean
-gst_switch_sink_commit_new_kid (GstSwitchSink * sink)
-{
-  GstPad *targetpad;
-  GstState kid_state;
-  GstElement *new_kid, *old_kid;
-  gboolean is_fakesink = FALSE;
-  GstBus *bus;
-
-  /* need locking around member accesses */
-  GST_OBJECT_LOCK (sink);
-  /* If we're currently changing state, set the child to the next state
-   * we're transitioning too, rather than our current state which is 
-   * about to change */
-  if (GST_STATE_NEXT (sink) != GST_STATE_VOID_PENDING)
-    kid_state = GST_STATE_NEXT (sink);
-  else
-    kid_state = GST_STATE (sink);
-
-  new_kid = sink->new_kid ? gst_object_ref (sink->new_kid) : NULL;
-  sink->new_kid = NULL;
-  GST_OBJECT_UNLOCK (sink);
-
-  /* Fakesink by default if NULL is passed as the new child */
-  if (new_kid == NULL) {
-    GST_DEBUG_OBJECT (sink, "Replacing kid with fakesink");
-    new_kid = gst_element_factory_make ("fakesink", "testsink");
-    if (new_kid == NULL) {
-      GST_ERROR_OBJECT (sink, "Failed to create fakesink");
-      return FALSE;
-    }
-    /* Add a reference, as it would if the element came from sink->new_kid */
-    gst_object_ref (new_kid);
-    g_object_set (new_kid, "sync", TRUE, NULL);
-    is_fakesink = TRUE;
-  } else {
-    GST_DEBUG_OBJECT (sink, "Setting new kid");
-  }
-
-  /* set temporary bus of our own to catch error messages from the child
-   * (could we just set our own bus on it, or would the state change messages
-   * from the not-yet-added element confuse the state change algorithm? Let's
-   * play it safe for now) */
-  bus = gst_bus_new ();
-  gst_element_set_bus (new_kid, bus);
-  gst_object_unref (bus);
-
-  if (gst_element_set_state (new_kid, kid_state) == GST_STATE_CHANGE_FAILURE) {
-    GstMessage *msg;
-
-    /* check if child posted an error message and if so re-post it on our bus
-     * so that the application gets to see a decent error and not our generic
-     * fallback error message which is completely indecipherable to the user */
-    msg = gst_bus_pop_filtered (GST_ELEMENT_BUS (new_kid), GST_MESSAGE_ERROR);
-    if (msg) {
-      GST_INFO_OBJECT (sink, "Forwarding kid error: %" GST_PTR_FORMAT, msg);
-      gst_element_post_message (GST_ELEMENT (sink), msg);
-    }
-    GST_ELEMENT_ERROR (sink, CORE, STATE_CHANGE, (NULL),
-        ("Failed to set state on new child."));
-    gst_element_set_bus (new_kid, NULL);
-    gst_object_unref (new_kid);
-    return FALSE;
-  }
-  gst_element_set_bus (new_kid, NULL);
-  gst_bin_add (GST_BIN (sink), new_kid);
-
-  /* Now, replace the existing child */
-  GST_OBJECT_LOCK (sink);
-  old_kid = sink->kid;
-  sink->kid = new_kid;
-  /* Mark whether a custom kid or fakesink has been installed */
-  sink->have_kid = !is_fakesink;
-  GST_OBJECT_UNLOCK (sink);
-
-  /* kill old element */
-  if (old_kid) {
-    GST_DEBUG_OBJECT (sink, "Removing old kid %" GST_PTR_FORMAT, old_kid);
-    gst_element_set_state (old_kid, GST_STATE_NULL);
-    gst_bin_remove (GST_BIN (sink), old_kid);
-    gst_object_unref (old_kid);
-    /* Don't lose the SINK flag */
-    GST_OBJECT_FLAG_SET (sink, GST_ELEMENT_IS_SINK);
-  }
-
-  /* re-attach ghostpad */
-  GST_DEBUG_OBJECT (sink, "Creating new ghostpad");
-  targetpad = gst_element_get_static_pad (sink->kid, "sink");
-  gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
-  gst_object_unref (targetpad);
-  GST_DEBUG_OBJECT (sink, "done changing child of switchsink");
-
-  /* FIXME: Push new-segment info and pre-roll buffer(s) into the kid */
-
-  return TRUE;
-}
-
-gboolean
-gst_switch_sink_set_child (GstSwitchSink * sink, GstElement * new_kid)
-{
-  GstState cur, next;
-  GstElement **p_kid;
-
-  /* Nothing to do if clearing the child and we've already installed fakesink */
-  if (new_kid == NULL && sink->kid != NULL && sink->have_kid == FALSE)
-    return TRUE;
-
-  /* Store the new kid to be committed later */
-  GST_OBJECT_LOCK (sink);
-  cur = GST_STATE (sink);
-  next = GST_STATE_NEXT (sink);
-  p_kid = &sink->new_kid;
-  gst_object_replace ((GstObject **) p_kid, (GstObject *) new_kid);
-  GST_OBJECT_UNLOCK (sink);
-  if (new_kid)
-    gst_object_unref (new_kid);
-
-  /* Sometime, it would be lovely to allow sink changes even when
-   * already running, but this involves sending an appropriate new-segment
-   * and possibly prerolling etc */
-  /* FIXME: Block the pad and replace the kid when it completes */
-  if (cur > GST_STATE_READY || next == GST_STATE_PAUSED) {
-    GST_DEBUG_OBJECT (sink,
-        "Switch-sink is already running. Ignoring change of child.");
-    gst_object_unref (new_kid);
-    return TRUE;
-  }
-
-  return gst_switch_sink_commit_new_kid (sink);
-}
-
-static GstStateChangeReturn
-gst_switch_sink_change_state (GstElement * element, GstStateChange transition)
-{
-  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
-  GstSwitchSink *sink = GST_SWITCH_SINK (element);
-
-  ret = GST_CALL_PARENT_WITH_DEFAULT (GST_ELEMENT_CLASS, change_state,
-      (element, transition), GST_STATE_CHANGE_SUCCESS);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_READY_TO_NULL:
-      if (!gst_switch_sink_reset (sink))
-        ret = GST_STATE_CHANGE_FAILURE;
-      break;
-    default:
-      break;
-  }
-
-  return ret;
-}
diff --git a/ext/gsettings/gstswitchsink.h b/ext/gsettings/gstswitchsink.h
deleted file mode 100644 (file)
index d0b3f68..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/* GStreamer
- * Copyright (c) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
- * Copyright (c) 2007 Jan Schmidt <thaytan@mad.scientist.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef __GST_SWITCH_SINK_H__
-#define __GST_SWITCH_SINK_H__
-
-#include <gst/gst.h>
-
-G_BEGIN_DECLS
-
-#define GST_TYPE_SWITCH_SINK \
-  (gst_switch_sink_get_type ())
-#define GST_SWITCH_SINK(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SWITCH_SINK, \
-                               GstSwitchSink))
-#define GST_SWITCH_SINK_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_SWITCH_SINK, \
-                            GstSwitchSinkClass))
-#define GST_IS_SWITCH_SINK(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_SWITCH_SINK))
-#define GST_IS_SWITCH_SINK_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SWITCH_SINK))
-
-typedef struct _GstSwitchSink {
-  GstBin parent;
-
-  GstElement *kid;
-  GstElement *new_kid;
-  GstPad *pad;
-
-  /* If a custom child has been set... */
-  gboolean have_kid;
-} GstSwitchSink;
-
-typedef struct _GstSwitchSinkClass {
-  GstBinClass parent_class;
-} GstSwitchSinkClass;
-
-GType   gst_switch_sink_get_type   (void);
-
-gboolean gst_switch_sink_set_child (GstSwitchSink *ssink, GstElement *new_kid);
-
-G_END_DECLS
-
-#endif /* __GST_SWITCH_SINK_H__ */
diff --git a/ext/gsettings/gstswitchsrc.c b/ext/gsettings/gstswitchsrc.c
deleted file mode 100644 (file)
index f25d068..0000000
+++ /dev/null
@@ -1,262 +0,0 @@
-/* GStreamer
- * Copyright (c) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
- * Copyright (c) 2006 Jürg Billeter <j@bitron.ch>
- * Copyright (c) 2007 Jan Schmidt <thaytan@noraisin.net>
- * Copyright (c) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <string.h>
-
-#include "gstswitchsrc.h"
-
-GST_DEBUG_CATEGORY_STATIC (switch_debug);
-#define GST_CAT_DEFAULT switch_debug
-
-static void gst_switch_src_dispose (GObject * object);
-static GstStateChangeReturn
-gst_switch_src_change_state (GstElement * element, GstStateChange transition);
-
-GST_BOILERPLATE (GstSwitchSrc, gst_switch_src, GstBin, GST_TYPE_BIN);
-
-static void
-gst_switch_src_base_init (gpointer klass)
-{
-  GST_DEBUG_CATEGORY_INIT (switch_debug, "switchsrc", 0, "switchsrc element");
-}
-
-static void
-gst_switch_src_class_init (GstSwitchSrcClass * klass)
-{
-  GObjectClass *oklass = G_OBJECT_CLASS (klass);
-  GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
-  static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
-      GST_PAD_SRC,
-      GST_PAD_ALWAYS,
-      GST_STATIC_CAPS_ANY);
-  GstPadTemplate *child_pad_templ;
-
-  oklass->dispose = gst_switch_src_dispose;
-  eklass->change_state = gst_switch_src_change_state;
-
-  /* Provide a default pad template if the child didn't */
-  child_pad_templ = gst_element_class_get_pad_template (eklass, "src");
-  if (child_pad_templ == NULL) {
-    gst_element_class_add_pad_template (eklass,
-        gst_static_pad_template_get (&src_template));
-  }
-}
-
-static gboolean
-gst_switch_src_reset (GstSwitchSrc * src)
-{
-  /* this will install fakesrc if no other child has been set,
-   * otherwise we rely on the subclass to know when to unset its
-   * custom kid */
-  if (src->kid == NULL) {
-    return gst_switch_src_set_child (src, NULL);
-  }
-
-  return TRUE;
-}
-
-static void
-gst_switch_src_init (GstSwitchSrc * src, GstSwitchSrcClass * g_class)
-{
-  GstElementClass *eklass = GST_ELEMENT_GET_CLASS (src);
-  GstPadTemplate *templ;
-
-  templ = gst_element_class_get_pad_template (eklass, "src");
-  src->pad = gst_ghost_pad_new_no_target_from_template ("src", templ);
-  gst_element_add_pad (GST_ELEMENT (src), src->pad);
-
-  gst_switch_src_reset (src);
-
-  GST_OBJECT_FLAG_SET (src, GST_ELEMENT_IS_SOURCE);
-}
-
-static void
-gst_switch_src_dispose (GObject * object)
-{
-  GstSwitchSrc *src = GST_SWITCH_SRC (object);
-  GstObject *new_kid, *kid;
-
-  GST_OBJECT_LOCK (src);
-  new_kid = GST_OBJECT_CAST (src->new_kid);
-  src->new_kid = NULL;
-
-  kid = GST_OBJECT_CAST (src->kid);
-  src->kid = NULL;
-  GST_OBJECT_UNLOCK (src);
-
-  gst_object_replace (&new_kid, NULL);
-  gst_object_replace (&kid, NULL);
-
-  GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object));
-}
-
-static gboolean
-gst_switch_src_commit_new_kid (GstSwitchSrc * src)
-{
-  GstPad *targetpad;
-  GstState kid_state;
-  GstElement *new_kid, *old_kid;
-  gboolean is_fakesrc = FALSE;
-  GstBus *bus;
-
-  /* need locking around member accesses */
-  GST_OBJECT_LOCK (src);
-  /* If we're currently changing state, set the child to the next state
-   * we're transitioning too, rather than our current state which is 
-   * about to change */
-  if (GST_STATE_NEXT (src) != GST_STATE_VOID_PENDING)
-    kid_state = GST_STATE_NEXT (src);
-  else
-    kid_state = GST_STATE (src);
-
-  new_kid = src->new_kid ? gst_object_ref (src->new_kid) : NULL;
-  src->new_kid = NULL;
-  GST_OBJECT_UNLOCK (src);
-
-  /* Fakesrc by default if NULL is passed as the new child */
-  if (new_kid == NULL) {
-    GST_DEBUG_OBJECT (src, "Replacing kid with fakesrc");
-    new_kid = gst_element_factory_make ("fakesrc", "testsrc");
-    if (new_kid == NULL) {
-      GST_ERROR_OBJECT (src, "Failed to create fakesrc");
-      return FALSE;
-    }
-    /* Add a reference, as it would if the element came from src->new_kid */
-    gst_object_ref (new_kid);
-    is_fakesrc = TRUE;
-  } else {
-    GST_DEBUG_OBJECT (src, "Setting new kid");
-  }
-
-  /* set temporary bus of our own to catch error messages from the child
-   * (could we just set our own bus on it, or would the state change messages
-   * from the not-yet-added element confuse the state change algorithm? Let's
-   * play it safe for now) */
-  bus = gst_bus_new ();
-  gst_element_set_bus (new_kid, bus);
-  gst_object_unref (bus);
-
-  if (gst_element_set_state (new_kid, kid_state) == GST_STATE_CHANGE_FAILURE) {
-    GstMessage *msg;
-
-    /* check if child posted an error message and if so re-post it on our bus
-     * so that the application gets to see a decent error and not our generic
-     * fallback error message which is completely indecipherable to the user */
-    msg = gst_bus_pop_filtered (GST_ELEMENT_BUS (new_kid), GST_MESSAGE_ERROR);
-    if (msg) {
-      GST_INFO_OBJECT (src, "Forwarding kid error: %" GST_PTR_FORMAT, msg);
-      gst_element_post_message (GST_ELEMENT (src), msg);
-    }
-    GST_ELEMENT_ERROR (src, CORE, STATE_CHANGE, (NULL),
-        ("Failed to set state on new child."));
-    gst_element_set_bus (new_kid, NULL);
-    gst_object_unref (new_kid);
-    return FALSE;
-  }
-  gst_element_set_bus (new_kid, NULL);
-  gst_bin_add (GST_BIN (src), new_kid);
-
-  /* Now, replace the existing child */
-  GST_OBJECT_LOCK (src);
-  old_kid = src->kid;
-  src->kid = new_kid;
-  /* Mark whether a custom kid or fakesrc has been installed */
-  src->have_kid = !is_fakesrc;
-  GST_OBJECT_UNLOCK (src);
-
-  /* kill old element */
-  if (old_kid) {
-    GST_DEBUG_OBJECT (src, "Removing old kid %" GST_PTR_FORMAT, old_kid);
-    gst_element_set_state (old_kid, GST_STATE_NULL);
-    gst_bin_remove (GST_BIN (src), old_kid);
-    gst_object_unref (old_kid);
-    /* Don't lose the SOURCE flag */
-    GST_OBJECT_FLAG_SET (src, GST_ELEMENT_IS_SOURCE);
-  }
-
-  /* re-attach ghostpad */
-  GST_DEBUG_OBJECT (src, "Creating new ghostpad");
-  targetpad = gst_element_get_static_pad (src->kid, "src");
-  gst_ghost_pad_set_target (GST_GHOST_PAD (src->pad), targetpad);
-  gst_object_unref (targetpad);
-  GST_DEBUG_OBJECT (src, "done changing child of switchsrc");
-
-  return TRUE;
-}
-
-gboolean
-gst_switch_src_set_child (GstSwitchSrc * src, GstElement * new_kid)
-{
-  GstState cur, next;
-  GstElement **p_kid;
-
-  /* Nothing to do if clearing the child and we've already installed fakesrc */
-  if (new_kid == NULL && src->kid != NULL && src->have_kid == FALSE)
-    return TRUE;
-
-  /* Store the new kid to be committed later */
-  GST_OBJECT_LOCK (src);
-  cur = GST_STATE (src);
-  next = GST_STATE_NEXT (src);
-  p_kid = &src->new_kid;
-  gst_object_replace ((GstObject **) p_kid, (GstObject *) new_kid);
-  GST_OBJECT_UNLOCK (src);
-  if (new_kid)
-    gst_object_unref (new_kid);
-
-  /* Sometime, it would be lovely to allow src changes even when
-   * already running */
-  /* FIXME: Block the pad and replace the kid when it completes */
-  if (cur > GST_STATE_READY || next == GST_STATE_PAUSED) {
-    GST_DEBUG_OBJECT (src,
-        "Switch-src is already running. Ignoring change of child.");
-    gst_object_unref (new_kid);
-    return TRUE;
-  }
-
-  return gst_switch_src_commit_new_kid (src);
-}
-
-static GstStateChangeReturn
-gst_switch_src_change_state (GstElement * element, GstStateChange transition)
-{
-  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
-  GstSwitchSrc *src = GST_SWITCH_SRC (element);
-
-  ret = GST_CALL_PARENT_WITH_DEFAULT (GST_ELEMENT_CLASS, change_state,
-      (element, transition), GST_STATE_CHANGE_SUCCESS);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_READY_TO_NULL:
-      if (!gst_switch_src_reset (src))
-        ret = GST_STATE_CHANGE_FAILURE;
-      break;
-    default:
-      break;
-  }
-
-  return ret;
-}
diff --git a/ext/gsettings/gstswitchsrc.h b/ext/gsettings/gstswitchsrc.h
deleted file mode 100644 (file)
index 6c698a1..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/* GStreamer
- *
- * Copyright (c) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
- * Copyright (c) 2005 Tim-Philipp Müller <tim centricular net>
- * Copyright (c) 2007 Jan Schmidt <thaytan@mad.scientist.com>
- * Copyright (c) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef __GST_SWITCH_SRC_H__
-#define __GST_SWITCH_SRC_H__
-
-#include <gst/gst.h>
-
-G_BEGIN_DECLS
-
-#define GST_TYPE_SWITCH_SRC            (gst_switch_src_get_type ())
-#define GST_SWITCH_SRC(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SWITCH_SRC, GstSwitchSrc))
-#define GST_SWITCH_SRC_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_SWITCH_SRC, GstSwitchSrcClass))
-#define GST_IS_SWITCH_SRC(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_SWITCH_SRC))
-#define GST_IS_SWITCH_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SWITCH_SRC))
-
-typedef struct _GstSwitchSrc {
-  GstBin parent;
-
-  GstElement *kid;
-  GstElement *new_kid;
-  GstPad *pad;
-
-  /* If a custom child has been set... */
-  gboolean have_kid;
-} GstSwitchSrc;
-
-typedef struct _GstSwitchSrcClass {
-  GstBinClass parent_class;
-} GstSwitchSrcClass;
-
-GType     gst_switch_src_get_type   (void);
-gboolean  gst_switch_src_set_child  (GstSwitchSrc *ssrc, GstElement *new_kid);
-
-G_END_DECLS
-
-#endif /* __GST_SWITCH_SRC_H__ */
diff --git a/ext/gsettings/org.freedesktop.gstreamer.default-elements.gschema.xml.in b/ext/gsettings/org.freedesktop.gstreamer.default-elements.gschema.xml.in
deleted file mode 100644 (file)
index 1a13b3a..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-<schemalist>
-  <schema id="org.freedesktop.gstreamer-@GST_API_VERSION@.default-elements" path="/desktop/gstreamer/@GST_API_VERSION@/default-elements/" gettext-domain="@GETTEXT_PACKAGE@">
-    <key name="sounds-audiosink" type="s">
-      <default>"@DEFAULT_AUDIOSINK@"</default>
-      <summary>default GStreamer sound events audiosink</summary>
-      <description>GStreamer can play audio using any number of
-      output elements. Some possible choices are osssink, pulsesink
-      and alsasink. The audiosink can be a partial pipeline instead
-      of just one element.</description>
-    </key>
-    <key name="sounds-audiosink-description" type="s">
-      <default>"Default"</default>
-      <summary>description for default GStreamer sound events audiosink</summary>
-      <description>Describes the selected audiosink element.</description>
-    </key>
-    <key name="chat-audiosink" type="s">
-      <default>"@DEFAULT_AUDIOSINK@"</default>
-      <summary>default GStreamer audiosink for Audio/Video Conferencing</summary>
-      <description>GStreamer can play audio using any number of
-      output elements. Some possible choices are osssink, pulsesink
-      and alsasink. The audiosink can be a partial pipeline instead
-      of just one element.</description>
-    </key>
-    <key name="chat-audiosink-description" type="s">
-      <default>"Default"</default>
-      <summary>description for default GStreamer audiosink for Audio/Video Conferencing</summary>
-      <description>Describes the selected audiosink element.</description>
-    </key>
-    <key name="music-audiosink" type="s">
-      <default>"@DEFAULT_AUDIOSINK@"</default>
-      <summary>default GStreamer audiosink for Music and Movies</summary>
-      <description>GStreamer can play audio using any number of
-      output elements. Some possible choices are osssink, pulsesink
-      and alsasink. The audiosink can be a partial pipeline instead
-      of just one element.</description>
-    </key>
-    <key name="music-audiosink-description" type="s">
-      <default>"Default"</default>
-      <summary>description for default GStreamer audiosink for Music and Movies</summary>
-      <description>Describes the selected audiosink element.</description>
-    </key>
-    <key name="videosink" type="s">
-      <default>"@DEFAULT_VIDEOSINK@"</default>
-      <summary>default GStreamer videosink</summary>
-      <description>GStreamer can play video using any number of
-      output elements. Some possible choices are xvimagesink,
-      ximagesink, sdlvideosink and aasink. The videosink can be
-      a partial pipeline instead of just one element.</description>
-    </key>
-    <key name="videosink-description" type="s">
-      <default>"Default"</default>
-      <summary>description for default GStreamer videosink</summary>
-      <description>Describes the selected videosink element.</description>
-    </key>
-    <key name="audiosrc" type="s">
-      <default>"@DEFAULT_AUDIOSRC@"</default>
-      <summary>default GStreamer audiosrc</summary>
-      <description>GStreamer can record audio using any number of
-      input elements. Some possible choices are osssrc, pulsesrc and
-      alsasrc. The audio source can be a partial pipeline instead of
-      just one element.</description>
-    </key>
-    <key name="audiosrc-description" type="s">
-      <default>"Default"</default>
-      <summary>description for default GStreamer audiosrc</summary>
-      <description>Describes the selected audiosrc element.</description>
-    </key>
-    <key name="videosrc" type="s">
-      <default>"@DEFAULT_VIDEOSRC@"</default>
-      <summary>default GStreamer videosrc</summary>
-      <description>GStreamer can record video from any number of input elements.
-      Some possible choices are v4lsrc, v4l2src and videotestsrc. The video
-      source can be a partial pipeline instead of just one element.</description>
-    </key>
-    <key name="videosrc-description" type="s">
-      <default>"Default"</default>
-      <summary>description for default GStreamer videosrc</summary>
-      <description>Describes the selected videosrc element.</description>
-    </key>
-    <key name="visualization" type="s">
-      <default>"@DEFAULT_VISUALIZER@"</default>
-      <summary>default GStreamer visualization</summary>
-      <description>GStreamer can put visualization plugins in a pipeline to
-      transform audio streams in video frames. Some possible choices are
-      goom, goom2k1 and synaesthesia. The visualization plugin can be a
-      partial pipeline instead of just one element.</description>
-    </key>
-    <key name="visualization-description" type="s">
-      <default>"Default"</default>
-      <summary>description for default GStreamer visualization</summary>
-      <description>Describes the selected visualization element.</description>
-    </key>
-  </schema>
-</schemalist>
diff --git a/ext/gsettings/plugin.c b/ext/gsettings/plugin.c
deleted file mode 100644 (file)
index b264967..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/* GStreamer
- * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gst/gst.h>
-
-#include "gstgsettingsaudiosrc.h"
-#include "gstgsettingsaudiosink.h"
-#include "gstgsettingsvideosrc.h"
-#include "gstgsettingsvideosink.h"
-
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
-  if (!gst_element_register (plugin, "gsettingsaudiosink", GST_RANK_NONE,
-          GST_TYPE_GSETTINGS_AUDIO_SINK) ||
-      !gst_element_register (plugin, "gsettingsaudiosrc", GST_RANK_NONE,
-          GST_TYPE_GSETTINGS_AUDIO_SRC) ||
-      !gst_element_register (plugin, "gsettingsvideosink", GST_RANK_NONE,
-          GST_TYPE_GSETTINGS_VIDEO_SINK) ||
-      !gst_element_register (plugin, "gsettingsvideosrc", GST_RANK_NONE,
-          GST_TYPE_GSETTINGS_VIDEO_SRC))
-    return FALSE;
-
-  return TRUE;
-}
-
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
-    GST_VERSION_MINOR,
-    gsettings,
-    "GSettings plugin",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
diff --git a/m4/gsettings.m4 b/m4/gsettings.m4
deleted file mode 100644 (file)
index 429d04b..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-dnl GLIB_GSETTINGS
-dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
-dnl the schema should be compiled
-dnl
-
-AC_DEFUN([GLIB_GSETTINGS],
-[
-  m4_pattern_allow([AM_V_GEN])
-  AC_ARG_ENABLE(schemas-compile,
-                AC_HELP_STRING([--disable-schemas-compile],
-                               [Disable regeneration of gschemas.compiled on install]),
-                [case ${enableval} in
-                  yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE=""  ;;
-                  no)  GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
-                  *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
-                 esac])
-  AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
-  PKG_PROG_PKG_CONFIG([0.16])
-  AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
-  if test x$cross_compiling != xyes; then
-    GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
-  else
-    AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
-  fi
-  AC_SUBST(GLIB_COMPILE_SCHEMAS)
-  if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
-    ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
-  else
-    ifelse([$1],,[:],[$1])
-  fi
-
-  GSETTINGS_RULES='
-.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
-
-mostlyclean-am: clean-gsettings-schemas
-
-gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
-
-%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
-       $(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$${d}$< && touch [$]@
-
-all-am: $(gsettings_SCHEMAS:.xml=.valid)
-uninstall-am: uninstall-gsettings-schemas
-install-data-am: install-gsettings-schemas
-
-.SECONDARY: $(gsettings_SCHEMAS)
-
-install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
-       @$(NORMAL_INSTALL)
-       if test -n "$^"; then \
-               test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
-               $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
-               test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
-       fi
-
-uninstall-gsettings-schemas:
-       @$(NORMAL_UNINSTALL)
-       @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
-       files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
-       test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
-
-clean-gsettings-schemas:
-       rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
-
-ifdef gsettings_ENUM_NAMESPACE
-$(gsettings__enum_file): $(gsettings_ENUM_FILES)
-       $(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead "  <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod "    <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail "  </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
-endif
-'
-  _GSETTINGS_SUBST(GSETTINGS_RULES)
-])
-
-dnl _GSETTINGS_SUBST(VARIABLE)
-dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
-AC_DEFUN([_GSETTINGS_SUBST],
-[
-AC_SUBST([$1])
-m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
-]
-)
index ddfa7d0..03d603f 100644 (file)
@@ -1,6 +1,5 @@
 ext/dash/gstdashdemux.c
 ext/gl/gstgltestsrc.c
-ext/gsettings/org.freedesktop.gstreamer.default-elements.gschema.xml.in
 ext/opencv/gsttemplatematch.cpp
 ext/resindvd/resindvdsrc.c
 ext/smoothstreaming/gstmssdemux.c
index 48d1afa..43a1122 100644 (file)
@@ -16,8 +16,8 @@ AM_TESTS_ENVIRONMENT = \
        GST_PLUGIN_LOADING_WHITELIST="gstreamer@$(GST_PLUGINS_DIR):gst-plugins-base@$(GSTPB_PLUGINS_DIR):gst-plugins-good:gst-plugins-ugly:gst-libav:gst-plugins-bad@$(top_builddir)" \
        GST_STATE_IGNORE_ELEMENTS="apexsink avdtpsrc camerabin dc1394src \
            dccpclientsrc dccpclientsink dccpserversrc dccpserversink decklinksrc \
-           decklinksink dtlssrtpdec dtlssrtpenc dvbsrc dvbbasebin dfbvideosink festival fluidsynth gsettingsvideosrc \
-           gsettingsvideosink gsettingsaudiosrc gsettingsaudiosink linsyssdisrc linsyssdisink nassink \
+           decklinksink dtlssrtpdec dtlssrtpenc dvbsrc dvbbasebin dfbvideosink festival fluidsynth \
+           linsyssdisrc linsyssdisink nassink \
            rsndvdbin sdlaudiosink sdlvideosink vcdsrc rfbsrc vdpauyuvvideo vdpauvideoyuv \
            vdpaumpegdec vdpaumpeg4dec vdpauh264dec vdpauvideopostprocess vdpausink neonhttpsrc"