summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2012-02-15 16:19:04 -0500
committerOlivier CrĂȘte <olivier.crete@collabora.com>2012-02-15 16:19:04 -0500
commitbf1bb9987d0f9ad5bdccc42d67fb0a8e78feaf0a (patch)
treecbc9bb66cd97c84cfd58c995d300af4782a59594
parentc910be247d3be7b86409fd9a77165d295d94a91f (diff)
downloadtelepathy-farstream-bf1bb9987d0f9ad5bdccc42d67fb0a8e78feaf0a.tar.gz
Remove mute as it has been removed from the spec
-rw-r--r--telepathy-farstream/call-stream.c40
-rw-r--r--telepathy-farstream/call-stream.h2
-rw-r--r--telepathy-farstream/content-priv.h7
-rw-r--r--telepathy-farstream/content.c38
-rw-r--r--telepathy-farstream/media-signalling-content.c6
5 files changed, 20 insertions, 73 deletions
diff --git a/telepathy-farstream/call-stream.c b/telepathy-farstream/call-stream.c
index a613ddf..e4286da 100644
--- a/telepathy-farstream/call-stream.c
+++ b/telepathy-farstream/call-stream.c
@@ -133,7 +133,6 @@ sending_state_changed (TpCallStream *proxy,
{
TfCallStream *self = TF_CALL_STREAM (weak_object);
FsStreamDirection dir;
- gboolean mute = FALSE;
self->sending_state = arg_State;
@@ -146,11 +145,10 @@ sending_state_changed (TpCallStream *proxy,
{
case TP_STREAM_FLOW_STATE_PENDING_START:
if (self->has_send_resource ||
- _tf_content_start_sending (TF_CONTENT (self->call_content),
- self->is_sending_muted))
+ _tf_content_start_sending (TF_CONTENT (self->call_content)))
{
self->has_send_resource = TRUE;
- self->is_sending_muted = FALSE;
+
tp_cli_call_stream_interface_media_call_complete_sending_state_change (
proxy, -1, TP_STREAM_FLOW_STATE_STARTED,
NULL, NULL, NULL, NULL);
@@ -166,29 +164,17 @@ sending_state_changed (TpCallStream *proxy,
return;
}
break;
- case TP_STREAM_FLOW_STATE_PENDING_MUTE:
- mute = TRUE;
- /* fall through */
case TP_STREAM_FLOW_STATE_PENDING_STOP:
g_object_set (self->fsstream,
"direction", dir & ~FS_DIRECTION_SEND, NULL);
if (self->has_send_resource)
{
- _tf_content_stop_sending (TF_CONTENT (self->call_content), mute);
+ _tf_content_stop_sending (TF_CONTENT (self->call_content));
self->has_send_resource = FALSE;
-
- self->is_sending_muted = mute;
- }
- else if (!mute && self->is_sending_muted)
- {
- _tf_content_mute_to_stop_sending (TF_CONTENT (self->call_content));
- self->is_sending_muted = FALSE;
}
tp_cli_call_stream_interface_media_call_complete_sending_state_change (
- proxy, -1, arg_State == TP_STREAM_FLOW_STATE_PENDING_STOP ?
- TP_STREAM_FLOW_STATE_STOPPED : TP_STREAM_FLOW_STATE_MUTED,
- NULL, NULL, NULL, NULL);
+ proxy, -1, TP_STREAM_FLOW_STATE_STOPPED, NULL, NULL, NULL, NULL);
break;
default:
break;
@@ -203,7 +189,6 @@ tf_call_stream_start_receiving (TfCallStream *self, FsStreamDirection dir)
&self->contact_handle, 1))
{
self->has_receive_resource = TRUE;
- self->is_receiving_muted = FALSE;
if (self->fsstream)
g_object_set (self->fsstream,
"direction", dir | FS_DIRECTION_RECV, NULL);
@@ -227,7 +212,6 @@ receiving_state_changed (TpCallStream *proxy,
{
TfCallStream *self = TF_CALL_STREAM (weak_object);
FsStreamDirection dir;
- gboolean mute = FALSE;
self->receiving_state = arg_State;
@@ -241,30 +225,18 @@ receiving_state_changed (TpCallStream *proxy,
case TP_STREAM_FLOW_STATE_PENDING_START:
tf_call_stream_start_receiving (self, dir);
break;
- case TP_STREAM_FLOW_STATE_PENDING_MUTE:
- mute = TRUE;
- /* fall through */
case TP_STREAM_FLOW_STATE_PENDING_STOP:
g_object_set (self->fsstream,
"direction", dir & ~FS_DIRECTION_RECV, NULL);
if (self->has_receive_resource)
{
- _tf_content_stop_receiving (TF_CONTENT (self->call_content), mute,
+ _tf_content_stop_receiving (TF_CONTENT (self->call_content),
&self->contact_handle, 1);
self->has_receive_resource = FALSE;
- self->is_receiving_muted = mute;
- }
- else if (!mute && self->is_receiving_muted)
- {
- self->is_receiving_muted = FALSE;
- _tf_content_stop_receiving (TF_CONTENT (self->call_content), FALSE,
- &self->contact_handle, 1);
}
tp_cli_call_stream_interface_media_call_complete_receiving_state_change (
- proxy, -1, arg_State == TP_STREAM_FLOW_STATE_PENDING_STOP ?
- TP_STREAM_FLOW_STATE_STOPPED : TP_STREAM_FLOW_STATE_MUTED,
- NULL, NULL, NULL, NULL);
+ proxy, -1, TP_STREAM_FLOW_STATE_STOPPED, NULL, NULL, NULL, NULL);
break;
default:
break;
diff --git a/telepathy-farstream/call-stream.h b/telepathy-farstream/call-stream.h
index 33bbf37..31961c1 100644
--- a/telepathy-farstream/call-stream.h
+++ b/telepathy-farstream/call-stream.h
@@ -91,11 +91,9 @@ struct _TfCallStream {
TpStreamFlowState sending_state;
gboolean has_send_resource;
- gboolean is_sending_muted;
TpStreamFlowState receiving_state;
gboolean has_receive_resource;
- gboolean is_receiving_muted;
gboolean has_contact;
guint contact_handle;
diff --git a/telepathy-farstream/content-priv.h b/telepathy-farstream/content-priv.h
index 93eadd2..ab137da 100644
--- a/telepathy-farstream/content-priv.h
+++ b/telepathy-farstream/content-priv.h
@@ -13,7 +13,6 @@ struct _TfContent {
GObject parent;
guint sending_count;
- guint sending_muted_count;
};
struct _TfContentClass{
@@ -32,8 +31,8 @@ struct _TfContentClass{
guint handle_count);
};
-gboolean _tf_content_start_sending (TfContent *self, gboolean was_muted);
-void _tf_content_stop_sending (TfContent *self, gboolean mute);
+gboolean _tf_content_start_sending (TfContent *self);
+void _tf_content_stop_sending (TfContent *self);
void _tf_content_mute_to_stop_sending (TfContent *self);
void _tf_content_emit_src_pad_added (TfContent *self, guint handle,
@@ -41,7 +40,7 @@ void _tf_content_emit_src_pad_added (TfContent *self, guint handle,
gboolean _tf_content_start_receiving (TfContent *self, guint *handles,
guint handle_count);
-void _tf_content_stop_receiving (TfContent *self, gboolean mute,
+void _tf_content_stop_receiving (TfContent *self,
guint *handles, guint handle_count);
G_END_DECLS
diff --git a/telepathy-farstream/content.c b/telepathy-farstream/content.c
index 6ae4ec9..5a76dd6 100644
--- a/telepathy-farstream/content.c
+++ b/telepathy-farstream/content.c
@@ -142,7 +142,6 @@ tf_content_class_init (TfContentClass *klass)
/**
* TfContent::stop-sending
* @content: the #TfContent
- * @mute: If %TRUE, this is a temporary mute, if %FALSE it is permanent
*
* This signal is emitted when the connection manager ask to stop
* sending media
@@ -154,7 +153,7 @@ tf_content_class_init (TfContentClass *klass)
G_SIGNAL_RUN_LAST,
0, NULL, NULL,
g_cclosure_marshal_VOID__BOOLEAN,
- G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
+ G_TYPE_NONE, 0);
/**
* TfContent::src-pad-added
@@ -210,7 +209,6 @@ tf_content_class_init (TfContentClass *klass)
/**
* TfContent::stop-receiving
* @content: the #TfContent
- * @mute: If %TRUE, this is a temporary mute, if %FALSE it is permanent
* @handles: a 0-terminated array of #guint containing the handles
* @handle_count: The number of handles in the @handles array
*
@@ -224,7 +222,7 @@ tf_content_class_init (TfContentClass *klass)
G_SIGNAL_RUN_LAST,
0, NULL, NULL,
_tf_marshal_VOID__BOOLEAN_POINTER_UINT,
- G_TYPE_NONE, 3, G_TYPE_BOOLEAN, G_TYPE_POINTER, G_TYPE_UINT);
+ G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_UINT);
/**
* TfContent::restart-source:
@@ -251,7 +249,7 @@ tf_content_init (TfContent *self)
gboolean
-_tf_content_start_sending (TfContent *self, gboolean was_muted)
+_tf_content_start_sending (TfContent *self)
{
GValue instance = {0};
GValue sending_success_val = {0,};
@@ -260,8 +258,6 @@ _tf_content_start_sending (TfContent *self, gboolean was_muted)
if (self->sending_count)
{
- if (was_muted)
- self->sending_muted_count --;
self->sending_count ++;
return TRUE;
}
@@ -285,39 +281,22 @@ _tf_content_start_sending (TfContent *self, gboolean was_muted)
self->sending_count = 1;
- if (was_muted)
- self->sending_muted_count --;
-
return sending_success;
}
void
-_tf_content_stop_sending (TfContent *self, gboolean mute)
+_tf_content_stop_sending (TfContent *self)
{
self->sending_count --;
- if (mute)
- self->sending_muted_count ++;
-
if (self->sending_count == 0)
{
- g_signal_emit (self, signals[SIGNAL_STOP_SENDING], 0,
- self->sending_muted_count != 0);
+ g_signal_emit (self, signals[SIGNAL_STOP_SENDING], 0);
}
}
void
-_tf_content_mute_to_stop_sending (TfContent *self)
-{
- self->sending_muted_count --;
-
- if (self->sending_count == 0 && self->sending_muted_count == 0)
- g_signal_emit (self, signals[SIGNAL_STOP_SENDING], 0,
- TRUE);
-}
-
-void
_tf_content_emit_src_pad_added (TfContent *self, guint handle,
FsStream *stream, GstPad *pad, FsCodec *codec)
{
@@ -441,12 +420,11 @@ _tf_content_start_receiving (TfContent *self, guint *handles,
}
void
-_tf_content_stop_receiving (TfContent *self, gboolean mute, guint *handles,
+_tf_content_stop_receiving (TfContent *self, guint *handles,
guint handle_count)
{
- g_debug ("Requesting that the application %s receiving",
- mute ? "mute" : "stop");
- g_signal_emit (self, signals[SIGNAL_STOP_RECEIVING], 0, mute, handles,
+ g_debug ("Requesting that the application stop receiving");
+ g_signal_emit (self, signals[SIGNAL_STOP_RECEIVING], 0, handles,
handle_count);
}
diff --git a/telepathy-farstream/media-signalling-content.c b/telepathy-farstream/media-signalling-content.c
index bf0d621..e11edc8 100644
--- a/telepathy-farstream/media-signalling-content.c
+++ b/telepathy-farstream/media-signalling-content.c
@@ -244,7 +244,7 @@ request_resource (TfStream *stream, guint direction,
TfMediaSignallingContent *self)
{
if (direction & TP_MEDIA_STREAM_DIRECTION_SEND)
- return _tf_content_start_sending (TF_CONTENT (self), FALSE);
+ return _tf_content_start_sending (TF_CONTENT (self));
else if (direction & TP_MEDIA_STREAM_DIRECTION_RECEIVE)
{
if (!self->receiving)
@@ -269,11 +269,11 @@ free_resource (TfStream *stream, guint direction,
guint handles[2] = { self->handle, 0};
if (direction & TP_MEDIA_STREAM_DIRECTION_SEND)
- _tf_content_stop_sending (TF_CONTENT (self), FALSE);
+ _tf_content_stop_sending (TF_CONTENT (self));
if (self->receiving && direction & TP_MEDIA_STREAM_DIRECTION_RECEIVE)
{
- _tf_content_stop_receiving (TF_CONTENT (self), FALSE, handles, 1);
+ _tf_content_stop_receiving (TF_CONTENT (self), handles, 1);
self->receiving = FALSE;
}
}