summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2011-09-07 22:05:21 (GMT)
committerOlivier CrĂȘte <olivier.crete@collabora.com>2011-09-12 20:07:40 (GMT)
commitca5a5dbb031a23fc29308099ee1f21983206652e (patch)
treedeb58daf33654c2cd96aa3dd4f74cc167f6933ee
parent0c09ee8c0e113de1d9c8236a8e55f013f5ddabff (diff)
downloadtelepathy-farsight-ca5a5dbb031a23fc29308099ee1f21983206652e.tar.gz
telepathy-farsight-ca5a5dbb031a23fc29308099ee1f21983206652e.tar.xz
Transform the farsight2 renegotiate message into a restart-source signalHEADmaster
-rw-r--r--telepathy-farsight/stream.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/telepathy-farsight/stream.c b/telepathy-farsight/stream.c
index e41d5dc..23ae61a 100644
--- a/telepathy-farsight/stream.c
+++ b/telepathy-farsight/stream.c
@@ -133,6 +133,7 @@ enum
REQUEST_RESOURCE,
FREE_RESOURCE,
SRC_PAD_ADDED,
+ RESTART_SOURCE,
SIGNAL_COUNT
};
@@ -747,6 +748,24 @@ tf_stream_class_init (TfStreamClass *klass)
NULL, NULL,
_tf_marshal_VOID__OBJECT_BOXED,
G_TYPE_NONE, 2, GST_TYPE_PAD, FS_TYPE_CODEC);
+
+
+ /**
+ * TfStream::restart-source:
+ * @stream: the stream
+ *
+ * This is emitted when there is a caps change and the source should be
+ * restarted to take this into account.
+ */
+
+ signals[RESTART_SOURCE] =
+ g_signal_new ("restart-source",
+ G_OBJECT_CLASS_TYPE (klass),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL, NULL,
+ _tf_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
}
static void
@@ -2667,6 +2686,21 @@ _tf_stream_bus_message (TfStream *stream,
cb_fs_component_state_changed (stream, component, fsstate);
return TRUE;
}
+ else if (gst_structure_has_name (s, "farsight-renegotiate"))
+ {
+ FsSession *fssession;
+ const GValue *value;
+
+ value = gst_structure_get_value (s, "session");
+ fssession = g_value_get_object (value);
+
+ if (fssession != stream->priv->fs_session)
+ return FALSE;
+
+ g_signal_emit (stream, signals[RESTART_SOURCE], 0);
+
+ return TRUE;
+ }
return FALSE;
}