- Improve trickling state management (fix no SIP INFO when initial INVITE responded immediately with 200, strayed SIP INFO after trickling is done, etc).
- Fix issues when rtcp-mux is enabled.
- Allow process incoming SIP INFO before receiving remote SDP.
- Use regular ICE on re-INVITE (with reinit media flag).
- Avoid calling pj_ice_strans_get_running_comp_cnt() for loop condition.
- Fix bug in pjnath-test: TURN server set wrong peer channel number.
- Added timer for end-of-candidate indication from remote & don't flag ice-mismatch if remote uses default address in trickle ICE
- Fix premature end-of-candidate indication.
- Fix premature ICE session destroy in sending INFO (update remote with local candidates).
- Fix assertion when foundation list is full.
- Fix assertion when pruned check is completed/timed-out.
- Minor, missing 'static' for internal functions.
* Implement android AMediaCodec AVC/VPX codec.
* - Change "anmed" to "and_media" prefix for clearity.
- Check if encoder/decoder exists before enabling codec.
* Fix bug on enum info.
* Add support to AMRNB and AMRWB audio codec.
* Modification based on comments.
* - move VPX packetizer from codec implementation.
* - Remove unwanted changes.
- Fix bug on vpx (VP9) packetize method.
* - New method to initialize vpx packetizer config.
- Don't use pt as codec id.
* add compiler option to prioritze using software or hardware codec.
* add documentation related to packetization mode for H264.
* fix some potential compile error.
* Specify video codec PT to support #2656.
* Add option to always use VPIO on coreaudio dev.
* Revert "Add option to always use VPIO on coreaudio dev."
This reverts commit 55d6da5b4b.
* Allow EC to be enabled when sound device is opened on speaker only mode.
* Modify assertion to allow ec to be set on playback only mode.
* - use SRTP attribute specified on SDP when starting SRTP-SDES transport.
* Check for only key changes on SDP and compare it to the SRTP settings.
* check and change the crypto key on sdes_media_start().
* Move check for the answerer side to the original place.
* send keep alive when stream is started.
* modification based on comments.
* Add documentation.
* Modification based on comments.
* Grouped configuration.
- Maintain roll over counter in SRTP restart.
- Only reinit probation when SRTP is really restarted, was every srtp_start() (in PJSUA, media_start()/srtp_start() is called every after SDP nego, while SRTP may not be restarted, e.g: when SRTP policy/keys are not changing).
Make several pool sizes settable via compile time macro settings. This can be used to deal with memory fragmentation issues in long running applications that encounter temporary high loads.
* - Allow demote SRTP call to RTP when using re-INVITE with
PJSUA_CALL_REINIT_MEDIA
- DTLS renegotiation when receiving re-INVITE with modified media
transport address
* Revert DTLS_DEBUG to 0.
* modification based on comments.
* modified comment.
* pjsua-test:
- Update pjsua-test module call: wait ICE update before checking media
- Attempt to fix all failed tests by sipp module: changed SIPp port from 6000 to 50070 (port used by recvfrom module)
- Update call module: confirm codec priority after change, fix DTLS-SRTP expect may race with state CONFIRMED
- Add timeout check in telnet-ing to pjsua
- ICE nego may race with call state CONFIRMED, so mod call better just sleep instead of expecting 'ICE nego success'.
* Other unit tests:
- Print stack trace on crash on Linux and DarwinOS via SIGSEGV signal handler.
- Update resolver test: print log on callback error, replace assertion checks with error return, fix comments, sleep periods, fix received packet count may be > 1 if server ignore the request (for example when the test machine experiencing high CPU load).
- Update ccpp.yml: add -g for jobs with unit-tests.
- More lenient on tsx retransmission count check in pjsip-test.
- Update tsx_uac/s_test.c: allow retransmission timing diff from 150 to 500ms to accommodate possible CPU spike on some test machines.
* Add option to exclude benchmark tests in unit tests
* Loosen up resolver round-robin testcondition (percent difference allowance from 5% to 10%, the test result variance relies heavily on OS random number distribution).
Fix vpx fmtp apply:
- Only adjust the frame rate if it exceeds max-fr
- Maintain aspect ratio when adjusting resolution
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6149 74dad513-b988-da41-8d7b-12977e46ad98
- Add vpx.h/vpx.c to Visual Studio project files
- Fix compile error/warning from Visual Studio
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6147 74dad513-b988-da41-8d7b-12977e46ad98
Steps to reproduce:
- Revert this changeset
- Use pjsua to do sound loopback (cc 0 0) with --ec-tail=0 (VPIO disabled->audio fine) and ec-tail=1 (VPIO enabled->recording sound defects)
Several observations:
- Playback is totally fine in VPIO stereo mode.
- Defect more noticable in 44.1 kHz
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6128 74dad513-b988-da41-8d7b-12977e46ad98
- Updated PJMEDIA endpoint to rearrange dynamic payload type allocation in generating SDP for audio, the allocation arranged in pjmedia_audio_pt enumeation is no longer used.
- Updated PJMEDIA_RTP_PT_TELEPHONE_EVENTS default value to 120, so lower PT values will be used by audio codecs.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6105 74dad513-b988-da41-8d7b-12977e46ad98
- Deinit OpenGL immediately when initialization fails, so video device {{{start()}}} and {{{put_frame()}}} will return immediately.
- Introduced new media event {{{PJMEDIA_EVENT_VID_DEV_ERROR}}}, used for notifying app when video device reinit (due to format change) fails.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6085 74dad513-b988-da41-8d7b-12977e46ad98
* Also add video stream port to video conf when call is on local hold in order for video stream to keep sending keep-alive.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5960 74dad513-b988-da41-8d7b-12977e46ad98
But the problem itself is caused by video port, which passes the wrong frame size when the video capture is passive.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5948 74dad513-b988-da41-8d7b-12977e46ad98
- Apply returned frame quality filter in OpenH264 decoder (drop the frame if decoder returns dsRefLost dsNoParamSets, dsDepLayerLost).
- Only publish keyframe missing event when decoder returns non-dsErrorFree (was always publishing the event when no frame is returned, while decoder may return dsErrorFree and no frame returned, e.g: when decoding parameter sets).
- Added a bit more logs for debugging.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5925 74dad513-b988-da41-8d7b-12977e46ad98
- Frame rate calculation is now done using temporary variable, instead of using stream decoding channel state directly.
- Added condition for applying calculated frame rate: it must be greater than zero.
- Fixed frame rate comparison to use float, was using integer which might get overflow on 32 bit integer platforms.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5913 74dad513-b988-da41-8d7b-12977e46ad98
- Fixed transport_udp so it won't call another read operation when being stopped.
- Add robustness checks (assertion) in ioqueue recv, recvfrom, and accept to prevent the same op key being used twice.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5907 74dad513-b988-da41-8d7b-12977e46ad98
A couple of improvements:
- Now initialize both video port's renderer AND capture buffer
- Support RGB format as well.
Known limitation: YUV currently only supports I420 and YV12
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5868 74dad513-b988-da41-8d7b-12977e46ad98
- Fix assertion when DTLS tries to attach transport, but the ICE transport's source RTP address hasn't been updated.
- Fix DTLS transport attachment in dtls_media_start() which misses rtcp-mux checking, causing rtcp-mux to be disabled.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5852 74dad513-b988-da41-8d7b-12977e46ad98
- Updated DTLS-SRTP to ignore stray packet after DTLS nego has been completed.
- Added few debugging logs.
- Fixed false SSL error.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5847 74dad513-b988-da41-8d7b-12977e46ad98
If an ALSA audio device cannot be opened for recording and playback, it may mean that they are temporarily busy (such as currently being used by another app), so we should still list it.
Thanks to Tobias Schneider for the patch.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5846 74dad513-b988-da41-8d7b-12977e46ad98
- Added new error code for sending RTP/RTCP failure when DTLS-SRTP nego is in progress.
- When sending RTP/RTCP fails, only print error message once for consecutive same errors.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5845 74dad513-b988-da41-8d7b-12977e46ad98
- For better interoperability, check remote support for DTLS-SRTP by inspecting SDP a=fingerprint availability instead of UDP/TLS/SRTP/SAVP.
- Bailout DTLS-SRTP when SDP a=fingerprint is not available.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5823 74dad513-b988-da41-8d7b-12977e46ad98
- make sure that C++ compiler is available, and
- disable ALSA when ALSA development library is not found.
Thanks Alexander Traud for the feedbacks.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5814 74dad513-b988-da41-8d7b-12977e46ad98
- Fixed nullptr exception, because opt pointer might not be set.
- Remove assertion to check pool and sdp in pjmedia_transport_media_start().
Thanks to Ciro Ferraiuolo for the report.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5811 74dad513-b988-da41-8d7b-12977e46ad98
- Stream buffer calculation is now based on maximum bitrate and maximum receiving frame size.
- Added buffer size check when getting frame from jitter buffer, pjmedia_jbuf_get_frame*() specification has been updated that 'size' param is now input and output (was output only).
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5803 74dad513-b988-da41-8d7b-12977e46ad98
- Set default max Opus RX frame length, i.e: param.info.max_rx_frame_size, to 1275. This is to avoid issue of truncated frame in jitter buffer when incoming frame length gets increased (after remote Opus encoder changes Opus params on the fly, e.g: ptime, VBR/CBR, sampling rate). Thanks Marcus Froeschl for the report, the investigation, and the solution.
- Fixed pjmedia_codec_opus_set_default_param() to initiate codec param with current default settings.
- Fixed some compile warnings.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5799 74dad513-b988-da41-8d7b-12977e46ad98
- Fixed memory leak due to not destroyed DTLS-SRTP keying (when it is not active).
- DTLS-SRTP must not destroy itself, keying destroy must be initiated by SRTP.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5794 74dad513-b988-da41-8d7b-12977e46ad98
- Fixed DTLS-SRTP issues with AEAD_AES_256_GCM crypto, e.g: material buffer length too short, silly mistake of missing comma in PJSIP-OpenSSL crypto map.
- Fixed SRTP error PJMEDIA_SRTP_ESDPREQCRYPTO when crypto count is set to zero and SRTP is in mandatory mode.
- Fixed SRTP transport attach where stream RTP/RTCP reception callbacks may be overriden by DTLS-SRTP.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5781 74dad513-b988-da41-8d7b-12977e46ad98
In file included from /android-ndk-r15c/platforms/android-15/arch-arm/usr/include/linux/posix_types.h:41:0,
from /android-ndk-r15c/platforms/android-15/arch-arm/usr/include/sys/types.h:37,
from /android-ndk-r15c/platforms/android-15/arch-arm/usr/include/stdio.h:50,
from ../../pjlib/include/pj/compat/string.h:39,
from ../../pjlib/include/pj/string.h:29,
from ../include/pjmedia/frame.h:28,
from ../include/pjmedia/port.h:30,
from ../include/pjmedia/codec.h:29,
from ../include/pjmedia-codec/types.h:29,
from ../include/pjmedia-codec/openh264.h:22,
from ../src/pjmedia-codec/openh264.cpp:19:
/android-ndk-r15c/sysroot/usr/include/arm-linux-androideabi/asm/posix_types.h:33:37: fatal error: asm-generic/posix_types.h: No such file or directory
#include <asm-generic/posix_types.h>
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5757 74dad513-b988-da41-8d7b-12977e46ad98
- Added new APIs:
* PJMEDIA: pjmedia_srtp_enum_crypto(), pjmedia_srtp_enum_keying()
* PJSUA: pjsua_config.srtp_opt, pjsua_acc_config.srtp_opt, pjsua_srtp_opt_default()
* PJSUA2: AccountMediaConfig::srtpOpt, Endpoint::srtpCryptoEnum()
- Deprecated PJSUA callback on_create_media_transport_srtp() (not removed yet, just warnings).
- Slightly refactored SRTP code:
* Fixed potential issue with on_create_media_transport_srtp(), some PJSUA internal values in pjmedia_srtp_setting may be overridden by app.
* Fixed few issues in SRTP and keying mechanism, e.g: premature local SDP modification (it should be done after verification).
* Potential minor backward compatibility issue: default value of pjmedia_srtp_setting.crypto_count is now zero, previously it was initialized with all crypto via pjmedia_srtp_setting_default(), actually zero and all cryptos in this setting semantically are the same.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5755 74dad513-b988-da41-8d7b-12977e46ad98
The summary of changes:
- To solve no 2:
Add callback rtp_cb2(pjmedia_tp_cb_param *param) which allows application to get more info from the media transport, such as the packet's source address.
- To solve no 3:
Add compile time option PJMEDIA_TRANSPORT_SWITCH_REMOTE_ADDR (by default enabled). Currently, there are already runtime options PJMEDIA_UDP_NO_SRC_ADDR_CHECKING and PJMEDIA_ICE_NO_SRC_ADDR_CHECKING, but there are a few drawbacks:
* the options are not exported to the higher level, such as stream, or pjsua.
* the options are separate for each transport, UDP and ICE, there's no single option to do this.
- To solve no 1:
Using the new rtp_cb2() callback, move the functionality to check the packet's source address to the stream/video stream.
By checking the RTP pt and SSRC, there are a few advantages:
* When receiving packets from multiple sources, stream can choose the packet with the correct SSRC as advertised from the SDP, and discard the others (see also ticket #1366).
* If remote address switch is enabled, a faster switch can be achieved as soon as packet with correct ssrc is received, instead of waiting for several consecutive packets (according to setting PJMEDIA_RTP_NAT_PROBATION_CNT).
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5752 74dad513-b988-da41-8d7b-12977e46ad98
- Fixed crash in media transport when application calls detach() while the transport only implements detach2().
- Avoid assertion in UDP media transport when calling detach() without previously calling attach().
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5750 74dad513-b988-da41-8d7b-12977e46ad98
- Fixed re-INVITE scenario: always generate SRTP attr in SDP re-offer/answer as both offerer/answerer (as long as SRTP is not disabled of course), currently it does not generate SRTP attr if active session does not use SRTP.
- Fixed bug in retrieving video stream info from SDP that caused DTLS transport (UDP/TLS/RTP/SAVP) getting rejected.
- Added pjsua app param '--srtp-keying=0/1' to choose SRTP keying to be used in the outgoing offer (0=SDES (default), 1=DTLS-SRTP).
- Few minors, e.g: adding transport_srtp_dtls/sdes.c to pjmedia MSVC2015 project.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5746 74dad513-b988-da41-8d7b-12977e46ad98
* Also add autodetection of external SRTP version via the configure script.
Thanks to Alexander Traud for the report.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5656 74dad513-b988-da41-8d7b-12977e46ad98