wiki:Video_Users_Guide

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

--

PJSIP Video User's Guide

Table of Contents

  1. Requirements
  2. Building with Video Support
    1. GNU Build System
    2. Visual Studio
    3. GUI Sample Application

Video is available on PJSIP version 2.0 and later. This document describes how to use the video feature with PJSIP.


Requirements

All platforms:

  1. SDL version 1.3.
    • Note that this is the newer and not yet released SDL library, hence most likely it won't be installed by default on your system. You can download the source snapshot or from the Mercurial repository from http://www.libsdl.org/hg.php.
  2. ffmpeg development library.
  3. Optional: Qt development SDK for building the video GUI sample.

Linux:

  1. Video4Linux2 (v4l2) development library

Windows:

  1. ?

Mac OS X:

-

Mobile platforms (iPhone, Symbian, Windows Mobile, etc):

  • Video is not supported on this release yet!

Building with Video Support

GNU Build System

1. Running aconfigure

Video requirements will be detected by the configure script. Pay attention to the following output (the sample below was taken on a Mac):

checking SDL availability..... 1.3
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... yes
checking for v4l2_open in -lv4l2... no

Once again, we need SDL version 1.3 for the video to work.

2. Configuring video support

Add this in your config_site.h:

#define PJMEDIA_HAS_VIDEO	1

3. Build the library

As usual with:

make dep && make clean && make

Once the build is successful, you will have pjsua executable containing video support. Additionally, you may want to build the GUI sample application too.

Visual Studio

Visual Studio users will need to configure things manually as explained below.

1. Configure directories

Add include and library paths for the required components:

  1. SDL
  2. ffmpeg
  3. !DirectX (?)
  4. Base classes (?)

2. Configure Video Settings

Add these to your config_site.h:

#define PJMEDIA_HAS_VIDEO	    1
#define PJMEDIA_HAS_FFMPEG	    1
#define PJMEDIA_VIDEO_DEV_HAS_SDL   1

3. Rebuild the Solution

Once the build is successful, you will have pjsua executable containing video support. Additionally, you may want to build the GUI sample application too.

GUI Sample Application

We have a GUI sample application with video support. The project is located under pjsip-apps/src/vidgui. It is not built by default, and you need Qt SDK to build it.

GNU Build System (Mac OS X, Linux, etc)

Follow these steps to build vidgui sample:

$ cd pjsip-apps/src/vidgui
$ make

Visual Studio

Follow these steps to build vidgui sample with Visual Studio:

  1. Open command prompt, and
    cd pjsip-apps\src\vidgui
    
  2. Generate project files:
    qmake -tp vc
    
  3. Open vidgui.vcproj project.
  4. Save the solution, and build the project