Application now needs to call pj_run_app() from its main() function and pass a pointer to the application's main function. For some examples, please refer to aviplay, pjmedia_test, and pjsua.
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/2.0-dev@3643 74dad513-b988-da41-8d7b-12977e46ad98
- Replaced bit_info mechanism to report format change in codec with event
- Updated vid_port, vid_codec_test, etc.
- Add event publisher to vid_codec
- Add event publisher to pjmedia_port
- Add event publisher to vid_stream
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/2.0-dev@3622 74dad513-b988-da41-8d7b-12977e46ad98
- Implemented validation of H.264 level in codec param.
- Update H.264 packetization setting to always send single NAL unit, for better compatibility.
- Update H.264 SDP custom negotiation to be permissive.
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/2.0-dev@3526 74dad513-b988-da41-8d7b-12977e46ad98
- Added custom negotiation callback mechanism in SDP negotiator, mainly for specific formats that require SDP fmtp negotiation.
- Modified video codec ID string to use encoding name+payload type (was encoding name+clock rate), also added encoding description in video codec info, so duplicated codecs (e.g: multiple H264 configurations) can be differentiated.
- Few enhancements for H264 in ffmpeg wrapper (e.g: added proper profile-id & packetization-mode setup).
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/2.0-dev@3500 74dad513-b988-da41-8d7b-12977e46ad98
- Initial version of H264 implementation (codec & packetization).
- Added vid_codec_util.h/c for video codec utilities (e.g: fmtp parser).
- Updated video RTP packetizations to be configurable and have internal state (to be more resilient to packet lost, etc).
- Fixed wrong SPF calculation in PJMEDIA_SPF2.
- Updated vid_codec_test.c to also have RTP packetization test.
- Updated sdp_neg.c to verify H.264 capability match.
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/2.0-dev@3493 74dad513-b988-da41-8d7b-12977e46ad98
- Video device now opens in "best effort" mode, i.e. it may open with different size and fps than requested. The actual size and fps will be reflected in the "param" upon return. The vidport must check this against any differences, and create converter accordingly.
- Removed const for param argument in vid_create_stream() API
- Currently converter in vidport will not work if vidport is opened in bidir. Converter for renderer is untested
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/2.0-dev@3489 74dad513-b988-da41-8d7b-12977e46ad98
* Move Mac OS' CFRunLoop object from vid_dev_test inside qt
* Remove NSApplication object management and auto release pool from vid_dev_test. Temporarily depend on SDLmain library for these.
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/2.0-dev@3484 74dad513-b988-da41-8d7b-12977e46ad98
- vstream:
- allow NULL pool parameter which means vstream will create one
- Updated remote FPS detection to only be performed if decoder returns frame (however the FPS detection is currently disabled as some endpoints changes fps continuously, causing renderer restart continuously too).
- codec:
- Updated video codec info to have RTP packetization support flag, also update endpoint in generating SDP to only include codecs whose RTP packetization support.
- Added dynamic payload types for video codecs.
- (minor) separate video PT into separate enum in pjmedia-codec/types.h
- H264 initial experiment.
generated frames (for libx264 sake).
- Replaced PJ_EUNKNOWN in some places with the appropriate error code.
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/2.0-dev@3461 74dad513-b988-da41-8d7b-12977e46ad98
1185: Dynamic creation of media transports
============================================
Done:
- media transports are created on demand now
Todo:
- media transport creation is still blocking
1201: Video support in PJSUA-LIB
===================================
Done:
- call now supports N media (N audio and M video)
- number of audio/video streams is configurable per acc
- extra audio stream info in pjsua_call_info to support multiple audio streams
in one call
- video subsys and ffmpeg initialization in PJSUA-LIB
- ability to offer and create video SDP answer
- "dq" for more than 1 audio streams
- introducing pjsua_state and pjsua_get_state()
API change:
- on_stream_created() and on_stream_destroyed() callbacks: changed session to
stream
Todo:
- many others features are disabled, just search for DISABLED_FOR_TICKET_1185
macro (these have also been added to ticket #1193 (Issues & Todos)). Notable
missing features are:
- creation of duplicate SDP m= lines for optional SRTP
- mm.. that's it?
- whole lot of testings
pjsua:
===============
- Added --extra-audio and --video options. Specify these more than once and
each time an extra audio/video streams will be added. :)
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/2.0-dev@3457 74dad513-b988-da41-8d7b-12977e46ad98
- Added remote frame-rate detection in to video stream.
- Fixed bitrate settings in ffmpeg codec.
- Fixed SDL dev to update internal SDL info when format changed.
- Minor fixes/updates, e.g:
- added cleanup steps, fixed logs, etc, in sample app simpleua.c and vid_streamutil.c
- fixed/added docs of the new APIs in the jitter buffer.
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/2.0-dev@3435 74dad513-b988-da41-8d7b-12977e46ad98
* support for format modification after creating video port (currently for renderer with active role only).
* support for format modification after opening SDL renderer.
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/2.0-dev@3431 74dad513-b988-da41-8d7b-12977e46ad98
- Renamed vstreamutil.c to vid_steamutil.c just for filename format consistency reason.
- Updated sample app simpleua.c and vid_streamutil.c to sync with updated API, e.g: strip session usage, two media ports exported video streams for each dir.
- Added vid_streamutil.c capability to be able to stream video file (involving transcoding when video codec used in the file different to the video stream codec), also updated AVI player and ffmpeg codecs to be able to read and decode XVID/MPEG4 codec.
- Fixed bug wrong media type check in stream.c and vid_stream.c in creating stream info from SDP.
- Minor update: docs, logs, app samples makefiles.
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/2.0-dev@3425 74dad513-b988-da41-8d7b-12977e46ad98
- Added video stream interface in vid_stream.h, the video stream will be able to handle different video formats in encoding and decoding direction.
- Renamed video device stream class identifiers from 'pjmedia_vid_stream*' to 'pjmedia_vid_dev_stream*' as 'pjmedia_vid_stream' is used by video stream interface.
- Added ffmpeg video capability to be able to parse SDP format param for H263 and also decide video format for encoding direction based on remote preference and local format-capability setting.
- Added some new APIs in jitter buffer for handling video stream: pjmedia_jbuf_put_frame3(), pjmedia_jbuf_get_frame3(), pjmedia_jbuf_peek_frame(), and pjmedia_jbuf_remove_frame().
- Moved pjmedia_stream_info_from_sdp() from session to stream
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/2.0-dev@3420 74dad513-b988-da41-8d7b-12977e46ad98
- Added API pjmedia_sdp_conn_cmp() to compare SDP connection.
- Added internal API pjmedia_stream_info_parse_fmtp() to parse SDP format parameter of specified payload as a helper function for generating stream info from SDP.
- Modified pjmedia_endpt_create_sdp() to be able to generate SDP media line for video.
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/2.0-dev@3419 74dad513-b988-da41-8d7b-12977e46ad98
* Move the AVI playback from pjmedia-test to new aviplay.c sample application
* Take the input file from cmdline
* Synchronize audio and video
* Remove all codecs related hardcodes from the file
Re #1193: (no. 6: duplicate fps and frame_rate in pjmedia_format and pjmedia_vid_param)
* Remove the frame_rate in pjmedia_vid_param
* Use pjmedia_format's fps in videoport, sdl_dev, and colorbar_dev
* Prevent overflow in ptime calculation from frame_rate
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/2.0-dev@3401 74dad513-b988-da41-8d7b-12977e46ad98
* QT capture device for Mac
* iOS device for iOS (capture device only works for iOS 4.0 or above)
* Add NSAutoReleasePool for sdl_dev (Mac)
* Add NSAutoReleasePool for vid_dev_test (Mac)
* build system for compilation of Obj-C files (.m)
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/2.0-dev@3395 74dad513-b988-da41-8d7b-12977e46ad98
- Added run-time configuration for activating/deactivating stream keep-alive (non-codec-VAD mechanism), also added this config to account settings.
- Fixed bug wrong session info pointer "si" in pjsua_media_channel_update() when call audio index is not zero.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3313 74dad513-b988-da41-8d7b-12977e46ad98
- Fixed bytes_per_frame calculation in stream port.
- Fixed sample streamutil.c to use codec info/param for codec bandwidth calculation (was using bytes_per_frame info of stream port).
- Doc fix for bytes_per_frame field in pjmedia_port_info.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3292 74dad513-b988-da41-8d7b-12977e46ad98
- Added PCM signal adjustment in IPP G722.1 implementation. The default setting is configurable via (the existing compile-time config) PJMEDIA_G7221_DEFAULT_PCM_SHIFT.
- Added new APIs to get and set IPP codecs settings: pjmedia_codec_ipp_set/get_config(). At run-time, the G722.1 PCM signal adjustment setting can be set using these functions.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3261 74dad513-b988-da41-8d7b-12977e46ad98
- Added (back) raw jitter statistics into RTCP statistics, with the new name "rx_raw_jitter".
- Added IPDV statistics into RTCP statistics.
- Added new compile-time settings to enable/disable raw jitter and IPDV statistics.
- Updated call dump in pjsua-lib.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3239 74dad513-b988-da41-8d7b-12977e46ad98
- Updated RTCP jitter statistics calculation (in receiving direction) to use "interarrival jitter" (was using "difference D") of RFC 3550.
- Added APIs to reset RTCP statistics.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3237 74dad513-b988-da41-8d7b-12977e46ad98
- fixed unterminated negotiation if our media transport rejects incoming offer (e.g. due to mismatch SRTP transport) with 488.
- to fix the above, modified the SDP negotiator (sdp_neg.[hc])'s pjmedia_sdp_neg_cancel_offer() to also be able to cancel in remote offer state
- also fixed the bug introduced previous Session Timer fix (Re: #1047), which cause SDP negotiator's state to be cleared after failed UAC UPDATE transaction is terminated, which means UPDATE can only be sent 5 seconds after the last UPDATE if the last UPDATE failed.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3217 74dad513-b988-da41-8d7b-12977e46ad98
- Added API pjmedia_codec_g722_set_pcm_shift() to enable configurable level-adjusment setting.
- Also added macro PJMEDIA_G722_DEFAULT_PCM_SHIFT (default value is 2) to accomplish 14-16 bit PCM conversion for G722 input/output.
- Added a feature in G722 to stop level-adjusment/PCM-shifting when clipping occured, compile-time configurable via PJMEDIA_G722_STOP_PCM_SHIFT_ON_CLIPPING macro.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3202 74dad513-b988-da41-8d7b-12977e46ad98
- Fixed process_answer() of SDP negotiation, when no common format in a media, instead of returning error, it should just deactivate the media (offer & answer) and continue negotiating next media.
- Generalized the way of deactivating media: set port to 0 and remove all attributes.
- Added new API pjmedia_sdp_media_clone_deactivate() to clone media and deactivate the newly cloned media.
- Updated PJMEDIA SDP negotiation test.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3198 74dad513-b988-da41-8d7b-12977e46ad98
- Removed orphaned third_party/gsm/inc/gsm.h.orig file
- Added support for external GSM header in /usr/include/gsm.h (rather than <gsm/gsm.h>)
Thanks Christopher Zimmermann for the fixes
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3158 74dad513-b988-da41-8d7b-12977e46ad98
- implemented progressive discard algorithm, discard rate is calculated from ratio of effective size to effective burst level.
- updated jbuf to clarify prefetch and burst level distinction, previously they are stored in same var, i.e: prefetch, while the semantic is actually different.
- updated STABLE_HISTORY_LIMIT in jbuf, it is now 20 (was 100), to adjust burst level faster.
- added test case of periodic-spike-burst-case in jbtest.dat for testing the new algorithm.
- updated stream to limit the rate of jbuf empty/lost log messages, it will only log first empty/lost event, then log again once jbuf returning normal frame (also counter of previous empty/lost frames).
- minor updates on jbuf.c: variable names, logs, added burst to jbuf state.
- minor updates on jbuf_test.c: handle comment in test session header, seq jump is now 20 (was 5000).
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3065 74dad513-b988-da41-8d7b-12977e46ad98
- support for using external libspeex and libgsm
- replaced --with-pa-path with --with-external-pa
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3062 74dad513-b988-da41-8d7b-12977e46ad98
- increase default playback latency (PJMEDIA_SND_DEFAULT_PLAY_LATENCY) to 140ms for Win32 and 160ms for WM
- set default PJMEDIA_SOUND_BUFFER_COUNT to (PJMEDIA_SND_DEFAULT_PLAY_LATENCY+20)/20 rather than hardcoded 6
- disable PA from audiodev on Win32 and WM
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2977 74dad513-b988-da41-8d7b-12977e46ad98
- done
- added pj_ice_strans_state (to be used for informational purposes for now)
- added pjmedia ICE transport specific info, and display it in call dump output
- misc fixes (changed pjmedia_transport_info.spec_info_cnt from int to unsigned)
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2945 74dad513-b988-da41-8d7b-12977e46ad98
WSOLA improvements:
- Introduce fade-out and fade-in effect
- Limit the number of continuous synthetic samples (only take effect when fading is used)
- Export many settings as macros:
- PJMEDIA_WSOLA_DELAY_MSEC (was HANNING_PTIME)
- PJMEDIA_WSOLA_TEMPLATE_LENGTH_MSEC (was TEMPLATE_PTIME)
- PJMEDIA_WSOLA_MAX_EXPAND_MSEC
PLC:
- added compile time macro PJMEDIA_WSOLA_PLC_NO_FADING to disable fading (default enabled)
Stream:
- fixed bug when stream is not PLC-ing subsequent packet loss (only the first)
- also add maximum PLC limit just as precaution if PLC doesn't limit number of synthetic frames
- unrelated: fixed warning about unused send_keep_alive() function
Delaybuf:
- modified to NOT use fading in WSOLA since we don't expect it to generate many continuous synthetic frames
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2850 74dad513-b988-da41-8d7b-12977e46ad98
- This ticket allows the same loop media transport instance to be attached to more than one streams, and allow application to control which stream(s) receives the reflected packets.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2845 74dad513-b988-da41-8d7b-12977e46ad98
- Added support for Nokia VAS 2.0.
- Fixed wrong value assigned to last downstream state var in downstream callback.
- Minor fix in config_site_sample.h related to VAS Direct setting.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2833 74dad513-b988-da41-8d7b-12977e46ad98
- Added a new API pjmedia_codec_passthrough_init2().
- Updated the initialization steps of passthrough codec in pjsua_media.c, to configure the codecs (of passthrough codec) to be enabled based on audio device extended/encoded formats.
- Minor update: added passthrough.h into pjmedia_codec.vcproj.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2825 74dad513-b988-da41-8d7b-12977e46ad98
- Added new audio device VAS for Symbian platform.
- Updated symsndtest to use the latest audio device framework.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2821 74dad513-b988-da41-8d7b-12977e46ad98
- Added calls to delay buf destructor in conference.c and echo_common.c.
- Moved mutex creation to the end of pjmedia_delay_buf_create().
- Deprecated pjmedia_conf_add_passive_port().
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2728 74dad513-b988-da41-8d7b-12977e46ad98
- Added build config for GNU autoconf & make.
- Fixed some G.722.1 codes for linux & mingw32 targets, e.g: types
defs, collision function name 'round'.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2601 74dad513-b988-da41-8d7b-12977e46ad98
- Updated loop condition in put_frame() to avoid possibility of infinite loop.
- Added JB capabilities to handle sequence restart & jump.
- Updated jitter calculation, e.g: reset max_hist_level after updating prefetch, avoid updating prefetch when burst level is exceeding max_burst.
- Updated shrinking method to be less agressive (only shrink JB when JB size is twice larger than burst level).
- Updated the way JB switching status from 'initializing' to 'processing' by waiting for some OP switch cycles.
- Few simplifications in framelist process, e.g: replacing fields 'empty' & 'tail' with 'size'.
- Minor updates: comments, shortened framelist field names, added some JB states for reporting/monitoring purpose.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2578 74dad513-b988-da41-8d7b-12977e46ad98
- Initial source of G.722.1/Annex C integration.
- Disabled some "odd" modes of L16 codec (11kHz & 22kHz mono & stereo) while releasing some payload types.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2563 74dad513-b988-da41-8d7b-12977e46ad98
- pjmedia.h: re-added inclusion of <sound.h> since we have compat
layer now
- audiodev.h:
- added input_vol and output_vol in pjmedia_aud_param, and
implement it on WMME dev
- added pjmedia_aud_dev_cap_name() to see cap name
- added pjmedia_aud_param_set_cap() and pjmedia_aud_param_get_cap()
to set and get specific capability in param
- conference.h: exported PJMEDIA_CONF_BRIDGE_SIGNATURE and
PJMEDIA_CONF_SWITCH_SIGNATURE since these are needed by PJSUA-LIB
- WMME: bug due to addition of input_vol and output_vol in param:
volumes are set in flags in default_param(), but the
fields are not set. This would cause audio volume to be set to
zero for example.
- WMME: some refactoring, removed duplicate settings in param
- WMME: bug: setting set in set_cap() is not saved to param, so
get_param() will return wrong setting
- APS: update because of s/out_route/output_route/ in param
- APS: same bug as WMME due to addition of input_vol and output_vol in
param: flags are set in param but the fields are not
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/aps-direct@2492 74dad513-b988-da41-8d7b-12977e46ad98
- Fixed bug in conf_switch.c to always update ts_rx (even if port is not transmitting).
- Minor updates: 'fmt_id' to 'id', added transmitter_Cnt in conf port info, explicit mapping in Symbian audio APS impl from pjmedia_format_id to Symbian APS fourcc.
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/aps-direct@2460 74dad513-b988-da41-8d7b-12977e46ad98
- Updated conf switch to enable RX/TX level adjustment.
- Added VAD & PLC setting in passthrough codecs.
- Changed G711 fourcc codes.
- Updated bits-to-bytes calculations all over the places.
- Minor update: changed log level for dumping jbuf states in stream.
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/aps-direct@2445 74dad513-b988-da41-8d7b-12977e46ad98
- Updated audio switch board to make user possible to update its port 0 (master port) attributes, this is needed since sound device need to be reopened (e.g: for changing ptime or codec) while conf is not recreated.
- Added new API to AMR helper to resolve mode/frame-type based on frame len.
- Updated pmedia_frame_ext helper functions for a bit optimization.
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/aps-direct@2444 74dad513-b988-da41-8d7b-12977e46ad98
- Fixed symbian_sound_aps.cpp in filling silence, previously just by filling zeroes.
- Some fixes in ua.cpp: always reopen sound device (even if PCM is in use), make sure sound device closed before quit, release application pool.
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/aps-direct@2439 74dad513-b988-da41-8d7b-12977e46ad98
- Updated symbian_ua/ua.cpp to be able to reopen sound device when audio stream session is using non-PCM data/passthrough codec.
- Updated stream.c to allow it works with non-PCM data.
- Added PCMU/A frames processing into non-PCM play/record callbacks in symbian_audio_aps.cpp.
- Added passthrough codec init/deinitialization in pjsua-lib.
- Added a new pjmedia_frame_ext helper function, pjmedia_frame_ext_pop_subframes, to pop-out/remove some subframes.
- Other minor updates/fixes.
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/aps-direct@2438 74dad513-b988-da41-8d7b-12977e46ad98
- Fixed audio switch board to handle such case that transmitter of port 0 has greater ptime, so it could save the remaining data in the TX buffer.
- Fixed audio swtich board in handling FRAME_TYPE_NONE.
- Updated audio switch board to handle keep alive mechanism.
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/aps-direct@2437 74dad513-b988-da41-8d7b-12977e46ad98
- Configurable setting to enable/disable AMR bitstream reordering (sensitivity order to/from encoder bits order).
- Updated AMR codec to regard in-band Change Mode Request from remote encoder.
- Updated AMR settings (octet-align, etc) to be configured upon codec opening, instead of hardcoded in the encode, decode, parse.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2359 74dad513-b988-da41-8d7b-12977e46ad98
- Changed rem_rtp/rtcp_addr to src_rtp/rtcp_addr in media transport info
- Updated behaviour of media transport get info, when the transport hasn't receive any packet src_rtp/rtcp_addr will not be set.
- Fixed bug in pjsua_call_dump that rem_addr was unset.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2293 74dad513-b988-da41-8d7b-12977e46ad98