diff options
author | Robert McQueen <robert.mcqueen@collabora.co.uk> | 2006-09-29 18:45:53 +0000 |
---|---|---|
committer | Robert McQueen <robert.mcqueen@collabora.co.uk> | 2006-09-29 18:45:53 +0000 |
commit | de9f287da4eec4bc78eefd7320798eeb2b0943aa (patch) | |
tree | bd4c6d9f37d1207cd9e46b08982f15773a58861e /src | |
parent | 418af919cc0ecf8f5aa973bd611b3341ecbd9dfb (diff) |
GabbleMediaSession: when we get local codecs on a stream, after the session is established, it must be due to a stream being added, so look at accepting it or telling the other end we want to add it
Diffstat (limited to 'src')
-rw-r--r-- | src/gabble-media-session.c | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/src/gabble-media-session.c b/src/gabble-media-session.c index bf3b74b01..119bba5e1 100644 --- a/src/gabble-media-session.c +++ b/src/gabble-media-session.c @@ -1242,6 +1242,12 @@ try_session_accept (GabbleMediaSession *session) lm_message_unref (msg); } +static void +try_content_accept (GabbleMediaSession *session, + GabbleMediaStream *stream) +{ +} + static LmHandlerResult initiate_msg_reply_cb (GabbleConnection *conn, LmMessage *sent_msg, @@ -1316,6 +1322,12 @@ try_session_initiate (GabbleMediaSession *session) } static void +try_content_add (GabbleMediaSession *session, + GabbleMediaStream *stream) +{ +} + +static void stream_close_cb (GabbleMediaStream *stream, GabbleMediaSession *session) { @@ -1403,14 +1415,28 @@ stream_got_local_codecs_changed_cb (GabbleMediaStream *stream, GMS_DEBUG_INFO (session, "stream %s has got local codecs", name); g_free (name); - /* FIXME */ - if (priv->initiator == INITIATOR_REMOTE) + /* after session is active, we do things per-stream with content-* actions */ + if (priv->state < JS_STATE_ACTIVE) { - try_session_accept (session); + if (priv->initiator == INITIATOR_REMOTE) + { + try_session_accept (session); + } + else + { + try_session_initiate (session); + } } else { - try_session_initiate (session); + if (stream_initiator == INITIATOR_REMOTE) + { + try_content_accept (session, stream); + } + else + { + try_content_add (session, stream); + } } } |