[telepathy-stream-engine/refs/tags/telepathy-stream-engine_0.5.10] Intercept enter and leave status changes
Olivier Crête
olivier.crete at collabora.co.uk
Mon Oct 26 09:28:23 PDT 2009
---
src/tp-stream-engine.c | 35 ++++++++++++++++++++++++++++++++---
1 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/src/tp-stream-engine.c b/src/tp-stream-engine.c
index 18fb598..f33ce80 100644
--- a/src/tp-stream-engine.c
+++ b/src/tp-stream-engine.c
@@ -967,6 +967,16 @@ bus_async_handler (GstBus *bus G_GNUC_UNUSED,
return TRUE;
}
+static void
+enter_thread (TpStreamEngine *self, GstObject *src, GstElement *owner)
+{
+}
+
+static void
+leave_thread (TpStreamEngine *self, GstObject *src, GstElement *owner)
+{
+}
+
static GstBusSyncReply
bus_sync_handler (GstBus *bus G_GNUC_UNUSED, GstMessage *message, gpointer data)
{
@@ -1016,13 +1026,32 @@ bus_sync_handler (GstBus *bus G_GNUC_UNUSED, GstMessage *message, gpointer data)
gst_message_unref (message);
return GST_BUS_DROP;
}
- else
- return GST_BUS_PASS;
+ }
+ break;
+ case GST_MESSAGE_STREAM_STATUS:
+ {
+ GstStreamStatusType type;
+ GstElement *owner;
+
+ gst_message_parse_stream_status (message, &type, &owner);
+
+ switch (type)
+ {
+ case GST_STREAM_STATUS_TYPE_ENTER:
+ enter_thread (self, GST_MESSAGE_SRC (message), owner);
+ break;
+ case GST_STREAM_STATUS_TYPE_LEAVE:
+ leave_thread (self, GST_MESSAGE_SRC (message), owner);
+ break;
+ default:
+ break;
+ }
}
break;
default:
- return GST_BUS_PASS;
+ break;
}
+ return GST_BUS_PASS;
}
static void
--
1.5.6.5
More information about the telepathy-commits
mailing list