diff options
-rw-r--r-- | libempathy/empathy-tp-call.c | 14 | ||||
-rw-r--r-- | libempathy/empathy-tp-call.h | 3 |
2 files changed, 14 insertions, 3 deletions
diff --git a/libempathy/empathy-tp-call.c b/libempathy/empathy-tp-call.c index de88249c0..2971e0ffc 100644 --- a/libempathy/empathy-tp-call.c +++ b/libempathy/empathy-tp-call.c @@ -317,9 +317,13 @@ tp_call_update_status (EmpathyTpCall *call) } void -empathy_tp_call_to (EmpathyTpCall *call, EmpathyContact *contact) +empathy_tp_call_to (EmpathyTpCall *call, EmpathyContact *contact, + gboolean audio, gboolean video) { EmpathyTpCallPriv *priv = GET_PRIV (call); + EmpathyCapabilities capabilities = 0; + + g_assert (audio || video); priv->contact = g_object_ref (contact); priv->is_incoming = FALSE; @@ -327,7 +331,13 @@ empathy_tp_call_to (EmpathyTpCall *call, EmpathyContact *contact) g_object_notify (G_OBJECT (call), "is-incoming"); g_object_notify (G_OBJECT (call), "contact"); g_object_notify (G_OBJECT (call), "status"); - tp_call_request_streams_for_capabilities (call, EMPATHY_CAPABILITIES_AUDIO); + + if (video) + capabilities |= EMPATHY_CAPABILITIES_VIDEO; + if (audio) + capabilities |= EMPATHY_CAPABILITIES_AUDIO; + + tp_call_request_streams_for_capabilities (call, capabilities); } static void diff --git a/libempathy/empathy-tp-call.h b/libempathy/empathy-tp-call.h index 081773423..406ed1c3f 100644 --- a/libempathy/empathy-tp-call.h +++ b/libempathy/empathy-tp-call.h @@ -76,7 +76,8 @@ GType empathy_tp_call_get_type (void) G_GNUC_CONST; EmpathyTpCall *empathy_tp_call_new (TpChannel *channel); void empathy_tp_call_close (EmpathyTpCall *call); -void empathy_tp_call_to (EmpathyTpCall *call, EmpathyContact *contact); +void empathy_tp_call_to (EmpathyTpCall *call, EmpathyContact *contact, + gboolean audio, gboolean video); void empathy_tp_call_accept_incoming_call (EmpathyTpCall *call); void empathy_tp_call_request_video_stream_direction (EmpathyTpCall *call, |