Ignore:
Timestamp:
Apr 10, 2014 10:01:07 AM (10 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).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 
Note: See TracChangeset for help on using the changeset viewer.