summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2015-01-27 15:58:30 -0500
committerOlivier CrĂȘte <olivier.crete@collabora.com>2015-01-27 15:58:30 -0500
commit6b5e40c6c1f62ae1a1099f56ae70ed26b23c8a88 (patch)
tree3fa9aec6843f0b8f9a1cccb373a85ac96a96a799
parent83199d96480cd7835adc9d290e537effc550b4ca (diff)
parentfb51436e0a6dcefac5506744a6be3fd236b1ca79 (diff)
downloadfarstream-6b5e40c6c1f62ae1a1099f56ae70ed26b23c8a88.tar.gz
Merge branch 'branch-0.2.6'
-rw-r--r--NEWS7
-rw-r--r--README2
-rw-r--r--configure.ac4
-rw-r--r--farstream/fs-candidate.h15
-rw-r--r--tests/check/transmitter/nice.c19
-rw-r--r--transmitters/nice/fs-nice-stream-transmitter.c32
6 files changed, 39 insertions, 40 deletions
diff --git a/NEWS b/NEWS
index b6655abb..f3930d3d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,9 @@
-farstream 0.2.5 (Octobe 9, 2014)
+farstream 0.2.6 (October 9, 2014)
+================================
+- Add ICE-TCP support
+- Now require libnice 0.1.8
+
+farstream 0.2.5 (October 9, 2014)
================================
- Add SRTP support
- Add API to set allowed input/output caps
diff --git a/README b/README
index 5194ab80..55e482cc 100644
--- a/README
+++ b/README
@@ -18,7 +18,7 @@ Build time:
- gstreamer 1.4.0
- gst-plugins-base 1.4.0
- glib 2.32
- - libnice 0.1.3
+ - libnice 0.1.8
- gobject-introspection 0.10.1
For UPnP support:
diff --git a/configure.ac b/configure.ac
index beabb24e..3d88ed3a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ dnl please read gstreamer/docs/random/autotools before changing this file
dnl initialize autoconf
dnl releases only do -Wall, cvs and prerelease does -Werror too
dnl use a three digit version number for releases, and four for cvs/prerelease
-AC_INIT(Farstream, 0.2.5.1,
+AC_INIT(Farstream, 0.2.6.1,
https://bugs.freedesktop.org/enter_bug.cgi?product=Farstream,
farstream)
@@ -167,7 +167,7 @@ AC_ARG_WITH(transmitter-plugins,
[FS_TRANSMITTER_PLUGINS_SELECTED=$FS_TRANSMITTER_PLUGINS_ALL])
-NICE_REQUIRED=0.1.3
+NICE_REQUIRED=0.1.8
PKG_CHECK_MODULES(NICE, \
nice >= $NICE_REQUIRED,, AC_MSG_ERROR([Need libnice >= $NICE_REQUIRED]))
diff --git a/farstream/fs-candidate.h b/farstream/fs-candidate.h
index b8ad723f..5abedb93 100644
--- a/farstream/fs-candidate.h
+++ b/farstream/fs-candidate.h
@@ -59,14 +59,25 @@ typedef enum
/**
* FsNetworkProtocol:
* @FS_NETWORK_PROTOCOL_UDP: A UDP based protocol
- * @FS_NETWORK_PROTOCOL_TCP: A TCP based protocol
+ * @FS_NETWORK_PROTOCOL_TCP: A TCP based protocol, will listen for
+ * incoming connections
+ * @FS_NETWORK_PROTOCOL_TCP_PASSIVE: A TCP based protocol, will listen for
+ * incoming connections
+ * @FS_NETWORK_PROTOCOL_TCP_ACTIVE: A TCP based protocol, will attempt to
+ * open an outbound connection
+ * @FS_NETWORK_PROTOCOL_TCP_SO: A TCP based protocol, will listen for
+ * incoming connections and attempt an outbound connection at the same time
+ * as the peer (Simultanuous-Open)
*
* An enum for the base IP protocol
*/
typedef enum
{
FS_NETWORK_PROTOCOL_UDP,
- FS_NETWORK_PROTOCOL_TCP
+ FS_NETWORK_PROTOCOL_TCP,
+ FS_NETWORK_PROTOCOL_TCP_PASSIVE = FS_NETWORK_PROTOCOL_TCP,
+ FS_NETWORK_PROTOCOL_TCP_ACTIVE,
+ FS_NETWORK_PROTOCOL_TCP_SO,
} FsNetworkProtocol;
/**
diff --git a/tests/check/transmitter/nice.c b/tests/check/transmitter/nice.c
index a085996e..4b5c67e9 100644
--- a/tests/check/transmitter/nice.c
+++ b/tests/check/transmitter/nice.c
@@ -65,9 +65,8 @@ _new_local_candidate (FsStreamTransmitter *st, FsCandidate *candidate,
ts_fail_if (candidate == NULL, "Passed NULL candidate");
ts_fail_unless (candidate->ip != NULL, "Null IP in candidate");
- ts_fail_if (candidate->port == 0, "Candidate has port 0");
- ts_fail_unless (candidate->proto == FS_NETWORK_PROTOCOL_UDP,
- "Protocol is not UDP");
+ ts_fail_if (candidate->port == 0 &&
+ candidate->proto != FS_NETWORK_PROTOCOL_TCP_ACTIVE);
ts_fail_if (candidate->foundation == NULL,
"Candidate doenst have a foundation");
ts_fail_if (candidate->component_id == 0, "Component id is 0");
@@ -125,6 +124,8 @@ set_the_candidates (gpointer user_data)
next = g_list_next (item);
+ if (cand->proto != FS_NETWORK_PROTOCOL_UDP)
+ continue;
if (cand->type != FS_CANDIDATE_TYPE_HOST)
continue;
if (cand->component_id != 1)
@@ -702,18 +703,6 @@ GST_START_TEST (test_nicetransmitter_invalid_arguments)
error->domain == FS_ERROR &&
error->code == FS_ERROR_INVALID_ARGUMENTS);
g_clear_error (&error);
-
- /* invalid proto */
- g_value_take_boxed (&params[0].value, g_list_append (NULL,
- fs_candidate_new (NULL, 0, FS_CANDIDATE_TYPE_HOST,
- FS_NETWORK_PROTOCOL_TCP, "127.0.0.1", 0)));
-
- st = fs_transmitter_new_stream_transmitter (trans, p, 1, params, &error);
- ts_fail_unless (st == NULL);
- ts_fail_unless (error &&
- error->domain == FS_ERROR &&
- error->code == FS_ERROR_INVALID_ARGUMENTS);
- g_clear_error (&error);
g_value_unset (&params[0].value);
params[0].name = "relay-info";
diff --git a/transmitters/nice/fs-nice-stream-transmitter.c b/transmitters/nice/fs-nice-stream-transmitter.c
index f0bd566e..791d17ac 100644
--- a/transmitters/nice/fs-nice-stream-transmitter.c
+++ b/transmitters/nice/fs-nice-stream-transmitter.c
@@ -646,6 +646,12 @@ fs_network_protocol_to_nice_candidate_protocol (FsNetworkProtocol proto)
{
case FS_NETWORK_PROTOCOL_UDP:
return NICE_CANDIDATE_TRANSPORT_UDP;
+ case FS_NETWORK_PROTOCOL_TCP_ACTIVE:
+ return NICE_CANDIDATE_TRANSPORT_TCP_ACTIVE;
+ case FS_NETWORK_PROTOCOL_TCP_PASSIVE:
+ return NICE_CANDIDATE_TRANSPORT_TCP_PASSIVE;
+ case FS_NETWORK_PROTOCOL_TCP_SO:
+ return NICE_CANDIDATE_TRANSPORT_TCP_SO;
default:
GST_WARNING ("Invalid Fs network protocol type %u", proto);
return NICE_CANDIDATE_TRANSPORT_UDP;
@@ -958,14 +964,6 @@ fs_nice_stream_transmitter_force_remote_candidates (
goto out;
}
- if (candidate->proto != FS_NETWORK_PROTOCOL_UDP)
- {
- g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
- "Only UDP candidates can be set");
- res = FALSE;
- goto out;
- }
-
if (done[candidate->component_id-1])
{
g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
@@ -1027,9 +1025,15 @@ nice_candidate_transport_to_fs_network_protocol (NiceCandidateTransport trans)
{
case NICE_CANDIDATE_TRANSPORT_UDP:
return FS_NETWORK_PROTOCOL_UDP;
+ case NICE_CANDIDATE_TRANSPORT_TCP_PASSIVE:
+ return FS_NETWORK_PROTOCOL_TCP_PASSIVE;
+ case NICE_CANDIDATE_TRANSPORT_TCP_ACTIVE:
+ return FS_NETWORK_PROTOCOL_TCP_ACTIVE;
+ case NICE_CANDIDATE_TRANSPORT_TCP_SO:
+ return FS_NETWORK_PROTOCOL_TCP_SO;
default:
GST_WARNING ("Invalid Nice network transport type %u", trans);
- return FS_NETWORK_PROTOCOL_TCP;
+ return FS_NETWORK_PROTOCOL_UDP;
}
}
@@ -1212,13 +1216,6 @@ fs_nice_stream_transmitter_build (FsNiceStreamTransmitter *self,
"You can only set preferred candidates of type host");
return FALSE;
}
-
- if (cand->proto != FS_NETWORK_PROTOCOL_UDP)
- {
- g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
- "Only UDP preferred candidates can be set");
- return FALSE;
- }
}
/* Now if we have a relayinfo, lets verify that its ok */
@@ -1698,9 +1695,6 @@ agent_new_candidate (NiceAgent *agent,
{
NiceCandidate *candidate = item->data;
- if (candidate->transport != NICE_CANDIDATE_TRANSPORT_UDP)
- continue;
-
if (!strcmp (candidate->foundation, foundation))
{
fscandidate = nice_candidate_to_fs_candidate (agent, candidate, TRUE);