diff options
Diffstat (limited to 'agent')
-rw-r--r-- | agent/agent.c | 12 | ||||
-rw-r--r-- | agent/agent.h | 8 |
2 files changed, 18 insertions, 2 deletions
diff --git a/agent/agent.c b/agent/agent.c index cde2386..d732e46 100644 --- a/agent/agent.c +++ b/agent/agent.c @@ -5314,6 +5314,18 @@ nice_agent_set_stream_name (NiceAgent *agent, guint stream_id, g_return_val_if_fail (NICE_IS_AGENT (agent), FALSE); g_return_val_if_fail (stream_id >= 1, FALSE); + g_return_val_if_fail (name, FALSE); + + if (strcmp (name, "audio") && + strcmp (name, "video") && + strcmp (name, "text") && + strcmp (name, "application") && + strcmp (name, "message") && + strcmp (name, "image")) { + g_critical ("Stream name %s will produce invalid SDP, only \"audio\"," + " \"video\", \"text\", \"application\", \"image\" and \"message\"" + " are valid", name); + } agent_lock(); diff --git a/agent/agent.h b/agent/agent.h index 5d38839..47c4d5a 100644 --- a/agent/agent.h +++ b/agent/agent.h @@ -1253,8 +1253,12 @@ void nice_agent_set_software ( * @stream_id: The ID of the stream to change * @name: The new name of the stream or %NULL * - * This function will assign a unique name to a stream. - * This is only useful when parsing and generating an SDP of the candidates. + * This function will assign a media type to a stream. The only values + * that can be used to produce a valid SDP are: "audio", "video", + * "text", "application", "image" and "message". + * + * This is only useful when parsing and generating an SDP of the + * candidates. * * <para>See also: nice_agent_generate_local_sdp()</para> * <para>See also: nice_agent_parse_remote_sdp()</para> |