#1266 closed task (fixed)
Asynchronous media transport creation
Reported by: | bennylp | Owned by: | ming |
---|---|---|---|
Priority: | major | Milestone: | release-2.0-alpha2 |
Component: | pjsua-lib | Version: | 2.0-dev-branch |
Keywords: | Cc: | ||
Backport to 1.x milestone: | Backported: |
Description (last modified by bennylp)
In 2.0, media transport creation is now made on as-needed basis, i.e. when calls need them. Currently the creation is blocking, so call initialization would wait (blocking) until media is created and initialized.
This ticket makes the creation asynchronous. The proposed solution is as follows:
- modify media transport creation to asynchronous (e.g. for STUN resolution)
- add new callback, e.g. on_call_media_transport_state(call_id, state_struct) to report media transport status. We'll use this to report transport creation status, as well as other events. The events reported by existing on_ice_transport_error() callback may as well go to this callback too (and remove on_ice_transport_error() altogether? I'd say yes.)
- for outgoing calls, delay the INVITE transmission until media transport is ready. Be aware that app may hangup the call at any time, including when transport is being created, hence need to handle this case.
- for incoming calls, report the INVITE to on_incoming_call() immediately. As long as app doesn't reject the call in this callback, proceed with creating the transport (which will finish asynchronously later). If app answers the call while the transport is not ready, there are several cases:
- if worker thread is enabled *and* current thread is not worker thread, block the execution waiting until transport is created.
- for Symbian, do event polling
- for other cases, return PJMEDIA_TP_EINSTATE (new errror: invalid transport state).
Also as in outgoing call case, app may hangup the call at any time.
More description is in #539 (duplicate of this ticket)
Change History (10)
comment:1 Changed 13 years ago by bennylp
- Milestone changed from release-2.0-alpha to release-2.0-beta
- Priority changed from normal to major
comment:2 Changed 13 years ago by bennylp
- Description modified (diff)
- Milestone changed from release-2.0-beta to release-2.0-alpha2
- Owner changed from bennylp to ming
- Status changed from new to assigned
- Summary changed from Make media transport creation asynchronous to Asynchronous media transport creation
comment:3 Changed 13 years ago by ming
comment:4 Changed 13 years ago by ming
comment:5 Changed 13 years ago by ming
comment:6 Changed 13 years ago by ming
comment:7 Changed 13 years ago by ming
- Resolution set to fixed
- Status changed from assigned to closed
comment:8 Changed 13 years ago by ming
comment:9 Changed 13 years ago by ming
comment:10 Changed 13 years ago by bennylp
- Description modified (diff)
Note: See
TracTickets for help on using
tickets.
(In [3763]) Re #1266: Asynchronous media transport creation