Version 2 (modified by bennylp, 13 years ago) (diff) |
---|
PJSIP Video User's Guide
Table of Contents
Video is available on PJSIP version 2.0 and later. This document describes how to use the video feature with PJSIP.
Requirements
All platforms:
- 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.
- ffmpeg development library.
- Optional: Qt development SDK for building the video GUI sample.
Linux:
- Video4Linux2 (v4l2) development library
Windows:
- ?
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:
- SDL
- ffmpeg
- !DirectX (?)
- 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:
- Open command prompt, and
cd pjsip-apps\src\vidgui
- Generate project files:
qmake -tp vc
- Open vidgui.vcproj project.
- Save the solution, and build the project