[Bug 20459] New: Simplify MediaStream+JingleContent life cycle
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Mar 4 15:10:52 CET 2009
http://bugs.freedesktop.org/show_bug.cgi?id=20459
Summary: Simplify MediaStream+JingleContent life cycle
Product: Telepathy
Version: unspecified
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: medium
Component: telepathy-gabble
AssignedTo: telepathy-bugs at lists.freedesktop.org
ReportedBy: senko at senko.net
Currently MediaStream depends on having a valid reference
to its JingleContent, but doesn't ref the content, instead
relying on the other code (MediaChannel and JingleSession)
to close the stream at the right time in certain situations
(any situation other than content emitting REMOVED signal,
which is handled explicitly in the stream).
This is hard to follow, hard to debug, and we've a couple
of related bugs already.
What should be done:
- ref the content in property setter of MediaStream
- unref it in the content_removed_cb handler in media-stream.c
- make sure JingleSession calls jingle_content_remove
for every content when disposing
- make sure JingleSession calls jingle_content_remove
when replacing the content
- make sure MediaChannel removes the content by calling
content_remove
Life cycle of JingleContent will then be:
- gets created (reference owned by JingleSession)
- new reference to be owned by MediaStream
- when it should be removed (either as an effect of
"content-remove", "session-terminate" or on the
local side), content emits REMOVED signal
- MediaStream unrefs the content and closes itself
- JingleSession unrefs the content by removing it
from contents hashtable
- content is disposed
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the telepathy-bugs
mailing list