Changes between Version 52 and Version 53 of Video_Users_Guide


Ignore:
Timestamp:
May 17, 2012 10:15:04 AM (8 years ago)
Author:
ismangil
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Video_Users_Guide

    v52 v53  
    1616== Building with Video Support == 
    1717 
    18 === Common Requirements for Desktop Platforms === #reqdesk 
    19  
    20 The following components are needed for video: 
    21  1. [http://www.libsdl.org/ SDL] '''version 1.3'''.  
    22     - 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. 
    23  1. [http://ffmpeg.org/ ffmpeg] development library. We tested with ffmpeg version ranging from 0.5.1 (from circa 2009) to 0.10.  
    24     - Note that for H.264 support, you need newer releases (October 2011 onwards), and it needs libz too. 
    25     - Build with at least: 
    26       {{{ 
    27 $ ./configure --enable-shared --disable-static --enable-memalign-hack 
    28                       # add other options if needed, e.g: optimization, install dir, search path  
    29                       # particularly CFLAGS and LDFLAGS for x264 
    30                       # to enable H264, add "--enable-gpl --enable-libx264" 
    31 $ make && make install 
    32       }}} 
    33  1. Optional for H.264: [http://www.videolan.org/developers/x264.html libx264]. We tested with the latest from git (as of October 2011): 
    34      {{{ 
    35 $ ./configure --enable-static      # add options if needed, e.g: optimization, install dir, search path 
    36 $ make && make install-lib-static  # default install dir is /usr/local 
    37       }}} 
    38  1. Optional: [http://qt.nokia.com/downloads/ Qt development SDK] for building the [#vidgui video GUI sample]. We tested with version 4.6 or later. 
    39     - without this you can still enjoy video with pjsua console application 
    40  
    41  
    42 === Mac OS X, Linux, *nix (GNU Makefile) === 
    43  
    44 ==== 1. Requirements ==== 
    45  
    46 The following components are needed: 
    47  1. The components in [#reqdesk common requirements] above. 
    48  1. Mac OS X specific: You might have an old libbz2 for older system, in that case it has to be rebuild (needed by ffmpeg H.264 support) 
    49  1. '''Linux specific:''' Video4Linux2 (v4l2) development library is required. 
    50  
    51  
    52 ==== 2. Running aconfigure ==== 
    53  
    54 Video requirements will be detected by the {{{configure}}} script. Pay attention to the following output (the sample below was taken on a Mac): 
    55  
    56 {{{ 
    57 ... 
    58 Using SDL prefix... /Users/pjsip/Desktop/opt 
    59 checking SDL availability..... 1.3.0 
    60 Using ffmpeg prefix... /Users/pjsip/Desktop/opt 
    61 checking for pkg-config... no 
    62 checking for python... python pkgconfig.py 
    63 checking ffmpeg packages...  libavformat libavcodec libswscale libavutil 
    64 checking for v4l2_open in -lv4l2... no 
    65 ... 
    66 }}} 
    67  
    68 The above output shows the SDL version detected, 1.3.0 in this case, and the ffmpeg packages found (libavformat, libavcodec, etc.). Note that for this particular build, alternative locations (prefixes) are specified for both SDL and ffmpeg with '''{{{--with-sdl}}}''' and '''{{{-with-ffmpeg}}}''' options respectively.  
    69  
    70 '''Note on ffmpeg libraries dependencies:''' 
    71  
    72   The ''pkg-config'' tool is used to detect the correct compilation settings and library dependency for the ffmpeg packages. The ''pkg-config'' is not installed by default on Mac, as the output above shows, hence we use the alternate ''pkgconfig.py'' script. You need to have Python installed to run this script of course, and the configure script detects its availability automatically. If Python is not available, you will need to supply the correct CFLAGS and LDFLAGS manually prior to running ''{{{configure}}}'' so that it is able to detect ffmpeg libraries. 
    73  
    74   For example, if ffmpeg was built with x264 and mp3 encoder support, you will need to pass additional "{{{-lx264 -lmp3lame}}}" flags when linking libavformat. With manual checking in the configure script, the {{{AC_CHECK_LIB(avformat)}}} would not be able to detect that it needs to add "{{{-lx264 -lmp3lame}}}" as the dependency, hence you need to put this in the LDFLAGS prior to running configure. 
    75  
    76  
    77 ==== 3. Configuring video support ==== 
    78  
    79 Add this to your {{{config_site.h}}}: 
    80  
    81 {{{ 
    82 #define PJMEDIA_HAS_VIDEO       1 
    83 }}} 
    84  
    85  
    86 ==== 4. Build the library ==== 
    87  
    88 As usual with: 
    89 {{{ 
    90 make dep && make clean && make 
    91 }}} 
    92  
    93 Once the build is successful, you will have '''pjsua''' executable containing video support. Additionally, you may want to build the [#vidgui GUI sample application] too. 
    94  
    95 [[BR]] 
    96  
    97 === Windows Desktop (Visual Studio) === 
    98  
    99 See [wiki:Getting-Started/Windows Getting Started for Windows] on building pjsip with video support. 
     18Follow [wiki:Getting-Started Getting Started] for your platform on building pjsip with video support. 
    10019 
    10120[[BR]]