wiki:ReleaseNotes-2.0

Version 10 (modified by bennylp, 13 years ago) (diff)

--

PJSIP Version 2.0 Release Notes

Table of Contents

  1. New Features
    1. Video
    2. On Demand Media Transport
    3. Other Components
  2. Changes
    1. PJSUA API (pjsua.h)
    2. Configure script
    3. Header Files
    4. General Data Structure
  3. Misc
    1. iPhone

This document explains the new features, changes, and porting guide in/for PJSIP version 2.0. The development currently takes place on https://svn.pjsip.org/repos/pjproject/branches/projects/2.0-dev branch. Development plans and reports are on release-2.0-dev milestone.


New Features

Video

Assorted features:

  1. Supported video devices:
    • renderer:
      • Simple Direct Media Layer (SDL) (Win32, Mac OS X, Linux, etc.)
      • iOS UIView
    • capture:
      • QuickTime (MacOS X)
      • Video4Linux4 (Linux)
      • DirectShow (Win32)
      • iOS AVFoundation (iOS 4 or later)
      • ffmpeg capture (unfinished)
      • Color bar (all platforms)
  2. Supported codecs:
    • H.263 (with ffmpeg)
  3. video device port to provide timing for video devices (analogous to sound device port)
  4. media format conversion framework (converter.h) supporting multiple backend APIs:
    • ffmpeg's libswscale backend API implementation
  5. video codec framework (vid_codec.h) supporting multiple backend APIs:
    • ffmpeg's libavcodec backend API implementation
  6. 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.

Other Components

New components:

  1. Event framework
  2. pj_run_app()


Changes

PJSUA API (pjsua.h)

Design change:

  • support for multiple medias. pjsua_call struct refactored.

Removed API:

  • PJ_DECL(pjmedia_session*) pjsua_call_get_media_session(pjsua_call_id call_id);
  • PJ_DECL(pjmedia_transport*) pjsua_call_get_media_transport(pjsua_call_id cid);

API change:

  • "session" parameter in on_stream_created() and on_stream_destroyed() callbacks has been replaced by "stream"

Configure script

New options:

..
  --disable-sdl           Disable SDL (default: not disabled)
  --disable-ffmpeg        Disable ffmpeg (default: not disabled)
  --disable-v4l2          Disable Video4Linux2 (default: not disabled)
..

New output:

..
checking SDL availability..... 1.2.14
checking for avdevice_version in -lavdevice... yes
checking for av_register_all in -lavformat... yes
checking for avcodec_init in -lavcodec... yes
checking for sws_scale in -lswscale... yes
checking for av_malloc in -lavutil... yes
checking for avcore_version in -lavcore... no
checking for v4l2_open in -lv4l2... yes
..

Header Files

<pjmedia/types.h> is split into <pjmedia/format.h>, <pjmedia/frame.h>, and <pjmedia/types.h>

Symptom: You may encounter compilation warnings/errors such as:

../include/pjmedia/circbuf.h:293: warning: implicit declaration of function ‘pjmedia_copy_samples’
../include/pjmedia/circbuf.h:409: warning: implicit declaration of function ‘pjmedia_move_samples’
../src/pjmedia/delaybuf.c:349: warning: implicit declaration of function ‘pjmedia_zero_samples’

Solution: Update your #include section accordingly, adding the new headers above. Alternatively, just include <pjmedia.h> to get all the header files.

General Data Structure

format

Huge changes..

Missing samples_per_frame

Use PJMEDIA_AFD_SAMPLES_PER_FRAME(afd)

Port info

Uses format now..

put_frame() callback of pjmedia_port

Removed const qualifier from the frame argument.

Sample warnings:

../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

pjsua_call_info

Array of media info..

Misc

iPhone

SDL

SDL has an iPhone support starting from 1.3. However, since SDL 1.3 features a different set of APIs compared to 1.2 and 1.3 is still under development, it is not yet supported at the moment. You can disable SDL using ./configure-iphone --disable-sdl.

ffmpeg

Instructions on how to build ffmpeg for iPhone is available here.