summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.co.uk>2009-04-24 15:04:37 (GMT)
committerOlivier CrĂȘte <olivier.crete@collabora.co.uk>2010-09-09 08:20:53 (GMT)
commit3d19ba7854899891f8bdf01acb754f1636ab0dcd (patch)
tree5e2feb780605b129436a8bafee119f93095c479a
parent46ae713c760313ea7b311c1a6f9bff9a508bdc8d (diff)
downloadtelepathy-stream-engine-3d19ba7854899891f8bdf01acb754f1636ab0dcd.tar.gz
telepathy-stream-engine-3d19ba7854899891f8bdf01acb754f1636ab0dcd.tar.xz
Remove GTK+ dep, video will not work
-rw-r--r--configure.ac5
-rw-r--r--src/Makefile.am2
-rw-r--r--src/stream-engine-main.c3
-rw-r--r--src/videosink.c113
4 files changed, 1 insertions, 122 deletions
diff --git a/configure.ac b/configure.ac
index cbee15e..f7c24ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -139,11 +139,6 @@ PKG_CHECK_MODULES(HAL, [hal])
AC_SUBST(HAL_CFLAGS)
AC_SUBST(HAL_LIBS)
-dnl libx11
-PKG_CHECK_MODULES(X11, [x11 gtk+-2.0])
-AC_SUBST(X11_CFLAGS)
-AC_SUBST(X11_LIBS)
-
AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
AC_DEFINE_UNQUOTED(SYSCONFDIR, "$SYSCONFDIR", [System configuration directory])
diff --git a/src/Makefile.am b/src/Makefile.am
index e92061d..f97cf7c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -29,7 +29,6 @@ AM_CFLAGS = \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS) \
$(HAL_CFLAGS) \
- $(X11_CFLAGS) \
$(GST_CFLAGS) \
$(GST_VIDEO_CFLAGS) \
$(GST_INTERFACES_CFLAGS) \
@@ -43,7 +42,6 @@ AM_LDFLAGS = \
$(GLIB_LIBS) \
$(DBUS_LIBS) \
$(HAL_LIBS) \
- $(X11_LIBS) \
$(GST_LIBS) \
$(GST_VIDEO_LIBS) \
$(GST_INTERFACES_LIBS) \
diff --git a/src/stream-engine-main.c b/src/stream-engine-main.c
index 239674a..d2c474c 100644
--- a/src/stream-engine-main.c
+++ b/src/stream-engine-main.c
@@ -42,8 +42,6 @@
#include <glib.h>
#include <glib/gstdio.h>
-#include <gtk/gtk.h>
-
#include <dbus/dbus-glib.h>
#include <gst/gst.h>
@@ -202,7 +200,6 @@ int main(int argc, char **argv)
optcontext = g_option_context_new ("Telepathy Stream Engine");
g_option_context_add_group (optcontext, gst_init_get_option_group ());
- g_option_context_add_group (optcontext, gtk_get_option_group (TRUE));
if (g_option_context_parse (optcontext, &argc, &argv, &error) == FALSE) {
g_print ("%s\nRun '%s --help' to see a full list of available command line options.\n",
diff --git a/src/videosink.c b/src/videosink.c
index f71b949..621422c 100644
--- a/src/videosink.c
+++ b/src/videosink.c
@@ -33,8 +33,6 @@
#include <tp-stream-engine.h>
-#include <gtk/gtk.h>
-
#include "tp-stream-engine-signals-marshal.h"
#include "util.h"
@@ -46,7 +44,6 @@ G_DEFINE_ABSTRACT_TYPE (TpStreamEngineVideoSink, tp_stream_engine_video_sink,
struct _TpStreamEngineVideoSinkPrivate
{
GstElement *sink;
- GtkWidget *plug;
GstPad *sinkpad;
@@ -54,9 +51,6 @@ struct _TpStreamEngineVideoSinkPrivate
gboolean is_preview;
- gulong delete_event_handler_id;
- gulong embedded_handler_id;
-
GstClockTime last_timestamp;
gdouble framerate;
GstElement *textoverlay;
@@ -343,35 +337,6 @@ make_video_sink (TpStreamEngineVideoSink *self, gboolean is_preview)
return sink;
}
-
-static gboolean
-delete_event (GtkWidget *widget, GdkEvent *event, gpointer user_data)
-{
- g_signal_emit (user_data, signals[PLUG_DELETED], 0);
-
- gtk_widget_hide (widget);
- return TRUE;
-}
-
-static void
-embedded_event (GtkWidget *widget, gpointer user_data)
-{
- gboolean embedded;
-
- g_object_get (widget, "embedded", &embedded, NULL);
-
- if (embedded)
- gtk_widget_show (widget);
-}
-
-static gboolean
-expose_handler (GtkWidget *widget,
- GdkEventExpose *event,
- gpointer user_data)
-{
- return TRUE;
-}
-
static GObject *
tp_stream_engine_video_sink_constructor (GType type,
guint n_props,
@@ -389,19 +354,6 @@ tp_stream_engine_video_sink_constructor (GType type,
if (self->priv->sink)
gst_object_ref (self->priv->sink);
- self->priv->plug = gtk_plug_new (0);
- gtk_widget_set_size_request (self->priv->plug, 176, 144);
- gtk_widget_set_double_buffered (self->priv->plug, FALSE);
- gtk_widget_set_app_paintable (self->priv->plug, TRUE);
- self->priv->delete_event_handler_id = g_signal_connect (self->priv->plug,
- "delete-event", G_CALLBACK (delete_event), self);
- self->priv->embedded_handler_id = g_signal_connect (self->priv->plug,
- "embedded", G_CALLBACK (embedded_event), NULL);
- g_signal_connect (self->priv->plug, "expose-event",
- G_CALLBACK (expose_handler), NULL);
-
- self->priv->window_id = gtk_plug_get_id (GTK_PLUG (self->priv->plug));
-
return obj;
}
@@ -433,26 +385,6 @@ tp_stream_engine_video_sink_dispose (GObject *object)
self->priv->size_change_idle_id = 0;
g_static_mutex_unlock (&self->priv->mutex);
- if (self->priv->delete_event_handler_id)
- {
- g_signal_handler_disconnect (self->priv->plug,
- self->priv->delete_event_handler_id);
- self->priv->delete_event_handler_id = 0;
- }
-
- if (self->priv->embedded_handler_id)
- {
- g_signal_handler_disconnect (self->priv->plug,
- self->priv->embedded_handler_id);
- self->priv->embedded_handler_id = 0;
- }
-
- if (self->priv->plug)
- {
- gtk_widget_destroy (self->priv->plug);
- self->priv->plug = NULL;
- }
-
if (G_OBJECT_CLASS (tp_stream_engine_video_sink_parent_class)->dispose)
G_OBJECT_CLASS (tp_stream_engine_video_sink_parent_class)->dispose (
object);
@@ -666,53 +598,10 @@ tp_stream_engine_video_sink_class_init (TpStreamEngineVideoSinkClass *klass)
G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
}
-struct xid_data
-{
- GstElement *src;
- gulong window_id;
- gboolean found;
-};
-
-static void
-set_window_xid (gpointer data, gpointer user_data)
-{
- GstXOverlay *xov = GST_X_OVERLAY (data);
- struct xid_data *xiddata = (struct xid_data *) user_data;
-
- if (GST_ELEMENT_CAST(xov) == xiddata->src) {
- gst_x_overlay_set_xwindow_id (xov, xiddata->window_id);
- xiddata->found = TRUE;
- }
-
- gst_object_unref (data);
-}
-
gboolean
tp_stream_engine_video_sink_bus_sync_message (
TpStreamEngineVideoSink *self,
GstMessage *message)
{
- const GstStructure *s;
- GstIterator *it = NULL;
- struct xid_data xiddata;
-
- if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT)
- return FALSE;
-
- s = gst_message_get_structure (message);
- if (!gst_structure_has_name (s, "prepare-xwindow-id"))
- return FALSE;
-
- xiddata.src = GST_ELEMENT (GST_MESSAGE_SRC (message));
- xiddata.window_id = self->priv->window_id;
- xiddata.found = FALSE;
-
- it = gst_bin_iterate_all_by_interface (GST_BIN (self->priv->sink),
- GST_TYPE_X_OVERLAY);
- while (gst_iterator_foreach (it, set_window_xid, &xiddata) ==
- GST_ITERATOR_RESYNC)
- gst_iterator_resync (it);
- gst_iterator_free (it);
-
- return xiddata.found;
+ return FALSE;
}