summaryrefslogtreecommitdiff
path: root/pjsip/src/pjsua-lib/pjsua_media.c
AgeCommit message (Collapse)Author
2013-12-17Fixed #1717: Destroy media subsystem after all pollings/busy_sleep() are ↵Nanang Izzuddin
done, but leave deallocating media transport (via pjsua_media_channel_deinit()) before the pollings to allow clean TURN destroy. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4694 74dad513-b988-da41-8d7b-12977e46ad98
2013-10-08Re #1703 General bug fixes: fixed wrong sizeof() in call to bzero(), ↵Benny Prijono
memset(), or memcpy() git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4614 74dad513-b988-da41-8d7b-12977e46ad98
2013-06-26Re #1668: fixed silly crash in pjsua_media.c:245 caused by r4543Benny Prijono
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4544 74dad513-b988-da41-8d7b-12977e46ad98
2013-06-24Closed #1668: Option to use the IP address found in REGISTER response in the SDPBenny Prijono
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4543 74dad513-b988-da41-8d7b-12977e46ad98
2013-06-21Re #1682: Use account specific variable to keep track of the next rtp port ↵Liong Sauw Ming
to use. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4542 74dad513-b988-da41-8d7b-12977e46ad98
2013-06-21Closed #1682: Configurable local port range for UDP media transportLiong Sauw Ming
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4539 74dad513-b988-da41-8d7b-12977e46ad98
2013-06-19Re #1680: Add initial support for Win64Riza Sulistyo
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4537 74dad513-b988-da41-8d7b-12977e46ad98
2013-04-16Fixed #1658: Stop media endpoint's worker threads first when destroying ↵Liong Sauw Ming
media subsystem git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4474 74dad513-b988-da41-8d7b-12977e46ad98
2013-03-08Fixed #1637: Crash in pjsua_media_channel_update() if one media gets rejectedLiong Sauw Ming
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4433 74dad513-b988-da41-8d7b-12977e46ad98
2013-03-05Misc (re #1559): fixed compile errors/warnings on MSVCRiza Sulistyo
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4412 74dad513-b988-da41-8d7b-12977e46ad98
2013-02-27Fixed #1626: Assertion when remote sends re-INVITE with less mediaLiong Sauw Ming
Included in the fix is sipp testing scenario. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4373 74dad513-b988-da41-8d7b-12977e46ad98
2013-02-21Re #1623: fixed deadlock between conference mutex and ICE. Scenario: Benny Prijono
- sound device thread calls put_frame() which gets the conf mutex, and is calling transport sendto() to send RTP packet which requires ICE mutex. - The worker thread finished ICE negotiation and notifies PJSUA-LIB and application while holding ICE group lock, app then do conf_connect() which causes deadlock. This fix defer the callback to a timer. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4363 74dad513-b988-da41-8d7b-12977e46ad98
2013-02-13Re #1568: (PJSIP 2.x) No need to restart media when remote RTP address ↵Nanang Izzuddin
changed but ICE transport is running. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4345 74dad513-b988-da41-8d7b-12977e46ad98
2013-02-07Close #1602: configurable local port range for ICE transport.Nanang Izzuddin
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4343 74dad513-b988-da41-8d7b-12977e46ad98
2013-02-06Close #1242: Single re-INVITE/UPDATE for both lock codec and ICE negotiation ↵Nanang Izzuddin
updates. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4342 74dad513-b988-da41-8d7b-12977e46ad98
2013-01-29Re #1568: (PJSIP 2.x) Apply pjsua_media_config before detecting media change ↵Liong Sauw Ming
and fixed encoding name string duplication. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4336 74dad513-b988-da41-8d7b-12977e46ad98
2013-01-04Fixed #1601: Add locking mechanism when ICE transport is in negotiation stateLiong Sauw Ming
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4313 74dad513-b988-da41-8d7b-12977e46ad98
2012-12-12Fixed #1598: Assertion when sip error code is not set (thanks Peter Koletzki ↵Liong Sauw Ming
for the report) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4306 74dad513-b988-da41-8d7b-12977e46ad98
2012-12-05Misc (re #1562): Add a protection in med_tp_timer_cb() against call that may ↵Benny Prijono
have been terminated before ICE callback is called. It has been reported that this has caused a crash, but we cannot reproduce it. Thanks Karina for the report. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4305 74dad513-b988-da41-8d7b-12977e46ad98
2012-12-05Fixed #1597: Handle socket failure in STUN resolution when coming back from ↵Benny Prijono
iPhone/iOS background mode git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4304 74dad513-b988-da41-8d7b-12977e46ad98
2012-10-08Re #1562: Fixed default custom media transport creation callback flag. By ↵Liong Sauw Ming
default, custom media transport should close its member transport. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4279 74dad513-b988-da41-8d7b-12977e46ad98
2012-09-20Fixed #1585: IPv6 support for SIP TCP and TLS transports and PJSUA-LIB v2Benny Prijono
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4262 74dad513-b988-da41-8d7b-12977e46ad98
2012-09-14Close #1568:Nanang Izzuddin
- Added media change detection based on SDP negotiation result and local codec param settings, the detection result will decide whether the media should be re-initialized after the SDP negotiation. - Fixed stream to keep the duplicate of codec param for the stream info (was only copying the pointer). - Introduced macro PJSUA_THIRD_PARTY_STREAM_HAS_GET_INFO & PJSUA_THIRD_PARTY_STREAM_HAS_GET_STAT. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4254 74dad513-b988-da41-8d7b-12977e46ad98
2012-09-05Fix #1580: Add SDP connection line in disabled or rejected media when there ↵Nanang Izzuddin
is none (in media/session level). git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4245 74dad513-b988-da41-8d7b-12977e46ad98
2012-08-31Fixed #1578: Possible deadlock when call is adding new media with ICE and ↵Benny Prijono
STUN enabled: svn commit pjsip/src/pjsua-lib/pjsua_media.c -m Fixed git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4242 74dad513-b988-da41-8d7b-12977e46ad98
2012-08-09Re #1562: Added compile-time setting to enable/disable "c=" line in SDP ↵Nanang Izzuddin
session level. The default is disabled. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4225 74dad513-b988-da41-8d7b-12977e46ad98
2012-08-09Close #1567: Added option to use STUN2 format for resolving mapped address ↵Nanang Izzuddin
in pjsua_config. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4224 74dad513-b988-da41-8d7b-12977e46ad98
2012-08-07Fixed #1412: Account specific NAT settings: STUN, ICE, and TURNBenny Prijono
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4218 74dad513-b988-da41-8d7b-12977e46ad98
2012-07-05Fix #1547:Nanang Izzuddin
- Added PJMEDIA_MAX_MRU to specify maximum packet size in receiving direction. - Added max_pkt_size into pj_turn_sock_cfg, default is PJ_TURN_MAX_PKT_LEN. - Fixed hardcoded MTU settings in media transport SRTP. - Added MIN_CHUNKS_PER_FRM constant in video stream. Notes: - PJMEDIA_MAX_MTU & PJMEDIA_MAX_MRU to specify max packet size for TX and RX dir. - For ICE media transport, TURN session limits outgoing packet size to PJ_TURN_MAX_PKT_LEN (the size of internal buffer for inserting TURN overheads). git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4197 74dad513-b988-da41-8d7b-12977e46ad98
2012-07-05Re #1548: Crash due to racing condition in timer when call is disconnected ↵Benny Prijono
quickly (thanks Joshua Colp for the report!) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4196 74dad513-b988-da41-8d7b-12977e46ad98
2012-06-27Re #1524: Added call to pjmedia_transport_simulate_lost() for async media ↵Liong Sauw Ming
transport creation git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4182 74dad513-b988-da41-8d7b-12977e46ad98
2012-06-11Fixed #1533: Deadlock in processing media transport asynchronous creation ↵Benny Prijono
completion (thank you Itay Bianco for the report) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4163 74dad513-b988-da41-8d7b-12977e46ad98
2012-05-22Re #1514: fixed the incoming call scenario, and changed disconnection code ↵Benny Prijono
from Precondition Failure to Temporarily Unavailable git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4136 74dad513-b988-da41-8d7b-12977e46ad98
2012-05-22Fixed first problem in #1514: assertion when media transport initialization failBenny Prijono
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4134 74dad513-b988-da41-8d7b-12977e46ad98
2012-05-21Fix #1511: destroy the media transport of the removed media.Nanang Izzuddin
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4132 74dad513-b988-da41-8d7b-12977e46ad98
2012-05-17Close #1506: Added PJSUA callback for SDP creation.Nanang Izzuddin
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4128 74dad513-b988-da41-8d7b-12977e46ad98
2012-04-26Fix #1496: destroying call media transports in pjsua_media_subsys_destroy() ↵Nanang Izzuddin
should be done using pjsua_media_channel_deinit(). git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4101 74dad513-b988-da41-8d7b-12977e46ad98
2012-04-26Re #1446 (misc): Disable SDL by default on iOS and fixed various compiler ↵Liong Sauw Ming
warnings. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4087 74dad513-b988-da41-8d7b-12977e46ad98
2012-04-24Fix #1423:Nanang Izzuddin
- Added provisional media in call for generating initial and subsequent SDP offer/answer. If a reoffer is rejected by peer, the main call media will remain unchanged and the provisional media will be cleaned up (the cleanup is currently delayed until call gets destroyed or another reoffer/answer occurs). - Reenabled media transport dump in pjsua_core.c. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4071 74dad513-b988-da41-8d7b-12977e46ad98
2012-04-03Misc (re #1446): fixed log message in pjsua_media_channel_update() for ↵Nanang Izzuddin
pjsua_vid_channel_update() failure. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4011 74dad513-b988-da41-8d7b-12977e46ad98
2012-03-30Re #1474: Merged all changes from 1.12 - HEAD (from the 1.x branch)Benny Prijono
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3999 74dad513-b988-da41-8d7b-12977e46ad98
2012-03-22Re: #1463 (Third party media support). Tnitial work and it works, tested on ↵Benny Prijono
Linux. Details: * add PJSUA_MEDIA_HAS_PJMEDIA macro * move pjmedia specific implementation in pjsua_media.c and pjsua_call.c into pjsua_aud.c * add pjsip-apps/src/third_party_media sample containing: - alt_pjsua_aud.c - alt_pjsua_vid.c * moved pjmedia_vid_stream_info_from_sdp() into pjmedia/vid_stream_info.c * moved pjmedia_stream_info_from_sdp() into pjmedia/stream_info.c * misc: fixed mips_test.c if codecs are disabled git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3982 74dad513-b988-da41-8d7b-12977e46ad98
2012-03-22Re #1467: fix sound device (opened/closed) status check in ↵Nanang Izzuddin
check_snd_dev_idle(), especially when sound device is managed by app (no_snd = PJ_TRUE). Note that pjsua_media_subsys_destroy() always close the sound device first, so check_snd_dev_idle() in pjsua_destroy() sequence should have been just a no-operation. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3981 74dad513-b988-da41-8d7b-12977e46ad98
2012-01-27Re #1244: Added bandwidth info in SDP ("b=" lines) based on codec bitrate ↵Nanang Izzuddin
settings. Two SDP bandwidth types/modifiers are used: AS in session level & TIAS in media level. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3945 74dad513-b988-da41-8d7b-12977e46ad98
2012-01-09Fixes #1442: Unable to make call if disabled media is includedLiong Sauw Ming
Add an API pjsua_schedule_timer2() to allow application to schedule a callback function to be executed after a specified time interval. This enables app to post a delayed job which, in this case, allows the initialization of all media transport creations to finish first before we get the media transport creations result. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3938 74dad513-b988-da41-8d7b-12977e46ad98
2011-12-28Fix #1433: synchronuous ICE initialization calls PJSUA_UNLOCK() only when ↵Nanang Izzuddin
the PJSUA lock is actually held by this thread. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3929 74dad513-b988-da41-8d7b-12977e46ad98
2011-12-27More re #1419: changed field names from video_count to vid_cnt and audio_cnt ↵Benny Prijono
to aud_cnt for better consistency git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3925 74dad513-b988-da41-8d7b-12977e46ad98
2011-12-26Re #1393 (misc): renamed label on_error to on_return and fixed warning re ↵Benny Prijono
constness git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3921 74dad513-b988-da41-8d7b-12977e46ad98
2011-12-20Fix #1425:Nanang Izzuddin
- Updating port info of the switchboard master port (after reopening audio device) with the audio device param should care about PJMEDIA_AUD_DEV_CAP_EXT_FORMAT flag, i.e: only copy from audio device extended format info when the flag is set. - Fixed switchboard to update the master port info shortcut in connecting ports, as master port info may get updated to match to the connecting ports. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3915 74dad513-b988-da41-8d7b-12977e46ad98
2011-12-15Misc (re #1393): fix compile error in pjsua_media.c (undefined member ↵Nanang Izzuddin
'bitrate' in struct 'pjmedia_format') when using passthrough codec. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3909 74dad513-b988-da41-8d7b-12977e46ad98