Commit d6724f98 authored by Dafydd Harries's avatar Dafydd Harries
Browse files

remove media type property from stream, as it's not used

darcs-hash:20070129134058-c9803-b63d9f73c3af44da352ef77f930f78f0a3ded087.gz
parent 3b0780ed
......@@ -142,7 +142,6 @@ typedef struct _stream Stream;
struct _stream
{
MediaType type;
guint id;
/* XXX: streams can have multiple components */
Component *component;
......@@ -151,12 +150,11 @@ struct _stream
static Stream *
stream_new (MediaType type)
stream_new ()
{
Stream *stream;
stream = g_slice_new0 (Stream);
stream->type = type;
stream->component = component_new (COMPONENT_TYPE_RTP);
return stream;
}
......@@ -317,13 +315,12 @@ ice_agent_add_local_host_candidate (
guint
ice_agent_add_stream (
Agent *agent,
MediaType type,
AgentRecvHandler handle_recv)
{
Stream *stream;
GSList *i;
stream = stream_new (type);
stream = stream_new ();
stream->id = agent->next_stream_id++;
stream->handle_recv = handle_recv;
agent->streams = g_slist_append (agent->streams, stream);
......
......@@ -6,15 +6,6 @@
#include "address.h"
typedef enum media_type MediaType;
enum media_type
{
MEDIA_TYPE_AUDIO,
MEDIA_TYPE_VIDEO,
};
/*** candidate ***/
typedef enum candidate_type CandidateType;
......@@ -123,7 +114,6 @@ ice_agent_add_local_address (Agent *agent, Address *addr);
guint
ice_agent_add_stream (
Agent *agent,
MediaType type,
AgentRecvHandler handle_recv);
void
ice_agent_free (Agent *agent);
......
......@@ -24,9 +24,9 @@ main (void)
Agent *agent;
agent = ice_agent_new (NULL);
g_assert (ice_agent_add_stream (agent, MEDIA_TYPE_AUDIO, handle_recv) == 1);
g_assert (ice_agent_add_stream (agent, MEDIA_TYPE_AUDIO, handle_recv) == 2);
g_assert (ice_agent_add_stream (agent, MEDIA_TYPE_AUDIO, handle_recv) == 3);
g_assert (ice_agent_add_stream (agent, handle_recv) == 1);
g_assert (ice_agent_add_stream (agent, handle_recv) == 2);
g_assert (ice_agent_add_stream (agent, handle_recv) == 3);
ice_agent_free (agent);
return 0;
......
......@@ -44,7 +44,7 @@ main (void)
agent = ice_agent_new (&mgr);
address_set_ipv4_from_string (&addr, "192.168.0.1");
ice_agent_add_local_address (agent, &addr);
ice_agent_add_stream (agent, MEDIA_TYPE_AUDIO, handle_recv);
ice_agent_add_stream (agent, handle_recv);
g_assert (agent->local_candidates != NULL);
/* recieve an RTP packet */
......
......@@ -51,7 +51,7 @@ main (void)
/* set up agent */
agent = ice_agent_new (&mgr);
ice_agent_add_local_address (agent, &local_addr);
ice_agent_add_stream (agent, MEDIA_TYPE_AUDIO, handle_recv);
ice_agent_add_stream (agent, handle_recv);
g_assert (agent->local_candidates != NULL);
candidate = (Candidate *) agent->local_candidates->data;
sock = &(candidate->sock);
......
......@@ -50,7 +50,7 @@ main (void)
g_assert (agent->local_candidates == NULL);
/* add an audio stream */
ice_agent_add_stream (agent, MEDIA_TYPE_AUDIO, handle_recv);
ice_agent_add_stream (agent, handle_recv);
/* adding a stream should cause host candidates to be generated */
g_assert (agent->local_candidates != NULL);
......
......@@ -41,7 +41,7 @@ make_agent (
address_set_ipv4_from_string (&addr_local, ip);
ice_agent_add_local_address (agent, &addr_local);
ice_agent_add_stream (agent, MEDIA_TYPE_AUDIO, handle_recv);
ice_agent_add_stream (agent, handle_recv);
g_assert (agent->local_candidates != NULL);
candidate = (Candidate *) agent->local_candidates->data;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment