summaryrefslogtreecommitdiff
path: root/src/media-stream.c
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2009-05-22 16:22:55 +0100
committerWill Thompson <will.thompson@collabora.co.uk>2009-05-22 16:28:13 +0100
commitffd77ab0b51653e17154ceb8883feb23571ce8a7 (patch)
treee3d22e94389efff74c1e5101ce59b4202f026617 /src/media-stream.c
parent5a17e139f6dcb3de92403b02994047f9010e59b9 (diff)
Apply current held-ness to new streams
Fixes fd.o #21878.
Diffstat (limited to 'src/media-stream.c')
-rw-r--r--src/media-stream.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/media-stream.c b/src/media-stream.c
index 71367db84..ef3831b7e 100644
--- a/src/media-stream.c
+++ b/src/media-stream.c
@@ -157,11 +157,12 @@ static void update_sending (GabbleMediaStream *stream, gboolean start_sending);
GabbleMediaStream *
gabble_media_stream_new (const gchar *object_path,
- GabbleJingleContent *content,
- const gchar *name,
- guint id,
- const gchar *nat_traversal,
- const GPtrArray *relay_info)
+ GabbleJingleContent *content,
+ const gchar *name,
+ guint id,
+ const gchar *nat_traversal,
+ const GPtrArray *relay_info,
+ gboolean local_hold)
{
GPtrArray *empty = NULL;
GabbleMediaStream *result;
@@ -181,6 +182,7 @@ gabble_media_stream_new (const gchar *object_path,
"id", id,
"nat-traversal", nat_traversal,
"relay-info", relay_info,
+ "local-hold", local_hold,
NULL);
if (empty != NULL)
@@ -473,6 +475,9 @@ gabble_media_stream_set_property (GObject *object,
g_assert (priv->relay_info == NULL);
priv->relay_info = g_value_dup_boxed (value);
break;
+ case PROP_LOCAL_HOLD:
+ priv->local_hold = g_value_get_boolean (value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -582,7 +587,7 @@ gabble_media_stream_class_init (GabbleMediaStreamClass *gabble_media_stream_clas
param_spec = g_param_spec_boolean ("local-hold", "Local hold?",
"True if resources used for this stream have been freed.", FALSE,
- G_PARAM_READABLE |
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_NAME | G_PARAM_STATIC_BLURB | G_PARAM_STATIC_NICK);
g_object_class_install_property (object_class, PROP_LOCAL_HOLD, param_spec);
@@ -1036,6 +1041,13 @@ gabble_media_stream_ready (TpSvcMediaStreamHandler *iface,
push_remote_candidates (self);
push_playing (self);
push_sending (self);
+
+ /* If a new stream is added while the call's on hold, it will have
+ * local_hold set at construct time. So once tp-fs has called Ready(), we
+ * should let it know this stream's on hold.
+ */
+ if (priv->local_hold)
+ gabble_media_stream_hold (self, priv->local_hold);
}
else
{