1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2007 Elliot Fairweather
4 * Copyright (C) 2007-2008 Collabora Ltd.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 * Authors: Elliot Fairweather <elliot.fairweather@collabora.co.uk>
21 * Xavier Claessens <xclaesse@gmail.com>
26 #include <telepathy-glib/proxy-subclass.h>
27 #include <telepathy-glib/dbus.h>
29 #include <extensions/extensions.h>
30 #include <libempathy/empathy-contact-factory.h>
31 #include <libempathy/empathy-debug.h>
32 #include <libempathy/empathy-tp-group.h>
33 #include <libempathy/empathy-utils.h>
35 #include "empathy-tp-call.h"
37 #define DEBUG_DOMAIN "TpCall"
39 #define GET_PRIV(object) (G_TYPE_INSTANCE_GET_PRIVATE \
40 ((object), EMPATHY_TYPE_TP_CALL, EmpathyTpCallPriv))
42 #define STREAM_ENGINE_BUS_NAME "org.freedesktop.Telepathy.StreamEngine"
43 #define STREAM_ENGINE_OBJECT_PATH "/org/freedesktop/Telepathy/StreamEngine"
45 typedef struct _EmpathyTpCallPriv EmpathyTpCallPriv;
47 struct _EmpathyTpCallPriv
50 TpProxy *stream_engine;
51 TpDBusDaemon *dbus_daemon;
52 EmpathyTpGroup *group;
53 EmpathyContact *contact;
56 gboolean stream_engine_running;
58 EmpathyTpCallStream *audio;
59 EmpathyTpCallStream *video;
73 G_DEFINE_TYPE (EmpathyTpCall, empathy_tp_call, G_TYPE_OBJECT)
76 tp_call_add_stream (EmpathyTpCall *call,
81 guint stream_direction)
83 EmpathyTpCallPriv *priv = GET_PRIV (call);
87 case TP_MEDIA_STREAM_TYPE_AUDIO:
88 empathy_debug (DEBUG_DOMAIN,
89 "Audio stream - id: %d, state: %d, direction: %d",
90 stream_id, stream_state, stream_direction);
91 priv->audio->exists = TRUE;
92 priv->audio->id = stream_id;
93 priv->audio->state = stream_state;
94 priv->audio->direction = stream_direction;
95 g_object_notify (G_OBJECT (call), "audio-stream");
97 case TP_MEDIA_STREAM_TYPE_VIDEO:
98 empathy_debug (DEBUG_DOMAIN,
99 "Video stream - id: %d, state: %d, direction: %d",
100 stream_id, stream_state, stream_direction);
101 priv->video->exists = TRUE;
102 priv->video->id = stream_id;
103 priv->video->state = stream_state;
104 priv->video->direction = stream_direction;
105 g_object_notify (G_OBJECT (call), "video-stream");
108 empathy_debug (DEBUG_DOMAIN, "Unknown stream type: %d",
114 tp_call_stream_added_cb (TpChannel *channel,
116 guint contact_handle,
121 empathy_debug (DEBUG_DOMAIN,
122 "Stream added - stream id: %d, contact handle: %d, stream type: %d",
123 stream_id, contact_handle, stream_type);
125 tp_call_add_stream (EMPATHY_TP_CALL (call), stream_id, contact_handle,
126 stream_type, TP_MEDIA_STREAM_STATE_DISCONNECTED,
127 TP_MEDIA_STREAM_DIRECTION_NONE);
131 tp_call_stream_removed_cb (TpChannel *channel,
136 EmpathyTpCallPriv *priv = GET_PRIV (call);
138 empathy_debug (DEBUG_DOMAIN, "Stream removed - stream id: %d", stream_id);
140 if (stream_id == priv->audio->id)
142 priv->audio->exists = FALSE;
143 g_object_notify (call, "audio-stream");
145 else if (stream_id == priv->video->id)
147 priv->video->exists = FALSE;
148 g_object_notify (call, "video-stream");
153 tp_call_stream_state_changed_cb (TpChannel *proxy,
159 EmpathyTpCallPriv *priv = GET_PRIV (call);
161 empathy_debug (DEBUG_DOMAIN,
162 "Stream state changed - stream id: %d, state state: %d",
163 stream_id, stream_state);
165 if (stream_id == priv->audio->id)
167 priv->audio->state = stream_state;
168 g_object_notify (call, "audio-stream");
170 else if (stream_id == priv->video->id)
172 priv->video->state = stream_state;
173 g_object_notify (call, "video-stream");
178 tp_call_stream_direction_changed_cb (TpChannel *channel,
180 guint stream_direction,
185 EmpathyTpCallPriv *priv = GET_PRIV (call);
187 empathy_debug (DEBUG_DOMAIN,
188 "Stream direction changed - stream: %d, direction: %d",
189 stream_id, stream_direction);
191 if (stream_id == priv->audio->id)
193 priv->audio->direction = stream_direction;
194 g_object_notify (call, "audio-stream");
196 else if (stream_id == priv->video->id)
198 priv->video->direction = stream_direction;
199 g_object_notify (call, "video-stream");
204 tp_call_request_streams_cb (TpChannel *channel,
205 const GPtrArray *streams,
214 empathy_debug (DEBUG_DOMAIN, "Error requesting streams: %s", error->message);
218 for (i = 0; i < streams->len; i++)
222 guint contact_handle;
225 guint stream_direction;
227 values = g_ptr_array_index (streams, i);
228 stream_id = g_value_get_uint (g_value_array_get_nth (values, 0));
229 contact_handle = g_value_get_uint (g_value_array_get_nth (values, 1));
230 stream_type = g_value_get_uint (g_value_array_get_nth (values, 2));
231 stream_state = g_value_get_uint (g_value_array_get_nth (values, 3));
232 stream_direction = g_value_get_uint (g_value_array_get_nth (values, 4));
234 tp_call_add_stream (EMPATHY_TP_CALL (call), stream_id, contact_handle,
235 stream_type, stream_state, stream_direction);
240 tp_call_request_streams_for_capabilities (EmpathyTpCall *call,
241 EmpathyCapabilities capabilities)
243 EmpathyTpCallPriv *priv = GET_PRIV (call);
244 GArray *stream_types;
248 if (capabilities == EMPATHY_CAPABILITIES_UNKNOWN)
249 capabilities = EMPATHY_CAPABILITIES_AUDIO | EMPATHY_CAPABILITIES_VIDEO;
251 empathy_debug (DEBUG_DOMAIN, "Requesting new stream for capabilities %d",
254 stream_types = g_array_new (FALSE, FALSE, sizeof (guint));
255 handle = empathy_contact_get_handle (priv->contact);
257 if (capabilities & EMPATHY_CAPABILITIES_AUDIO)
259 stream_type = TP_MEDIA_STREAM_TYPE_AUDIO;
260 g_array_append_val (stream_types, stream_type);
262 if (capabilities & EMPATHY_CAPABILITIES_VIDEO)
264 stream_type = TP_MEDIA_STREAM_TYPE_VIDEO;
265 g_array_append_val (stream_types, stream_type);
268 tp_cli_channel_type_streamed_media_call_request_streams (priv->channel, -1,
269 handle, stream_types, tp_call_request_streams_cb, NULL, NULL,
272 g_array_free (stream_types, TRUE);
276 tp_call_request_streams (EmpathyTpCall *call)
278 EmpathyTpCallPriv *priv = GET_PRIV (call);
280 tp_call_request_streams_for_capabilities (call,
281 empathy_contact_get_capabilities (priv->contact));
285 tp_call_member_added_cb (EmpathyTpGroup *group,
286 EmpathyContact *contact,
287 EmpathyContact *actor,
289 const gchar *message,
292 EmpathyTpCallPriv *priv = GET_PRIV (call);
294 if (!priv->contact && !empathy_contact_is_user (contact))
296 priv->contact = g_object_ref (contact);
297 priv->is_incoming = TRUE;
298 priv->status = EMPATHY_TP_CALL_STATUS_PENDING;
299 tp_call_request_streams (call);
300 g_object_notify (G_OBJECT (call), "is-incoming");
301 g_object_notify (G_OBJECT (call), "contact");
302 g_object_notify (G_OBJECT (call), "status");
305 if (priv->status == EMPATHY_TP_CALL_STATUS_PENDING &&
306 ((priv->is_incoming && contact != priv->contact) ||
307 (!priv->is_incoming && contact == priv->contact)))
309 priv->status = EMPATHY_TP_CALL_STATUS_ACCEPTED;
310 g_object_notify (G_OBJECT (call), "status");
315 tp_call_remote_pending_cb (EmpathyTpGroup *group,
316 EmpathyContact *contact,
317 EmpathyContact *actor,
319 const gchar *message,
322 EmpathyTpCallPriv *priv = GET_PRIV (call);
324 if (!priv->contact && !empathy_contact_is_user (contact))
326 priv->contact = g_object_ref (contact);
327 priv->is_incoming = FALSE;
328 priv->status = EMPATHY_TP_CALL_STATUS_PENDING;
329 tp_call_request_streams (call);
330 g_object_notify (G_OBJECT (call), "is-incoming");
331 g_object_notify (G_OBJECT (call), "contact");
332 g_object_notify (G_OBJECT (call), "status");
337 tp_call_channel_invalidated_cb (TpChannel *channel,
343 EmpathyTpCallPriv *priv = GET_PRIV (call);
345 empathy_debug (DEBUG_DOMAIN, "Channel invalidated: %s", message);
346 priv->status = EMPATHY_TP_CALL_STATUS_CLOSED;
347 g_object_notify (G_OBJECT (call), "status");
351 tp_call_async_cb (TpProxy *proxy,
358 empathy_debug (DEBUG_DOMAIN, "Error %s: %s",
359 user_data, error->message);
364 tp_call_close_channel (EmpathyTpCall *call)
366 EmpathyTpCallPriv *priv = GET_PRIV (call);
368 if (priv->status == EMPATHY_TP_CALL_STATUS_CLOSED)
371 empathy_debug (DEBUG_DOMAIN, "Closing channel");
373 tp_cli_channel_call_close (priv->channel, -1,
374 NULL, NULL, NULL, NULL);
376 priv->status = EMPATHY_TP_CALL_STATUS_CLOSED;
377 g_object_notify (G_OBJECT (call), "status");
381 tp_call_stream_engine_invalidated_cb (TpProxy *stream_engine,
387 empathy_debug (DEBUG_DOMAIN, "Stream engine proxy invalidated: %s",
389 tp_call_close_channel (call);
393 tp_call_stream_engine_watch_name_owner_cb (TpDBusDaemon *daemon,
395 const gchar *new_owner,
398 EmpathyTpCallPriv *priv = GET_PRIV (call);
400 /* G_STR_EMPTY(new_owner) means either stream-engine has not started yet or
401 * has crashed. We want to close the channel if stream-engine has crashed.
403 empathy_debug (DEBUG_DOMAIN,
404 "Watch SE: name='%s' SE running='%s' new_owner='%s'",
405 name, priv->stream_engine_running ? "yes" : "no",
406 new_owner ? new_owner : "none");
407 if (priv->stream_engine_running && G_STR_EMPTY (new_owner))
409 empathy_debug (DEBUG_DOMAIN, "Stream engine falled off the bus");
410 tp_call_close_channel (call);
414 priv->stream_engine_running = !G_STR_EMPTY (new_owner);
418 tp_call_stream_engine_handle_channel (EmpathyTpCall *call)
420 EmpathyTpCallPriv *priv = GET_PRIV (call);
427 empathy_debug (DEBUG_DOMAIN, "Revving up the stream engine");
429 priv->stream_engine = g_object_new (TP_TYPE_PROXY,
430 "bus-name", STREAM_ENGINE_BUS_NAME,
431 "dbus-connection", tp_get_bus (),
432 "object-path", STREAM_ENGINE_OBJECT_PATH,
434 tp_proxy_add_interface_by_id (priv->stream_engine,
435 EMP_IFACE_QUARK_STREAM_ENGINE);
436 tp_proxy_add_interface_by_id (priv->stream_engine,
437 EMP_IFACE_QUARK_CHANNEL_HANDLER);
439 g_signal_connect (priv->stream_engine, "invalidated",
440 G_CALLBACK (tp_call_stream_engine_invalidated_cb),
443 /* FIXME: dbus daemon should be unique */
444 priv->dbus_daemon = tp_dbus_daemon_new (tp_get_bus ());
445 tp_dbus_daemon_watch_name_owner (priv->dbus_daemon, STREAM_ENGINE_BUS_NAME,
446 tp_call_stream_engine_watch_name_owner_cb,
449 g_object_get (priv->channel,
450 "connection", &connection,
451 "channel-type", &channel_type,
452 "object-path", &object_path,
453 "handle_type", &handle_type,
457 emp_cli_channel_handler_call_handle_channel (priv->stream_engine, -1,
458 connection->bus_name,
459 connection->object_path,
460 channel_type, object_path, handle_type, handle,
461 tp_call_async_cb, "calling handle channel", NULL,
464 g_object_unref (connection);
465 g_free (channel_type);
466 g_free (object_path);
470 tp_call_constructor (GType type,
471 guint n_construct_params,
472 GObjectConstructParam *construct_params)
476 EmpathyTpCallPriv *priv;
478 object = G_OBJECT_CLASS (empathy_tp_call_parent_class)->constructor (type,
479 n_construct_params, construct_params);
481 call = EMPATHY_TP_CALL (object);
482 priv = GET_PRIV (call);
484 /* Setup streamed media channel */
485 g_signal_connect (priv->channel, "invalidated",
486 G_CALLBACK (tp_call_channel_invalidated_cb), call);
487 tp_cli_channel_type_streamed_media_connect_to_stream_added (priv->channel,
488 tp_call_stream_added_cb, NULL, NULL, G_OBJECT (call), NULL);
489 tp_cli_channel_type_streamed_media_connect_to_stream_removed (priv->channel,
490 tp_call_stream_removed_cb, NULL, NULL, G_OBJECT (call), NULL);
491 tp_cli_channel_type_streamed_media_connect_to_stream_state_changed (priv->channel,
492 tp_call_stream_state_changed_cb, NULL, NULL, G_OBJECT (call), NULL);
493 tp_cli_channel_type_streamed_media_connect_to_stream_direction_changed (priv->channel,
494 tp_call_stream_direction_changed_cb, NULL, NULL, G_OBJECT (call), NULL);
495 tp_cli_channel_type_streamed_media_call_list_streams (priv->channel, -1,
496 tp_call_request_streams_cb, NULL, NULL, G_OBJECT (call));
498 /* Setup group interface */
499 priv->group = empathy_tp_group_new (priv->channel);
501 g_signal_connect (priv->group, "member-added",
502 G_CALLBACK (tp_call_member_added_cb), call);
503 g_signal_connect (priv->group, "remote-pending",
504 G_CALLBACK (tp_call_remote_pending_cb), call);
506 /* Start stream engine */
507 tp_call_stream_engine_handle_channel (call);
513 tp_call_finalize (GObject *object)
515 EmpathyTpCallPriv *priv = GET_PRIV (object);
517 empathy_debug (DEBUG_DOMAIN, "Finalizing: %p", object);
519 g_slice_free (EmpathyTpCallStream, priv->audio);
520 g_slice_free (EmpathyTpCallStream, priv->video);
521 g_object_unref (priv->group);
523 if (priv->channel != NULL)
525 g_signal_handlers_disconnect_by_func (priv->channel,
526 tp_call_channel_invalidated_cb, object);
527 tp_call_close_channel (EMPATHY_TP_CALL (object));
528 g_object_unref (priv->channel);
531 if (priv->stream_engine != NULL)
533 g_signal_handlers_disconnect_by_func (priv->stream_engine,
534 tp_call_stream_engine_invalidated_cb, object);
535 g_object_unref (priv->stream_engine);
538 if (priv->contact != NULL)
539 g_object_unref (priv->contact);
541 if (priv->dbus_daemon != NULL)
543 tp_dbus_daemon_cancel_name_owner_watch (priv->dbus_daemon,
544 STREAM_ENGINE_BUS_NAME,
545 tp_call_stream_engine_watch_name_owner_cb,
547 g_object_unref (priv->dbus_daemon);
550 (G_OBJECT_CLASS (empathy_tp_call_parent_class)->finalize) (object);
554 tp_call_set_property (GObject *object,
559 EmpathyTpCallPriv *priv = GET_PRIV (object);
564 priv->channel = g_value_dup_object (value);
567 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
573 tp_call_get_property (GObject *object,
578 EmpathyTpCallPriv *priv = GET_PRIV (object);
583 g_value_set_object (value, priv->channel);
586 g_value_set_object (value, priv->contact);
588 case PROP_IS_INCOMING:
589 g_value_set_boolean (value, priv->is_incoming);
592 g_value_set_uint (value, priv->status);
594 case PROP_AUDIO_STREAM:
595 g_value_set_pointer (value, priv->audio);
597 case PROP_VIDEO_STREAM:
598 g_value_set_pointer (value, priv->video);
601 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
607 empathy_tp_call_class_init (EmpathyTpCallClass *klass)
609 GObjectClass *object_class = G_OBJECT_CLASS (klass);
613 object_class->constructor = tp_call_constructor;
614 object_class->finalize = tp_call_finalize;
615 object_class->set_property = tp_call_set_property;
616 object_class->get_property = tp_call_get_property;
618 g_type_class_add_private (klass, sizeof (EmpathyTpCallPriv));
620 g_object_class_install_property (object_class, PROP_CHANNEL,
621 g_param_spec_object ("channel", "channel", "channel",
623 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
624 G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
625 g_object_class_install_property (object_class, PROP_CONTACT,
626 g_param_spec_object ("contact", "Call contact", "Call contact",
627 EMPATHY_TYPE_CONTACT,
628 G_PARAM_READABLE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
629 g_object_class_install_property (object_class, PROP_IS_INCOMING,
630 g_param_spec_boolean ("is-incoming", "Is media stream incoming",
631 "Is media stream incoming", FALSE, G_PARAM_READABLE |
632 G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
633 g_object_class_install_property (object_class, PROP_STATUS,
634 g_param_spec_uint ("status", "Call status",
635 "Call status", 0, 255, 0, G_PARAM_READABLE | G_PARAM_STATIC_NICK |
636 G_PARAM_STATIC_BLURB));
637 g_object_class_install_property (object_class, PROP_AUDIO_STREAM,
638 g_param_spec_pointer ("audio-stream", "Audio stream data",
640 G_PARAM_READABLE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
641 g_object_class_install_property (object_class, PROP_VIDEO_STREAM,
642 g_param_spec_pointer ("video-stream", "Video stream data",
644 G_PARAM_READABLE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
648 empathy_tp_call_init (EmpathyTpCall *call)
650 EmpathyTpCallPriv *priv = GET_PRIV (call);
652 priv->status = EMPATHY_TP_CALL_STATUS_READYING;
653 priv->contact = NULL;
654 priv->stream_engine_running = FALSE;
655 priv->audio = g_slice_new0 (EmpathyTpCallStream);
656 priv->video = g_slice_new0 (EmpathyTpCallStream);
657 priv->audio->exists = FALSE;
658 priv->video->exists = FALSE;
662 empathy_tp_call_new (TpChannel *channel)
664 g_return_val_if_fail (TP_IS_CHANNEL (channel), NULL);
666 return g_object_new (EMPATHY_TYPE_TP_CALL,
672 empathy_tp_call_accept_incoming_call (EmpathyTpCall *call)
674 EmpathyTpCallPriv *priv = GET_PRIV (call);
675 EmpathyContact *self_contact;
677 g_return_if_fail (EMPATHY_IS_TP_CALL (call));
678 g_return_if_fail (priv->status == EMPATHY_TP_CALL_STATUS_PENDING);
680 empathy_debug (DEBUG_DOMAIN, "Accepting incoming call");
682 self_contact = empathy_tp_group_get_self_contact (priv->group);
683 empathy_tp_group_add_member (priv->group, self_contact, NULL);
684 g_object_unref (self_contact);
688 empathy_tp_call_request_video_stream_direction (EmpathyTpCall *call,
691 EmpathyTpCallPriv *priv = GET_PRIV (call);
694 g_return_if_fail (EMPATHY_IS_TP_CALL (call));
695 g_return_if_fail (priv->status == EMPATHY_TP_CALL_STATUS_ACCEPTED);
697 empathy_debug (DEBUG_DOMAIN,
698 "Requesting video stream direction - is_sending: %d", is_sending);
700 if (!priv->video->exists)
703 tp_call_request_streams_for_capabilities (call,
704 EMPATHY_CAPABILITIES_VIDEO);
709 new_direction = priv->video->direction | TP_MEDIA_STREAM_DIRECTION_SEND;
711 new_direction = priv->video->direction & ~TP_MEDIA_STREAM_DIRECTION_SEND;
713 tp_cli_channel_type_streamed_media_call_request_stream_direction (priv->channel,
714 -1, priv->video->id, new_direction,
715 (tp_cli_channel_type_streamed_media_callback_for_request_stream_direction)
716 tp_call_async_cb, NULL, NULL, G_OBJECT (call));
720 empathy_tp_call_add_preview_video (EmpathyTpCall *call,
721 guint preview_video_socket_id)
723 EmpathyTpCallPriv *priv = GET_PRIV (call);
725 g_return_if_fail (EMPATHY_IS_TP_CALL (call));
727 empathy_debug (DEBUG_DOMAIN, "Adding preview video");
729 emp_cli_stream_engine_call_add_preview_window (priv->stream_engine, -1,
730 preview_video_socket_id,
732 "adding preview window", NULL,
737 empathy_tp_call_remove_preview_video (EmpathyTpCall *call,
738 guint preview_video_socket_id)
740 EmpathyTpCallPriv *priv = GET_PRIV (call);
742 g_return_if_fail (EMPATHY_IS_TP_CALL (call));
744 empathy_debug (DEBUG_DOMAIN, "Removing preview video");
746 emp_cli_stream_engine_call_remove_preview_window (priv->stream_engine, -1,
747 preview_video_socket_id,
749 "removing preview window", NULL,
754 empathy_tp_call_add_output_video (EmpathyTpCall *call,
755 guint output_video_socket_id)
757 EmpathyTpCallPriv *priv = GET_PRIV (call);
759 g_return_if_fail (EMPATHY_IS_TP_CALL (call));
761 empathy_debug (DEBUG_DOMAIN, "Adding output video - socket: %d",
762 output_video_socket_id);
764 emp_cli_stream_engine_call_set_output_window (priv->stream_engine, -1,
765 TP_PROXY (priv->channel)->object_path,
766 priv->video->id, output_video_socket_id,
768 "setting output window", NULL,
773 empathy_tp_call_set_output_volume (EmpathyTpCall *call,
776 EmpathyTpCallPriv *priv = GET_PRIV (call);
778 g_return_if_fail (EMPATHY_IS_TP_CALL (call));
779 g_return_if_fail (priv->status != EMPATHY_TP_CALL_STATUS_CLOSED);
781 empathy_debug (DEBUG_DOMAIN, "Setting output volume: %d", volume);
783 emp_cli_stream_engine_call_set_output_volume (priv->stream_engine, -1,
784 TP_PROXY (priv->channel)->object_path,
785 priv->audio->id, volume,
787 "setting output volume", NULL,
792 empathy_tp_call_mute_output (EmpathyTpCall *call,
795 EmpathyTpCallPriv *priv = GET_PRIV (call);
797 g_return_if_fail (EMPATHY_IS_TP_CALL (call));
799 empathy_debug (DEBUG_DOMAIN, "Setting output mute: %d", is_muted);
801 emp_cli_stream_engine_call_mute_output (priv->stream_engine, -1,
802 TP_PROXY (priv->channel)->object_path,
803 priv->audio->id, is_muted,
805 "muting output", NULL,
810 empathy_tp_call_mute_input (EmpathyTpCall *call,
813 EmpathyTpCallPriv *priv = GET_PRIV (call);
815 g_return_if_fail (EMPATHY_IS_TP_CALL (call));
817 empathy_debug (DEBUG_DOMAIN, "Setting input mute: %d", is_muted);
819 emp_cli_stream_engine_call_mute_input (priv->stream_engine, -1,
820 TP_PROXY (priv->channel)->object_path,
821 priv->audio->id, is_muted,
823 "muting input", NULL,