{{{ #!html
}}} = PJSIP Version 2.0 Release Notes = '''Table of Contents''' [[PageOutline(2-3,,inline)]] This document explains in brief the new features, changes, and porting guide in/for PJSIP version 2.0. For a complete ticket list applicable to 2.0 see the following milestones: * [milestone:release-2.0-alpha 2.0-alpha] * [milestone:release-2.0-alpha2 2.0-alpha2] * [milestone:release-2.0-beta 2.0-beta] * [milestone:release-2.0-rc 2.0-rc] * [milestone:release-2.0 2.0] [[BR]] == New Features == === Video === Video support is a new major feature. For this release it is available on Windows, Mac OS X, and Linux. Assorted features: 1. Supported video devices: - renderer: - Simple Direct Media Layer (SDL) (Windows, Mac OS X, Linux, etc.) - !DirectShow (Windows) - capture: - !QuickTime (MacOS X) - Video4Linux4 (Linux) - !DirectShow (Windows) - Color bar (all platforms) 1. Supported codecs: - H.263-1998 (with ffmpeg) - H.264 (with ffmpeg or libx264 1. video device port to provide timing for video devices (analogous to sound device port) 1. media format conversion framework (converter.h) supporting multiple backend APIs: - ffmpeg's libswscale backend API implementation 1. video codec framework (vid_codec.h) supporting multiple backend APIs: - ffmpeg's libavcodec backend API implementation 1. AVI file splitter/reader component (aviplayer.h) === On Demand Media Transport === Media transports are now created on demand. Rationale is given in #539. Media transport setting is now part of account setting (instead of global setting). Idle timer is used to keep media transports alive and close them after idling for some time. The idle period and number of transports that are allowed to be idling are settable. For incoming calls, the "on_incoming_call()" callback is now called before media transport is created, to allow application to reject the call cheaply. The media transport will be created as soon as the callback returns, as long as the call is not disconnected. The media transport creation may take a while to complete (for example, waiting for candidates gathering for ICE media transports). If application sends 183/Progress or 200/OK to the call while the media transport creation is in progress, the response will be queued internally. For outgoing calls, the INVITE request will be delayed until media transport is ready. === Third Party Media Support === Starting with PJSIP 2.0, support for integrating third party media stack into PJSUA-LIB was added. By following the steps outlined in [wiki:3rd_Party_Media_20 Integrating Third Party Media Stack into PJSUA-LIB], application can use third party media stack to perform audio and video functionality while still making use of the full SIP, NAT, and security (including SRTP) features provided by PJSUA-LIB API. === Other Components === New components: 1. Event framework 1. [http://www.pjsip.org/docs/latest-2/pjlib/docs/html/group__PJ__APP__OS.htm pj_run_app()] New applications: 1. [source:pjproject/trunk/pjsip-apps/src/samples/sipecho.c sipecho]: Loops back peer's media (audio and/or video), and supports call hold too. It also works as a simple registrar, if peer needs it. 1. [source:pjproject/trunk/pjsip-apps/src/vidgui/INSTALL.txt vidgui]: Qt based video GUI sample, to illustrate integration of PJSIP video framework to GUI apps. [[BR]] == Changes == Major changes are listed below. There also various header file changes, especially in PJMEDIA. === PJSUA === ==== Design change ==== 1. Dynamically create media transports 1. Support for multiple medias in call, 1. Support for video (preview, windows ops, devs, etc.) 1. Refactor source code to support third party media library 1. Internal PJSUA call & media structures and algorithms have been refactored. ==== pjsua_call_info ==== - '''Changed''': As now call can have multiple media streams, e.g: M audio streams and N video streams, {{{pjsua_call_info}}} also has array of media info. Check the call info documentation [http://www.pjsip.org/docs/latest-2/pjsip/docs/html/structpjsua__call__info.htm here] for details. ==== SRTP optional mode with duplicated media ==== - '''Deprecated''': {{{pjsua_acc_config::srtp_optional_dup_offer}}} and {{{pjsua_config::srtp_optional_dup_offer}}}, these settings have been deprecated and will be ignored (if it is set). ==== Media transport ==== - '''Removed''': {{{pjsua_media_transports_create}}} and {{{pjsua_media_transports_attach}}}, due to dynamic media transport creation (see #539). - '''Removed''': {{{pjsua_call_get_media_transport()}}}. - '''New''': [http://www.pjsip.org/docs/latest-2/pjsip/docs/html/group__PJSUA__LIB__CALL.htm#ga9907c1c75b6de2a6a634fd9cd2c68126 pjsua_call_get_med_transport_info()]. ==== Media session ==== - '''Removed''': {{{pjsua_call_get_media_session()}}}. - '''Changed''': "session" parameter in [http://www.pjsip.org/docs/latest-2/pjsip/docs/html/structpjsua__callback.htm#a645a9ee0fb5965de9d545e0d2cf97722 on_stream_created()] and [http://www.pjsip.org/docs/latest-2/pjsip/docs/html/structpjsua__callback.htm#ae3070f612547073a3e27825dd1229435 on_stream_destroyed()] callbacks has been replaced by "stream". ==== New PJSUA APIs for video ==== - '''New''': [http://www.pjsip.org/docs/latest-2/pjsip/docs/html/structpjsua__call__setting.htm pjsua_call_setting]. - '''New''': [http://www.pjsip.org/docs/latest-2/pjsip/docs/html/group__PJSUA__LIB__VIDEO.htm PJSUA-API Video], - '''New''': PJSUA call APIs for video stream manipulation such as [http://www.pjsip.org/docs/latest-2/pjsip/docs/html/group__PJSUA__LIB__CALL.htm#gaaccd78b3c46f20c396ccd7833f2a0672 pjsua_call_set_vid_strm()], [http://www.pjsip.org/docs/latest-2/pjsip/docs/html/group__PJSUA__LIB__CALL.htm#ga23c0bd5a335b5fa0d02404cd03ca0d5e pjsua_call_vid_stream_is_running()], [http://www.pjsip.org/docs/latest-2/pjsip/docs/html/group__PJSUA__LIB__CALL.htm#ga75f489659c931707e953024cc1a5b7c5 pjsua_call_get_vid_stream_idx()] See also [http://www.pjsip.org/docs/latest-2/pjsip/docs/html/group__PJSUA__LIB.htm PJSUA-LIB documentation]. === Media Format === Containing all information needed to completely describe a media. - '''Changed''': [http://www.pjsip.org/docs/latest-2/pjmedia/docs/html/structpjmedia__format.htm pjmedia_format] — it is now virtually able to describe any media types (in 1.x it was containing extended info for audio format). Here are the core contents: - Format ID — Specifies the audio sample or video pixel format. Enumeration of some well known formats IDs is defined in [http://www.pjsip.org/docs/latest-2/pjmedia/docs/html/group__PJMEDIA__FORMAT.htm#ga7a0830cb291693cabb364a3403777bda pjmedia_format_id]. - Media type — The top-most type of the media, as an information. - Format detail — Detail section to describe the media. As the details are different among media types, this field is declared as union and [http://www.pjsip.org/docs/latest-2/pjmedia/docs/html/group__PJMEDIA__FORMAT.htm#ga3272e8f9dc6d369dc9fe5dcb67408fc5 pjmedia_format_detail_type] is introduced to recognize the content. Currently there are two predefined structures: - [http://www.pjsip.org/docs/latest-2/pjmedia/docs/html/structpjmedia__audio__format__detail.htm pjmedia_audio_format_detail] for audio format detail - [http://www.pjsip.org/docs/latest-2/pjmedia/docs/html/structpjmedia__video__format__detail.htm pjmedia_video_format_detail] for video format detail. - '''New''': Video format helper: - [http://www.pjsip.org/docs/latest-2/pjmedia/docs/html/structpjmedia__video__format__info.htm pjmedia_video_format_info] — Information to describe a raw video format, such as RGB/YUV color model, number of bits per pixel, planar/packed data representation, and pointer to function to get ''real-time'' information of a raw video format (such as buffer size needed for a picture, byte size of a picture line, pointer and buffer size of each plane). - [http://www.pjsip.org/docs/latest-2/pjmedia/docs/html/structpjmedia__video__apply__fmt__param.htm pjmedia_video_apply_fmt_param] — Information to apply a raw video format against size and buffer information, and get additional information from it. To do that, application fills up the input fields of this structure, and give this structure to {{{apply_fmt()}}} function of {{{pjmedia_video_format_info}}} structure. Check the media format documentation [http://www.pjsip.org/docs/latest-2/pjmedia/docs/html/group__PJMEDIA__FORMAT.htm here] for details. === New video components in PJMEDIA === - '''New''': [http://www.pjsip.org/docs/latest-2/pjmedia/docs/html/group__PJMEDIA__FILE__PLAY.htm AVI file player], [http://www.pjsip.org/docs/latest-2/pjmedia/docs/html/group__PJMEDIA__VID__CODEC.htm Video codec], [http://www.pjsip.org/docs/latest-2/pjmedia/docs/html/group__video__device__api.htm Video device], [http://www.pjsip.org/docs/latest-2/pjmedia/docs/html/group__PJMED__VID__STRM.htm Video stream], [http://www.pjsip.org/docs/latest-2/pjmedia/docs/html/group__PJMEDIA__VID__TEE.htm Video tee/source duplicator]. See also [http://www.pjsip.org/docs/latest-2/pjmedia/docs/html/index.htm PJMEDIA documentation]. === Missing samples_per_frame === - '''Removed''': {{{samples_per_frame}}}, which was used in many PJMEDIA components and functions. Generally, application can now use {{{PJMEDIA_AFD_SAMPLES_PER_FRAME(audio-format-detail)}}} to get the same result. === Port info === - '''Changed''': All fields in the port info that desribe the media format have been removed and replaced by {{{pjmedia_format}}}. Check the port info documentation [http://www.pjsip.org/docs/latest-2/pjmedia/docs/html/structpjmedia__port__info.htm here] for details. === put_frame() callback of pjmedia_port === - '''Changed''': Removed const qualifier from the frame argument, this is to accomodate ''in-place'' media processing by PJMEDIA port. - Sample warnings in building application after upgrading from 1.x to 2.0: {{{ ../src/pjmedia/bidirectional.c: In function ‘put_frame’: ../src/pjmedia/bidirectional.c:39: warning: passing argument 2 of ‘pjmedia_port_put_frame’ discards qualifiers from pointer target type ../include/pjmedia/port.h:334: note: expected ‘struct pjmedia_frame *’ but argument is of type ‘const struct pjmedia_frame *’ ../src/pjmedia/bidirectional.c:70: warning: assignment from incompatible pointer type }}} === Missing pjmedia_session === - '''Removed''': {{{pjmedia_session}}}. Now media streams must be managed directly by application. === Configure script === New options: {{{ .. --disable-video Disable video feature --disable-sdl Disable SDL (default: not disabled) --disable-ffmpeg Disable ffmpeg (default: not disabled) --disable-v4l2 Disable Video4Linux2 (default: not disabled) --with-sdl=DIR Specify alternate libSDL prefix --with-ffmpeg=DIR Specify alternate FFMPEG prefix --with-ipp=DIR Specify the Intel IPP location .. }}} == Misc == === Visual Studio 6 === Support for Visual Studio 6 has been removed. {{{ #!html
}}}