Commit d6724f98 authored by Dafydd Harries's avatar Dafydd Harries

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; ...@@ -142,7 +142,6 @@ typedef struct _stream Stream;
struct _stream struct _stream
{ {
MediaType type;
guint id; guint id;
/* XXX: streams can have multiple components */ /* XXX: streams can have multiple components */
Component *component; Component *component;
...@@ -151,12 +150,11 @@ struct _stream ...@@ -151,12 +150,11 @@ struct _stream
static Stream * static Stream *
stream_new (MediaType type) stream_new ()
{ {
Stream *stream; Stream *stream;
stream = g_slice_new0 (Stream); stream = g_slice_new0 (Stream);
stream->type = type;
stream->component = component_new (COMPONENT_TYPE_RTP); stream->component = component_new (COMPONENT_TYPE_RTP);
return stream; return stream;
} }
...@@ -317,13 +315,12 @@ ice_agent_add_local_host_candidate ( ...@@ -317,13 +315,12 @@ ice_agent_add_local_host_candidate (
guint guint
ice_agent_add_stream ( ice_agent_add_stream (
Agent *agent, Agent *agent,
MediaType type,
AgentRecvHandler handle_recv) AgentRecvHandler handle_recv)
{ {
Stream *stream; Stream *stream;
GSList *i; GSList *i;
stream = stream_new (type); stream = stream_new ();
stream->id = agent->next_stream_id++; stream->id = agent->next_stream_id++;
stream->handle_recv = handle_recv; stream->handle_recv = handle_recv;
agent->streams = g_slist_append (agent->streams, stream); agent->streams = g_slist_append (agent->streams, stream);
......
...@@ -6,15 +6,6 @@ ...@@ -6,15 +6,6 @@
#include "address.h" #include "address.h"
typedef enum media_type MediaType;
enum media_type
{
MEDIA_TYPE_AUDIO,
MEDIA_TYPE_VIDEO,
};
/*** candidate ***/ /*** candidate ***/
typedef enum candidate_type CandidateType; typedef enum candidate_type CandidateType;
...@@ -123,7 +114,6 @@ ice_agent_add_local_address (Agent *agent, Address *addr); ...@@ -123,7 +114,6 @@ ice_agent_add_local_address (Agent *agent, Address *addr);
guint guint
ice_agent_add_stream ( ice_agent_add_stream (
Agent *agent, Agent *agent,
MediaType type,
AgentRecvHandler handle_recv); AgentRecvHandler handle_recv);
void void
ice_agent_free (Agent *agent); ice_agent_free (Agent *agent);
......
...@@ -24,9 +24,9 @@ main (void) ...@@ -24,9 +24,9 @@ main (void)
Agent *agent; Agent *agent;
agent = ice_agent_new (NULL); 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, handle_recv) == 1);
g_assert (ice_agent_add_stream (agent, MEDIA_TYPE_AUDIO, handle_recv) == 2); g_assert (ice_agent_add_stream (agent, 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) == 3);
ice_agent_free (agent); ice_agent_free (agent);
return 0; return 0;
......
...@@ -44,7 +44,7 @@ main (void) ...@@ -44,7 +44,7 @@ main (void)
agent = ice_agent_new (&mgr); agent = ice_agent_new (&mgr);
address_set_ipv4_from_string (&addr, "192.168.0.1"); address_set_ipv4_from_string (&addr, "192.168.0.1");
ice_agent_add_local_address (agent, &addr); 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); g_assert (agent->local_candidates != NULL);
/* recieve an RTP packet */ /* recieve an RTP packet */
......
...@@ -51,7 +51,7 @@ main (void) ...@@ -51,7 +51,7 @@ main (void)
/* set up agent */ /* set up agent */
agent = ice_agent_new (&mgr); agent = ice_agent_new (&mgr);
ice_agent_add_local_address (agent, &local_addr); 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); g_assert (agent->local_candidates != NULL);
candidate = (Candidate *) agent->local_candidates->data; candidate = (Candidate *) agent->local_candidates->data;
sock = &(candidate->sock); sock = &(candidate->sock);
......
...@@ -50,7 +50,7 @@ main (void) ...@@ -50,7 +50,7 @@ main (void)
g_assert (agent->local_candidates == NULL); g_assert (agent->local_candidates == NULL);
/* add an audio stream */ /* 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 */ /* adding a stream should cause host candidates to be generated */
g_assert (agent->local_candidates != NULL); g_assert (agent->local_candidates != NULL);
......
...@@ -41,7 +41,7 @@ make_agent ( ...@@ -41,7 +41,7 @@ make_agent (
address_set_ipv4_from_string (&addr_local, ip); address_set_ipv4_from_string (&addr_local, ip);
ice_agent_add_local_address (agent, &addr_local); 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); g_assert (agent->local_candidates != NULL);
candidate = (Candidate *) agent->local_candidates->data; 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