static void call_content_setup_jingle (GabbleCallContent *self, GabbleCallMemberContent *mcontent) { TpBaseCallContent *base = TP_BASE_CALL_CONTENT (self); GabbleJingleContent *jingle; GabbleCallStream *stream; gchar *path; JingleTransportType transport; JingleMediaDescription *md; GHashTable *tp_md; TpHandle contact; jingle = gabble_call_member_content_get_jingle_content (mcontent); if (jingle == NULL) return; transport = gabble_jingle_content_get_transport_type (jingle); path = g_strdup_printf ("%s/Stream%p", tp_base_call_content_get_object_path (base), jingle); stream = g_object_new (GABBLE_TYPE_CALL_STREAM, "object-path", path, "connection", tp_base_call_content_get_connection (base), "jingle-content", jingle, "transport", _jingle_to_tp_transport (transport), NULL); g_free (path); md = jingle_media_description_new (); /* FIXME: correct??? */ contact = gabble_call_member_get_handle ( gabble_call_member_content_get_member (mcontent)); tp_md = tp_base_media_call_content_get_local_media_description ( TP_BASE_MEDIA_CALL_CONTENT (self), contact); if (tp_md != NULL) { md->codecs = codec_array_to_list (tp_asv_get_boxed (tp_md, TP_PROP_CALL_CONTENT_MEDIA_DESCRIPTION_CODECS, TP_ARRAY_TYPE_CODEC_LIST)); } if (md->codecs != NULL) jingle_media_rtp_set_local_media_description ( GABBLE_JINGLE_MEDIA_RTP (jingle), md, TRUE, NULL); else jingle_media_description_free (md); tp_base_call_content_add_stream (base, TP_BASE_CALL_STREAM (stream)); gabble_call_stream_update_member_states (stream); g_object_unref (stream); }
void example_call_content_add_stream (ExampleCallContent *self, ExampleCallStream *stream) { g_return_if_fail (EXAMPLE_IS_CALL_CONTENT (self)); g_return_if_fail (EXAMPLE_IS_CALL_STREAM (stream)); g_return_if_fail (self->priv->stream == NULL); self->priv->stream = g_object_ref (stream); tp_base_call_content_add_stream ((TpBaseCallContent *) self, (TpBaseCallStream *) stream); }
void rakia_call_content_add_stream (RakiaCallContent *self) { RakiaCallContentPrivate *priv = self->priv; TpBaseCallContent *bcc = TP_BASE_CALL_CONTENT (self); gchar *object_path; object_path = g_strdup_printf ("%s/Stream", tp_base_call_content_get_object_path (bcc)); priv->stream = rakia_call_stream_new (self, priv->media, object_path, TP_STREAM_TRANSPORT_TYPE_RAW_UDP, tp_base_call_content_get_connection (bcc)); g_free (object_path); tp_base_call_content_add_stream (bcc, TP_BASE_CALL_STREAM (priv->stream)); }