Changeset 4815


Ignore:
Timestamp:
Apr 10, 2014 10:01:07 AM (11 years ago)
Author:
bennylp
Message:

Re #1758: Initial implementation of OpenH264 wrapper. Supports:

  • library detection via autoconf
  • CBP
  • packetization modes: 0, 1
  • key frame request and indication
  • obey remote's fmtp

Also added video codec test in samples (similar to the one in pjmedia test though).
And there are some fixes here and there too (e.g. in vid_codec_util.c).

Location:
pjproject/trunk
Files:
3 added
13 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure

    r4800 r4815  
    11#! /bin/sh 
    22# Guess values for system-dependent variables and create Makefiles. 
    3 # Generated by GNU Autoconf 2.69 for pjproject 2.x. 
     3# Generated by GNU Autoconf 2.68 for pjproject 2.x. 
    44# 
    55# 
    6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. 
     6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 
     7# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software 
     8# Foundation, Inc. 
    79# 
    810# 
     
    133135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 
    134136 
    135 # Use a proper internal environment variable to ensure we don't fall 
    136   # into an infinite loop, continuously re-executing ourselves. 
    137   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then 
    138     _as_can_reexec=no; export _as_can_reexec; 
    139     # We cannot yet assume a decent shell, so we have to provide a 
    140 # neutralization value for shells without unset; and this also 
    141 # works around shells that cannot unset nonexistent variables. 
    142 # Preserve -v and -x to the replacement shell. 
    143 BASH_ENV=/dev/null 
    144 ENV=/dev/null 
    145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 
    146 case $- in # (((( 
    147   *v*x* | *x*v* ) as_opts=-vx ;; 
    148   *v* ) as_opts=-v ;; 
    149   *x* ) as_opts=-x ;; 
    150   * ) as_opts= ;; 
    151 esac 
    152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} 
    153 # Admittedly, this is quite paranoid, since all the known shells bail 
    154 # out after a failed `exec'. 
    155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 
    156 as_fn_exit 255 
    157   fi 
    158   # We don't want this to propagate to other subprocesses. 
    159           { _as_can_reexec=; unset _as_can_reexec;} 
    160137if test "x$CONFIG_SHELL" = x; then 
    161138  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : 
     
    191168  exitcode=1; echo positional parameters were not saved. 
    192169fi 
    193 test x\$exitcode = x0 || exit 1 
    194 test -x / || exit 1" 
     170test x\$exitcode = x0 || exit 1" 
    195171  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO 
    196172  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO 
     
    237213 
    238214      if test "x$CONFIG_SHELL" != x; then : 
    239   export CONFIG_SHELL 
    240              # We cannot yet assume a decent shell, so we have to provide a 
    241 # neutralization value for shells without unset; and this also 
    242 # works around shells that cannot unset nonexistent variables. 
    243 # Preserve -v and -x to the replacement shell. 
    244 BASH_ENV=/dev/null 
    245 ENV=/dev/null 
    246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 
    247 case $- in # (((( 
    248   *v*x* | *x*v* ) as_opts=-vx ;; 
    249   *v* ) as_opts=-v ;; 
    250   *x* ) as_opts=-x ;; 
    251   * ) as_opts= ;; 
    252 esac 
    253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} 
    254 # Admittedly, this is quite paranoid, since all the known shells bail 
    255 # out after a failed `exec'. 
    256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 
    257 exit 255 
     215  # We cannot yet assume a decent shell, so we have to provide a 
     216        # neutralization value for shells without unset; and this also 
     217        # works around shells that cannot unset nonexistent variables. 
     218        # Preserve -v and -x to the replacement shell. 
     219        BASH_ENV=/dev/null 
     220        ENV=/dev/null 
     221        (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 
     222        export CONFIG_SHELL 
     223        case $- in # (((( 
     224          *v*x* | *x*v* ) as_opts=-vx ;; 
     225          *v* ) as_opts=-v ;; 
     226          *x* ) as_opts=-x ;; 
     227          * ) as_opts= ;; 
     228        esac 
     229        exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} 
    258230fi 
    259231 
     
    357329 
    358330} # as_fn_mkdir_p 
    359  
    360 # as_fn_executable_p FILE 
    361 # ----------------------- 
    362 # Test if FILE is an executable regular file. 
    363 as_fn_executable_p () 
    364 { 
    365   test -f "$1" && test -x "$1" 
    366 } # as_fn_executable_p 
    367331# as_fn_append VAR VALUE 
    368332# ---------------------- 
     
    486450    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } 
    487451 
    488   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have 
    489   # already done that, so ensure we don't try to do so again and fall 
    490   # in an infinite loop.  This has already happened in practice. 
    491   _as_can_reexec=no; export _as_can_reexec 
    492452  # Don't try to exec as it changes $[0], causing all sort of problems 
    493453  # (the dirname of $[0] is not the place where we might find the 
     
    524484    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 
    525485    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 
    526     # In both cases, we have to default to `cp -pR'. 
     486    # In both cases, we have to default to `cp -p'. 
    527487    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 
    528       as_ln_s='cp -pR' 
     488      as_ln_s='cp -p' 
    529489  elif ln conf$$.file conf$$ 2>/dev/null; then 
    530490    as_ln_s=ln 
    531491  else 
    532     as_ln_s='cp -pR' 
     492    as_ln_s='cp -p' 
    533493  fi 
    534494else 
    535   as_ln_s='cp -pR' 
     495  as_ln_s='cp -p' 
    536496fi 
    537497rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 
     
    545505fi 
    546506 
    547 as_test_x='test -x' 
    548 as_executable_p=as_fn_executable_p 
     507if test -x / >/dev/null 2>&1; then 
     508  as_test_x='test -x' 
     509else 
     510  if ls -dL / >/dev/null 2>&1; then 
     511    as_ls_L_option=L 
     512  else 
     513    as_ls_L_option= 
     514  fi 
     515  as_test_x=' 
     516    eval sh -c '\'' 
     517      if test -d "$1"; then 
     518        test -d "$1/."; 
     519      else 
     520        case $1 in #( 
     521        -*)set "./$1";; 
     522        esac; 
     523        case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( 
     524        ???[sx]*):;;*)false;;esac;fi 
     525    '\'' sh 
     526  ' 
     527fi 
     528as_executable_p=$as_test_x 
    549529 
    550530# Sed expression to map a string onto a valid CPP name. 
     
    639619openssl_h_present 
    640620ac_no_ssl 
     621ac_openh264_ldflags 
     622ac_openh264_cflags 
    641623ac_v4l2_ldflags 
    642624ac_v4l2_cflags 
     
    791773enable_ffmpeg 
    792774enable_v4l2 
     775with_openh264 
     776enable_openh264 
    793777enable_ipp 
    794778with_ipp 
     
    12711255  if test "x$build_alias" = x; then 
    12721256    cross_compiling=maybe 
     1257    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. 
     1258    If a cross compiler is detected then cross compile mode will be used" >&2 
    12731259  elif test "x$build_alias" != "x$host_alias"; then 
    12741260    cross_compiling=yes 
     
    14541440  --disable-ffmpeg        Disable ffmpeg (default: not disabled) 
    14551441  --disable-v4l2          Disable Video4Linux2 (default: not disabled) 
     1442  --disable-openh264      Disable OpenH264 (default: not disabled) 
    14561443  --enable-ipp            Enable Intel IPP support. Specify the Intel IPP 
    14571444                          package and samples location using IPPROOT and 
     
    14921479  --with-sdl=DIR          Specify alternate libSDL prefix 
    14931480  --with-ffmpeg=DIR       Specify alternate FFMPEG prefix 
     1481  --with-openh264=DIR     Specify alternate OpenH264 prefix 
    14941482  --with-ipp=DIR          Specify the Intel IPP location 
    14951483  --with-ipp-samples=DIR  Specify the Intel IPP samples location 
     
    15841572  cat <<\_ACEOF 
    15851573pjproject configure 2.x 
    1586 generated by GNU Autoconf 2.69 
    1587  
    1588 Copyright (C) 2012 Free Software Foundation, Inc. 
     1574generated by GNU Autoconf 2.68 
     1575 
     1576Copyright (C) 2010 Free Software Foundation, Inc. 
    15891577This configure script is free software; the Free Software Foundation 
    15901578gives unlimited permission to copy, distribute and modify it. 
     
    17001688       } && test -s conftest$ac_exeext && { 
    17011689         test "$cross_compiling" = yes || 
    1702          test -x conftest$ac_exeext 
     1690         $as_test_x conftest$ac_exeext 
    17031691       }; then : 
    17041692  ac_retval=0 
     
    19871975 
    19881976It was created by pjproject $as_me 2.x, which was 
    1989 generated by GNU Autoconf 2.69.  Invocation command line was 
     1977generated by GNU Autoconf 2.68.  Invocation command line was 
    19901978 
    19911979  $ $0 $@ 
     
    25122500  test -z "$as_dir" && as_dir=. 
    25132501    for ac_exec_ext in '' $ac_executable_extensions; do 
    2514   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
     2502  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 
    25152503    ac_cv_prog_CC="${ac_tool_prefix}gcc" 
    25162504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 
     
    25522540  test -z "$as_dir" && as_dir=. 
    25532541    for ac_exec_ext in '' $ac_executable_extensions; do 
    2554   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
     2542  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 
    25552543    ac_cv_prog_ac_ct_CC="gcc" 
    25562544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 
     
    26052593  test -z "$as_dir" && as_dir=. 
    26062594    for ac_exec_ext in '' $ac_executable_extensions; do 
    2607   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
     2595  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 
    26082596    ac_cv_prog_CC="${ac_tool_prefix}cc" 
    26092597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 
     
    26462634  test -z "$as_dir" && as_dir=. 
    26472635    for ac_exec_ext in '' $ac_executable_extensions; do 
    2648   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
     2636  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 
    26492637    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then 
    26502638       ac_prog_rejected=yes 
     
    27042692  test -z "$as_dir" && as_dir=. 
    27052693    for ac_exec_ext in '' $ac_executable_extensions; do 
    2706   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
     2694  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 
    27072695    ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 
    27082696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 
     
    27482736  test -z "$as_dir" && as_dir=. 
    27492737    for ac_exec_ext in '' $ac_executable_extensions; do 
    2750   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
     2738  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 
    27512739    ac_cv_prog_ac_ct_CC="$ac_prog" 
    27522740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 
     
    31943182#include <stdarg.h> 
    31953183#include <stdio.h> 
    3196 struct stat; 
     3184#include <sys/types.h> 
     3185#include <sys/stat.h> 
    31973186/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */ 
    31983187struct buf { int x; }; 
     
    33073296  test -z "$as_dir" && as_dir=. 
    33083297    for ac_exec_ext in '' $ac_executable_extensions; do 
    3309   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
     3298  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 
    33103299    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" 
    33113300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 
     
    33513340  test -z "$as_dir" && as_dir=. 
    33523341    for ac_exec_ext in '' $ac_executable_extensions; do 
    3353   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
     3342  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 
    33543343    ac_cv_prog_ac_ct_CXX="$ac_prog" 
    33553344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 
     
    35603549  test -z "$as_dir" && as_dir=. 
    35613550    for ac_exec_ext in '' $ac_executable_extensions; do 
    3562   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
     3551  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 
    35633552    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" 
    35643553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 
     
    36003589  test -z "$as_dir" && as_dir=. 
    36013590    for ac_exec_ext in '' $ac_executable_extensions; do 
    3602   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
     3591  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 
    36033592    ac_cv_prog_ac_ct_RANLIB="ranlib" 
    36043593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 
     
    36543643  test -z "$as_dir" && as_dir=. 
    36553644    for ac_exec_ext in '' $ac_executable_extensions; do 
    3656   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
     3645  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 
    36573646    ac_cv_prog_AR="$ac_tool_prefix$ac_prog" 
    36583647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 
     
    36983687  test -z "$as_dir" && as_dir=. 
    36993688    for ac_exec_ext in '' $ac_executable_extensions; do 
    3700   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
     3689  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 
    37013690    ac_cv_prog_ac_ct_AR="$ac_prog" 
    37023691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 
     
    44804469    for ac_exec_ext in '' $ac_executable_extensions; do 
    44814470      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" 
    4482       as_fn_executable_p "$ac_path_GREP" || continue 
     4471      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue 
    44834472# Check for GNU ac_path_GREP and select it if it is found. 
    44844473  # Check for GNU $ac_path_GREP 
     
    45464535    for ac_exec_ext in '' $ac_executable_extensions; do 
    45474536      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" 
    4548       as_fn_executable_p "$ac_path_EGREP" || continue 
     4537      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue 
    45494538# Check for GNU ac_path_EGREP and select it if it is found. 
    45504539  # Check for GNU $ac_path_EGREP 
     
    65136502  test -z "$as_dir" && as_dir=. 
    65146503    for ac_exec_ext in '' $ac_executable_extensions; do 
    6515   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
     6504  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 
    65166505    ac_cv_path_SDL_CONFIG="$as_dir/$ac_word$ac_exec_ext" 
    65176506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 
     
    65596548  test -z "$as_dir" && as_dir=. 
    65606549    for ac_exec_ext in '' $ac_executable_extensions; do 
    6561   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
     6550  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 
    65626551    ac_cv_path_SDL_CONFIG="$as_dir/$ac_word$ac_exec_ext" 
    65636552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 
     
    66646653  test -z "$as_dir" && as_dir=. 
    66656654    for ac_exec_ext in '' $ac_executable_extensions; do 
    6666   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
     6655  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 
    66676656    ac_cv_prog_PKG_CONFIG="$ac_prog" 
    66686657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 
     
    70657054 
    70667055fi 
     7056 
     7057 
     7058 
     7059# Check whether --with-openh264 was given. 
     7060if test "${with_openh264+set}" = set; then : 
     7061  withval=$with_openh264; 
     7062else 
     7063  with_openh264=no 
     7064 
     7065fi 
     7066 
     7067 
     7068if test "x$ac_cross_compile" != "x" -a "x$with_openh264" = "xno"; then 
     7069    enable_openh264=no 
     7070fi 
     7071 
     7072 
     7073 
     7074# Check whether --enable-openh264 was given. 
     7075if test "${enable_openh264+set}" = set; then : 
     7076  enableval=$enable_openh264; 
     7077                if test "$enable_openh264" = "no"; then 
     7078                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if OpenH264 is disabled... yes" >&5 
     7079$as_echo "Checking if OpenH264 is disabled... yes" >&6; } 
     7080                fi 
     7081 
     7082else 
     7083 
     7084                  if test "x$with_openh264" != "xno" -a "x$with_openh264" != "x"; then 
     7085                        OPENH264_PREFIX=$with_openh264 
     7086                        OPENH264_CFLAGS="-I$OPENH264_PREFIX/include" 
     7087                        OPENH264_LDFLAGS="-L$OPENH264_PREFIX/lib" 
     7088                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using OpenH264 prefix... $with_openh264" >&5 
     7089$as_echo "Using OpenH264 prefix... $with_openh264" >&6; } 
     7090                  else 
     7091                        OPENH264_CFLAGS="" 
     7092                        OPENH264_LDFLAGS="" 
     7093                  fi 
     7094 
     7095                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenH264 availability" >&5 
     7096$as_echo_n "checking OpenH264 availability... " >&6; } 
     7097 
     7098                  OPENH264_LIBS="-lwels" 
     7099 
     7100                  SAVED_LIBS="$LIBS" 
     7101                  SAVED_LDFLAGS="$LDFLAGS" 
     7102                  SAVED_CFLAGS="$CFLAGS" 
     7103 
     7104                  LIBS="$OPENH264_LIBS $LIBS" 
     7105                  LDFLAGS="$OPENH264_LDFLAGS $LDFLAGS" 
     7106                  CFLAGS="$OPENH264_CFLAGS $CFLAGS" 
     7107 
     7108                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
     7109/* end confdefs.h.  */ 
     7110#include <wels/codec_api.h> 
     7111                                                    #include <wels/codec_app_def.h> 
     7112 
     7113int 
     7114main () 
     7115{ 
     7116int main() { CreateSVCEncoder(0); return 0; } 
     7117 
     7118  ; 
     7119  return 0; 
     7120} 
     7121_ACEOF 
     7122if ac_fn_c_try_link "$LINENO"; then : 
     7123   ac_openh264_cflags="-DPJMEDIA_HAS_OPENH264_CODEC=1 $OPENH264_CFLAGS" 
     7124                                   ac_openh264_ldflags="$OPENH264_LDFLAGS $OPENH264_LIBS" 
     7125                                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 
     7126$as_echo "ok" >&6; } 
     7127 
     7128else 
     7129 
     7130                                   LIBS="$SAVED_LIBS" 
     7131                                   LDFLAGS="$SAVED_LDFLAGS" 
     7132                                   CFLAGS="$SAVED_CFLAGS" 
     7133                                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 
     7134$as_echo "failed" >&6; } 
     7135 
     7136fi 
     7137rm -f core conftest.err conftest.$ac_objext \ 
     7138    conftest$ac_exeext conftest.$ac_ext 
     7139 
     7140 
     7141fi 
     7142 
     7143 
    70677144 
    70687145 
     
    83468423    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 
    83478424    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 
    8348     # In both cases, we have to default to `cp -pR'. 
     8425    # In both cases, we have to default to `cp -p'. 
    83498426    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 
    8350       as_ln_s='cp -pR' 
     8427      as_ln_s='cp -p' 
    83518428  elif ln conf$$.file conf$$ 2>/dev/null; then 
    83528429    as_ln_s=ln 
    83538430  else 
    8354     as_ln_s='cp -pR' 
     8431    as_ln_s='cp -p' 
    83558432  fi 
    83568433else 
    8357   as_ln_s='cp -pR' 
     8434  as_ln_s='cp -p' 
    83588435fi 
    83598436rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 
     
    84158492fi 
    84168493 
    8417  
    8418 # as_fn_executable_p FILE 
    8419 # ----------------------- 
    8420 # Test if FILE is an executable regular file. 
    8421 as_fn_executable_p () 
    8422 { 
    8423   test -f "$1" && test -x "$1" 
    8424 } # as_fn_executable_p 
    8425 as_test_x='test -x' 
    8426 as_executable_p=as_fn_executable_p 
     8494if test -x / >/dev/null 2>&1; then 
     8495  as_test_x='test -x' 
     8496else 
     8497  if ls -dL / >/dev/null 2>&1; then 
     8498    as_ls_L_option=L 
     8499  else 
     8500    as_ls_L_option= 
     8501  fi 
     8502  as_test_x=' 
     8503    eval sh -c '\'' 
     8504      if test -d "$1"; then 
     8505        test -d "$1/."; 
     8506      else 
     8507        case $1 in #( 
     8508        -*)set "./$1";; 
     8509        esac; 
     8510        case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( 
     8511        ???[sx]*):;;*)false;;esac;fi 
     8512    '\'' sh 
     8513  ' 
     8514fi 
     8515as_executable_p=$as_test_x 
    84278516 
    84288517# Sed expression to map a string onto a valid CPP name. 
     
    84468535ac_log=" 
    84478536This file was extended by pjproject $as_me 2.x, which was 
    8448 generated by GNU Autoconf 2.69.  Invocation command line was 
     8537generated by GNU Autoconf 2.68.  Invocation command line was 
    84498538 
    84508539  CONFIG_FILES    = $CONFIG_FILES 
     
    85088597ac_cs_version="\\ 
    85098598pjproject config.status 2.x 
    8510 configured by $0, generated by GNU Autoconf 2.69, 
     8599configured by $0, generated by GNU Autoconf 2.68, 
    85118600  with options \\"\$ac_cs_config\\" 
    85128601 
    8513 Copyright (C) 2012 Free Software Foundation, Inc. 
     8602Copyright (C) 2010 Free Software Foundation, Inc. 
    85148603This config.status script is free software; the Free Software Foundation 
    85158604gives unlimited permission to copy, distribute and modify it." 
     
    85998688cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 
    86008689if \$ac_cs_recheck; then 
    8601   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 
     8690  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 
    86028691  shift 
    86038692  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 
  • pjproject/trunk/aconfigure.ac

    r4800 r4815  
    10961096              ]) 
    10971097 
     1098dnl # OpenH264 alt prefix 
     1099AC_ARG_WITH(openh264, 
     1100            AC_HELP_STRING([--with-openh264=DIR], 
     1101                           [Specify alternate OpenH264 prefix]), 
     1102            [], 
     1103            [with_openh264=no] 
     1104            ) 
     1105 
     1106dnl # Do not use default OpenH264 installation if we are cross-compiling 
     1107if test "x$ac_cross_compile" != "x" -a "x$with_openh264" = "xno"; then 
     1108    enable_openh264=no 
     1109fi 
     1110 
     1111dnl # OpenH264 
     1112AC_SUBST(ac_openh264_cflags) 
     1113AC_SUBST(ac_openh264_ldflags) 
     1114AC_ARG_ENABLE(openh264, 
     1115              AC_HELP_STRING([--disable-openh264], 
     1116                             [Disable OpenH264 (default: not disabled)]), 
     1117              [ 
     1118                if test "$enable_openh264" = "no"; then 
     1119                  AC_MSG_RESULT([Checking if OpenH264 is disabled... yes]) 
     1120                fi 
     1121              ], 
     1122              [ 
     1123                  if test "x$with_openh264" != "xno" -a "x$with_openh264" != "x"; then 
     1124                        OPENH264_PREFIX=$with_openh264 
     1125                        OPENH264_CFLAGS="-I$OPENH264_PREFIX/include" 
     1126                        OPENH264_LDFLAGS="-L$OPENH264_PREFIX/lib"  
     1127                        AC_MSG_RESULT([Using OpenH264 prefix... $with_openh264]) 
     1128                  else 
     1129                        OPENH264_CFLAGS="" 
     1130                        OPENH264_LDFLAGS=""  
     1131                  fi 
     1132 
     1133                  AC_MSG_CHECKING([OpenH264 availability]) 
     1134 
     1135                  OPENH264_LIBS="-lwels" 
     1136                   
     1137                  SAVED_LIBS="$LIBS" 
     1138                  SAVED_LDFLAGS="$LDFLAGS" 
     1139                  SAVED_CFLAGS="$CFLAGS" 
     1140                   
     1141                  LIBS="$OPENH264_LIBS $LIBS" 
     1142                  LDFLAGS="$OPENH264_LDFLAGS $LDFLAGS" 
     1143                  CFLAGS="$OPENH264_CFLAGS $CFLAGS" 
     1144                   
     1145                  AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <wels/codec_api.h> 
     1146                                                    #include <wels/codec_app_def.h> 
     1147                                                  ]], 
     1148                                                  [int main() { CreateSVCEncoder(0); return 0; }] 
     1149                                                 )], 
     1150                                 [ ac_openh264_cflags="-DPJMEDIA_HAS_OPENH264_CODEC=1 $OPENH264_CFLAGS" 
     1151                                   ac_openh264_ldflags="$OPENH264_LDFLAGS $OPENH264_LIBS" 
     1152                                   AC_MSG_RESULT(ok) 
     1153                                  ], 
     1154                                 [ 
     1155                                   LIBS="$SAVED_LIBS" 
     1156                                   LDFLAGS="$SAVED_LDFLAGS" 
     1157                                   CFLAGS="$SAVED_CFLAGS" 
     1158                                   AC_MSG_RESULT(failed) 
     1159                                 ]) 
     1160 
     1161              ]) 
     1162 
     1163 
     1164 
    10981165dnl ######################################################## 
    10991166dnl # Intel IPP support 
  • pjproject/trunk/build.mak.in

    r4755 r4815  
    134134SDL_LDFLAGS = @ac_sdl_ldflags@ 
    135135 
    136 # FFMPEG dlags 
     136# FFMPEG flags 
    137137FFMPEG_CFLAGS = @ac_ffmpeg_cflags@  
    138138FFMPEG_LDFLAGS =  @ac_ffmpeg_ldflags@ 
     
    142142V4L2_LDFLAGS = @ac_v4l2_ldflags@ 
    143143 
     144# OPENH264 flags 
     145OPENH264_CFLAGS = @ac_openh264_cflags@  
     146OPENH264_LDFLAGS =  @ac_openh264_ldflags@ 
     147 
    144148# QT 
    145149AC_PJMEDIA_VIDEO_HAS_QT = @ac_pjmedia_video_has_qt@ 
     
    151155# PJMEDIA features exclusion 
    152156PJ_VIDEO_CFLAGS += $(SDL_CFLAGS) $(FFMPEG_CFLAGS) $(V4L2_CFLAGS) $(QT_CFLAGS) \ 
    153                    $(IOS_CFLAGS) 
    154 PJ_VIDEO_LDFLAGS += $(SDL_LDFLAGS) $(FFMPEG_LDFLAGS) $(V4L2_LDFLAGS) 
     157                   $(OPENH264_CFLAGS) $(IOS_CFLAGS) 
     158PJ_VIDEO_LDFLAGS += $(SDL_LDFLAGS) $(FFMPEG_LDFLAGS) $(V4L2_LDFLAGS) \ 
     159                   $(OPENH264_LDFLAGS) 
    155160 
    156161 
  • pjproject/trunk/pjmedia/build/Makefile

    r4812 r4815  
    135135# 
    136136export PJMEDIA_CODEC_SRCDIR = ../src/pjmedia-codec 
    137 export PJMEDIA_CODEC_OBJS += audio_codecs.o ffmpeg_vid_codecs.o \ 
     137export PJMEDIA_CODEC_OBJS += audio_codecs.o ffmpeg_vid_codecs.o openh264.o \ 
    138138                        h263_packetizer.o h264_packetizer.o \ 
    139139                        $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \ 
  • pjproject/trunk/pjmedia/include/pjmedia-codec.h

    r4331 r4815  
    3636#include <pjmedia-codec/ipp_codecs.h> 
    3737#include <pjmedia-codec/opencore_amr.h> 
     38#include <pjmedia-codec/openh264.h> 
    3839#include <pjmedia-codec/passthrough.h> 
    3940#include <pjmedia-codec/silk.h> 
  • pjproject/trunk/pjmedia/include/pjmedia/event.h

    r3905 r4815  
    241241{ 
    242242    /** 
     243     * Default flag. 
     244     */ 
     245    PJMEDIA_EVENT_PUBLISH_DEFAULT, 
     246 
     247    /** 
    243248     * Publisher will only post the event to the event manager. It is the 
    244249     * event manager that will later notify all the publisher's subscribers. 
  • pjproject/trunk/pjmedia/src/pjmedia/vid_codec_util.c

    r4593 r4815  
    632632 
    633633    /* Calculate maximum size (in macroblocks) */ 
    634     max_fs = fmtp->max_mbps * fps->denum / fps->num; 
     634    max_fs = fmtp->max_mbps * the_fps.denum / the_fps.num; 
    635635    max_fs = PJ_MIN(max_fs, fmtp->max_fs); 
    636636 
  • pjproject/trunk/pjmedia/src/test/vid_codec_test.c

    r4537 r4815  
    1818 */ 
    1919#include "test.h" 
    20 #include <pjmedia-codec/ffmpeg_vid_codecs.h> 
     20#include <pjmedia-codec.h> 
    2121#include <pjmedia-videodev/videodev.h> 
    2222#include <pjmedia/vid_codec.h> 
     
    298298        codec_param.packing = packing; 
    299299 
     300        /* Don't apply SDP fmtp */ 
     301        codec_param.ignore_fmtp = PJ_TRUE; 
     302 
    300303        /* Open codec */ 
    301304        status = pjmedia_vid_codec_mgr_alloc_codec(NULL, codec_info, 
     
    454457        return -10; 
    455458 
     459#if PJMEDIA_HAS_VIDEO && PJMEDIA_HAS_OPENH264_CODEC 
     460    status = pjmedia_codec_openh264_vid_init(NULL, mem); 
     461    if (status != PJ_SUCCESS) { 
     462        return -22; 
     463    } 
     464#endif 
     465 
    456466#if PJMEDIA_HAS_FFMPEG_VID_CODEC 
    457467    status = pjmedia_codec_ffmpeg_vid_init(NULL, mem); 
     
    464474        goto on_return; 
    465475 
     476#if PJMEDIA_HAS_FFMPEG_VID_CODEC 
    466477    rc = encode_decode_test(pool, "h263-1998", PJMEDIA_VID_PACKING_WHOLE); 
    467478    if (rc != 0) 
     
    471482    if (rc != 0) 
    472483        goto on_return; 
     484#endif 
     485 
     486#if PJMEDIA_HAS_FFMPEG_VID_CODEC || PJMEDIA_HAS_OPENH264_CODEC 
     487    rc = encode_decode_test(pool, "h264", PJMEDIA_VID_PACKING_WHOLE); 
     488    if (rc != 0) 
     489        goto on_return; 
     490 
     491    rc = encode_decode_test(pool, "h264", PJMEDIA_VID_PACKING_PACKETS); 
     492    if (rc != 0) 
     493        goto on_return; 
     494#endif 
     495 
    473496 
    474497on_return: 
     
    476499    pjmedia_codec_ffmpeg_vid_deinit(); 
    477500#endif 
     501#if defined(PJMEDIA_HAS_OPENH264_CODEC) && PJMEDIA_HAS_OPENH264_CODEC != 0 
     502    pjmedia_codec_openh264_vid_deinit(); 
     503#endif 
    478504    pjmedia_vid_dev_subsys_shutdown(); 
    479505    pj_pool_release(pool); 
  • pjproject/trunk/pjsip-apps/build/Samples.mak

    r4803 r4815  
    4646           strerror \ 
    4747           tonegen \ 
     48           vid_codec_test \ 
    4849           vid_streamutil 
    4950 
  • pjproject/trunk/pjsip-apps/src/samples/aviplay.c

    r4537 r4815  
    501501    } 
    502502     
     503#if defined(PJMEDIA_HAS_OPENH264_CODEC) && PJMEDIA_HAS_OPENH264_CODEC != 0 
     504    status = pjmedia_codec_openh264_vid_init(NULL, &cp.factory); 
     505    if (status != PJ_SUCCESS) 
     506        goto on_return; 
     507#endif 
     508 
    503509#if PJMEDIA_HAS_FFMPEG_VID_CODEC 
    504510    status = pjmedia_codec_ffmpeg_vid_init(NULL, &cp.factory); 
     
    522528    pjmedia_codec_ffmpeg_vid_deinit(); 
    523529#endif 
     530#if defined(PJMEDIA_HAS_OPENH264_CODEC) && PJMEDIA_HAS_OPENH264_CODEC != 0 
     531    pjmedia_codec_openh264_vid_deinit(); 
     532#endif 
    524533    pjmedia_aud_subsys_shutdown(); 
    525534    pjmedia_vid_dev_subsys_shutdown(); 
  • pjproject/trunk/pjsip-apps/src/samples/simpleua.c

    r4051 r4815  
    386386    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1); 
    387387 
     388#   if defined(PJMEDIA_HAS_OPENH264_CODEC) && PJMEDIA_HAS_OPENH264_CODEC != 0 
     389    status = pjmedia_codec_openh264_vid_init(NULL, &cp.factory); 
     390    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1); 
     391#   endif 
     392 
    388393#  if defined(PJMEDIA_HAS_FFMPEG_VID_CODEC) && PJMEDIA_HAS_FFMPEG_VID_CODEC!=0 
    389394    /* Init ffmpeg video codecs */ 
     
    576581#   if defined(PJMEDIA_HAS_FFMPEG_VID_CODEC) && PJMEDIA_HAS_FFMPEG_VID_CODEC!=0 
    577582    pjmedia_codec_ffmpeg_vid_deinit(); 
     583#   endif 
     584#   if defined(PJMEDIA_HAS_OPENH264_CODEC) && PJMEDIA_HAS_OPENH264_CODEC != 0 
     585    pjmedia_codec_openh264_vid_deinit(); 
    578586#   endif 
    579587 
  • pjproject/trunk/pjsip-apps/src/samples/vid_streamutil.c

    r4537 r4815  
    122122    PJ_UNUSED_ARG(status); 
    123123 
     124#if defined(PJMEDIA_HAS_OPENH264_CODEC) && PJMEDIA_HAS_OPENH264_CODEC != 0 
     125    status = pjmedia_codec_openh264_vid_init(NULL, pf); 
     126    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status); 
     127#endif 
     128 
    124129#if defined(PJMEDIA_HAS_FFMPEG_VID_CODEC) && PJMEDIA_HAS_FFMPEG_VID_CODEC != 0 
    125130    status = pjmedia_codec_ffmpeg_vid_init(NULL, pf); 
     
    138143    pjmedia_codec_ffmpeg_vid_deinit(); 
    139144#endif 
     145 
     146#if defined(PJMEDIA_HAS_OPENH264_CODEC) && PJMEDIA_HAS_OPENH264_CODEC != 0 
     147    pjmedia_codec_openh264_vid_deinit(); 
     148#endif 
     149 
    140150} 
    141151 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_vid.c

    r4750 r4815  
    7474    } 
    7575 
     76#if PJMEDIA_HAS_VIDEO && PJMEDIA_HAS_OPENH264_CODEC 
     77    status = pjmedia_codec_openh264_vid_init(NULL, &pjsua_var.cp.factory); 
     78    if (status != PJ_SUCCESS) { 
     79        PJ_PERROR(1,(THIS_FILE, status, 
     80                     "Error initializing OpenH264 library")); 
     81        goto on_error; 
     82    } 
     83#endif 
     84 
    7685#if PJMEDIA_HAS_VIDEO && PJMEDIA_HAS_FFMPEG_VID_CODEC 
    7786    status = pjmedia_codec_ffmpeg_vid_init(NULL, &pjsua_var.cp.factory); 
     
    132141#if PJMEDIA_HAS_FFMPEG_VID_CODEC 
    133142    pjmedia_codec_ffmpeg_vid_deinit(); 
     143#endif 
     144 
     145#if defined(PJMEDIA_HAS_OPENH264_CODEC) && PJMEDIA_HAS_OPENH264_CODEC != 0 
     146    pjmedia_codec_openh264_vid_deinit(); 
    134147#endif 
    135148 
Note: See TracChangeset for help on using the changeset viewer.