Commit e6b4f9cf authored by Dafydd Harries's avatar Dafydd Harries

add component ID parameter to media recv callback

darcs-hash:20070125171756-c9803-25d4c93a98e158e519376b6436da93986fb663b5.gz
parent 45b389f3
......@@ -95,7 +95,8 @@ struct _stream
guint id;
/* XXX: streams can have multiple components */
Component *component;
void (*handle_recv) (Agent *agent, guint stream_id, guint len, gchar *buf);
void (*handle_recv) (
Agent *agent, guint stream_id, guint component_id, guint len, gchar *buf);
};
......@@ -281,7 +282,8 @@ guint
ice_agent_add_stream (
Agent *agent,
MediaType type,
void (*handle_recv) (Agent *agent, guint stream_id, guint len, gchar *buf))
void (*handle_recv) (
Agent *agent, guint stream_id, guint component_id, guint len, gchar *buf))
{
Stream *stream;
GSList *i;
......@@ -447,7 +449,8 @@ ice_agent_recv (
/* XXX: should a NULL data handler be permitted? */
g_assert (stream->handle_recv != NULL);
stream->handle_recv (agent, candidate->stream_id, len, buf);
stream->handle_recv (agent, candidate->stream_id,
candidate->component_id, len, buf);
}
else if ((buf[0] & 0xc0) == 0)
{
......
......@@ -116,7 +116,8 @@ guint
ice_agent_add_stream (
Agent *agent,
MediaType type,
void (*handle_recv) (Agent *agent, guint stream_id, guint len, gchar *buf));
void (*handle_recv) (
Agent *agent, guint stream_id, guint component_id, guint len, gchar *buf));
void
ice_agent_free (Agent *agent);
void
......
......@@ -8,7 +8,12 @@
#include <agent.h>
void
handle_recv (Agent *agent, guint stream_id, guint len, gchar *buf)
handle_recv (
Agent *agent,
guint stream_id,
guint component_id,
guint len,
gchar *buf)
{
g_assert_not_reached ();
}
......
......@@ -13,10 +13,16 @@
static gboolean cb_called = FALSE;
void
handle_recv (Agent *agent, guint stream_id, guint len, gchar *buf)
handle_recv (
Agent *agent,
guint stream_id,
guint component_id,
guint len,
gchar *buf)
{
g_assert (cb_called == FALSE);
g_assert (stream_id == 1);
g_assert (component_id == 1);
g_assert (len == 7);
g_assert (0 == strncmp (buf, "\x80lalala", 7));
cb_called = TRUE;
......
......@@ -12,7 +12,12 @@
#include <agent.h>
void
handle_recv (Agent *agent, guint stream_id, guint len, gchar *buf)
handle_recv (
Agent *agent,
guint stream_id,
guint component_id,
guint len,
gchar *buf)
{
g_assert_not_reached ();
}
......
......@@ -9,7 +9,12 @@
#include <agent.h>
void
handle_recv (Agent *agent, guint stream_id, guint len, gchar *buf)
handle_recv (
Agent *agent,
guint stream_id,
guint component_id,
guint len,
gchar *buf)
{
g_assert_not_reached ();
}
......
......@@ -14,7 +14,12 @@
#include <util.h>
static void
handle_recv (Agent *agent, guint stream_id, guint len, gchar *buf)
handle_recv (
Agent *agent,
guint stream_id,
guint component_id,
guint len,
gchar *buf)
{
g_debug ("got media");
}
......
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