Mercurial > pidgin
comparison libpurple/media/backend-fs2.c @ 31086:a8cc50c2279f
Remove trailing whitespace
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 04 Jan 2011 06:55:30 +0000 |
parents | a202f4dcbb96 |
children | 0485aed45f5b |
comparison
equal
deleted
inserted
replaced
31085:44f53d3fc54f | 31086:a8cc50c2279f |
---|---|
303 PURPLE_MEDIA_BACKEND_FS2(object)); | 303 PURPLE_MEDIA_BACKEND_FS2(object)); |
304 g_signal_connect(G_OBJECT(priv->media), "stream-info", | 304 g_signal_connect(G_OBJECT(priv->media), "stream-info", |
305 G_CALLBACK(stream_info_cb), | 305 G_CALLBACK(stream_info_cb), |
306 PURPLE_MEDIA_BACKEND_FS2(object)); | 306 PURPLE_MEDIA_BACKEND_FS2(object)); |
307 break; | 307 break; |
308 default: | 308 default: |
309 G_OBJECT_WARN_INVALID_PROPERTY_ID( | 309 G_OBJECT_WARN_INVALID_PROPERTY_ID( |
310 object, prop_id, pspec); | 310 object, prop_id, pspec); |
311 break; | 311 break; |
312 } | 312 } |
313 } | 313 } |
316 purple_media_backend_fs2_get_property(GObject *object, guint prop_id, | 316 purple_media_backend_fs2_get_property(GObject *object, guint prop_id, |
317 GValue *value, GParamSpec *pspec) | 317 GValue *value, GParamSpec *pspec) |
318 { | 318 { |
319 PurpleMediaBackendFs2Private *priv; | 319 PurpleMediaBackendFs2Private *priv; |
320 g_return_if_fail(PURPLE_IS_MEDIA_BACKEND_FS2(object)); | 320 g_return_if_fail(PURPLE_IS_MEDIA_BACKEND_FS2(object)); |
321 | 321 |
322 priv = PURPLE_MEDIA_BACKEND_FS2_GET_PRIVATE(object); | 322 priv = PURPLE_MEDIA_BACKEND_FS2_GET_PRIVATE(object); |
323 | 323 |
324 switch (prop_id) { | 324 switch (prop_id) { |
325 case PROP_CONFERENCE_TYPE: | 325 case PROP_CONFERENCE_TYPE: |
326 g_value_set_string(value, priv->conference_type); | 326 g_value_set_string(value, priv->conference_type); |
327 break; | 327 break; |
328 case PROP_MEDIA: | 328 case PROP_MEDIA: |
329 g_value_set_object(value, priv->media); | 329 g_value_set_object(value, priv->media); |
330 break; | 330 break; |
331 default: | 331 default: |
332 G_OBJECT_WARN_INVALID_PROPERTY_ID( | 332 G_OBJECT_WARN_INVALID_PROPERTY_ID( |
333 object, prop_id, pspec); | 333 object, prop_id, pspec); |
334 break; | 334 break; |
335 } | 335 } |
336 } | 336 } |
1259 GstElement *src; | 1259 GstElement *src; |
1260 GstPad *sinkpad, *srcpad; | 1260 GstPad *sinkpad, *srcpad; |
1261 | 1261 |
1262 if ((type_direction & FS_DIRECTION_SEND) == 0) | 1262 if ((type_direction & FS_DIRECTION_SEND) == 0) |
1263 return TRUE; | 1263 return TRUE; |
1264 | 1264 |
1265 session_type = session_type_from_fs( | 1265 session_type = session_type_from_fs( |
1266 media_type, FS_DIRECTION_SEND); | 1266 media_type, FS_DIRECTION_SEND); |
1267 src = purple_media_manager_get_element( | 1267 src = purple_media_manager_get_element( |
1268 purple_media_get_manager(priv->media), | 1268 purple_media_get_manager(priv->media), |
1269 session_type, priv->media, sess_id, NULL); | 1269 session_type, priv->media, sess_id, NULL); |
1327 g_object_set(volume, "volume", input_volume, NULL); | 1327 g_object_set(volume, "volume", input_volume, NULL); |
1328 } else { | 1328 } else { |
1329 srcpad = gst_element_get_request_pad(session->tee, "src%d"); | 1329 srcpad = gst_element_get_request_pad(session->tee, "src%d"); |
1330 } | 1330 } |
1331 | 1331 |
1332 purple_debug_info("backend-fs2", "connecting pad: %s\n", | 1332 purple_debug_info("backend-fs2", "connecting pad: %s\n", |
1333 gst_pad_link(srcpad, sinkpad) == GST_PAD_LINK_OK | 1333 gst_pad_link(srcpad, sinkpad) == GST_PAD_LINK_OK |
1334 ? "success" : "failure"); | 1334 ? "success" : "failure"); |
1335 gst_element_set_locked_state(session->src, FALSE); | 1335 gst_element_set_locked_state(session->src, FALSE); |
1336 gst_object_unref(session->src); | 1336 gst_object_unref(session->src); |
1337 | 1337 |
1580 append_relay_info(GValueArray *relay_info, const gchar *ip, gint port, | 1580 append_relay_info(GValueArray *relay_info, const gchar *ip, gint port, |
1581 const gchar *username, const gchar *password, const gchar *type) | 1581 const gchar *username, const gchar *password, const gchar *type) |
1582 { | 1582 { |
1583 GValue value; | 1583 GValue value; |
1584 GstStructure *turn_setup = gst_structure_new("relay-info", | 1584 GstStructure *turn_setup = gst_structure_new("relay-info", |
1585 "ip", G_TYPE_STRING, ip, | 1585 "ip", G_TYPE_STRING, ip, |
1586 "port", G_TYPE_UINT, port, | 1586 "port", G_TYPE_UINT, port, |
1587 "username", G_TYPE_STRING, username, | 1587 "username", G_TYPE_STRING, username, |
1588 "password", G_TYPE_STRING, password, | 1588 "password", G_TYPE_STRING, password, |
1589 "relay-type", G_TYPE_STRING, type, | 1589 "relay-type", G_TYPE_STRING, type, |
1590 NULL); | 1590 NULL); |
1597 gst_structure_free(turn_setup); | 1597 gst_structure_free(turn_setup); |
1598 } | 1598 } |
1599 | 1599 |
1600 return relay_info; | 1600 return relay_info; |
1601 } | 1601 } |
1602 | 1602 |
1603 static gboolean | 1603 static gboolean |
1604 create_stream(PurpleMediaBackendFs2 *self, | 1604 create_stream(PurpleMediaBackendFs2 *self, |
1605 const gchar *sess_id, const gchar *who, | 1605 const gchar *sess_id, const gchar *who, |
1606 PurpleMediaSessionType type, gboolean initiator, | 1606 PurpleMediaSessionType type, gboolean initiator, |
1607 const gchar *transmitter, | 1607 const gchar *transmitter, |
1640 g_value_init(&_params[_num_params].value, G_TYPE_BOOLEAN); | 1640 g_value_init(&_params[_num_params].value, G_TYPE_BOOLEAN); |
1641 g_value_set_boolean(&_params[_num_params].value, initiator); | 1641 g_value_set_boolean(&_params[_num_params].value, initiator); |
1642 ++_num_params; | 1642 ++_num_params; |
1643 | 1643 |
1644 if (stun_ip) { | 1644 if (stun_ip) { |
1645 purple_debug_info("backend-fs2", | 1645 purple_debug_info("backend-fs2", |
1646 "Setting stun-ip on new stream: %s\n", stun_ip); | 1646 "Setting stun-ip on new stream: %s\n", stun_ip); |
1647 | 1647 |
1648 _params[_num_params].name = "stun-ip"; | 1648 _params[_num_params].name = "stun-ip"; |
1649 g_value_init(&_params[_num_params].value, G_TYPE_STRING); | 1649 g_value_init(&_params[_num_params].value, G_TYPE_STRING); |
1650 g_value_set_string(&_params[_num_params].value, stun_ip); | 1650 g_value_set_string(&_params[_num_params].value, stun_ip); |
1666 password, "udp"); | 1666 password, "udp"); |
1667 } | 1667 } |
1668 | 1668 |
1669 /* should add TCP and perhaps TLS relaying options when these are | 1669 /* should add TCP and perhaps TLS relaying options when these are |
1670 supported by libnice using non-google mode */ | 1670 supported by libnice using non-google mode */ |
1671 | 1671 |
1672 purple_debug_info("backend-fs2", | 1672 purple_debug_info("backend-fs2", |
1673 "Setting relay-info on new stream\n"); | 1673 "Setting relay-info on new stream\n"); |
1674 _params[_num_params].name = "relay-info"; | 1674 _params[_num_params].name = "relay-info"; |
1675 g_value_init(&_params[_num_params].value, | 1675 g_value_init(&_params[_num_params].value, |
1676 G_TYPE_VALUE_ARRAY); | 1676 G_TYPE_VALUE_ARRAY); |
1677 g_value_set_boxed(&_params[_num_params].value, | 1677 g_value_set_boxed(&_params[_num_params].value, |
1678 relay_info); | 1678 relay_info); |
1679 g_value_array_free(relay_info); | 1679 g_value_array_free(relay_info); |
1680 _num_params++; | 1680 _num_params++; |