- Timestamp:
- Jun 28, 2016 2:32:08 PM (8 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/aconfigure
r5355 r5361 623 623 ac_main_obj 624 624 ac_host 625 ac_no_yuv 625 626 opus_present 626 627 opus_h_present … … 643 644 ac_webrtc_ldflags 644 645 ac_webrtc_cflags 645 ac_libyuv_ldflags646 ac_libyuv_cflags647 646 ac_openh264_ldflags 648 647 ac_openh264_cflags … … 683 682 ac_pjmedia_snd 684 683 ac_pjmedia_resample 684 ac_external_yuv 685 685 ac_srtp_shutdown_present 686 686 ac_srtp_deinit_present … … 780 780 with_external_gsm 781 781 with_external_srtp 782 with_external_yuv 782 783 enable_resample 783 784 enable_sound … … 805 806 with_openh264 806 807 enable_openh264 807 with_libyuv808 enable_libyuv809 808 with_webrtc 810 809 enable_webrtc … … 823 822 with_opus 824 823 enable_opus 824 enable_libyuv 825 825 ' 826 826 ac_precious_vars='build_alias … … 1475 1475 --disable-v4l2 Disable Video4Linux2 (default: not disabled) 1476 1476 --disable-openh264 Disable OpenH264 (default: not disabled) 1477 --disable-libyuv Exclude libyuv in the build1478 1477 --disable-webrtc Exclude webrtc in the build 1479 1478 --enable-ipp Enable Intel IPP support. Specify the Intel IPP … … 1492 1491 autodetect) 1493 1492 1493 --disable-libyuv Exclude libyuv in the build 1494 1494 1495 1495 Optional Packages: … … 1511 1511 CFLAGS and LDFLAGS env var to set the include/lib 1512 1512 paths) 1513 --with-external-yuv Use external libyuv development files, not the one 1514 in "third_party" directory. When this option is set, 1515 make sure that libyuv is accessible to use (hint: 1516 use CFLAGS and LDFLAGS env var to set the 1517 include/lib paths) 1513 1518 --with-external-pa Use external PortAudio development files, not the 1514 1519 one in "third_party" directory. When this option is … … 1519 1524 --with-ffmpeg=DIR Specify alternate FFMPEG prefix 1520 1525 --with-openh264=DIR Specify alternate OpenH264 prefix 1521 --with-libyuv=DIR Specify alternate libyuv prefix1522 1526 --with-webrtc=DIR Specify alternate WebRtc prefix 1523 1527 --with-ipp=DIR Specify the Intel IPP location … … 6050 6054 fi 6051 6055 6056 6057 ac_external_yuv=0 6058 6059 6060 # Check whether --with-external-yuv was given. 6061 if test "${with_external_yuv+set}" = set; then : 6062 withval=$with_external_yuv; 6063 if test "x$with_external_yuv" != "xno"; then 6064 # Test libyuv installation 6065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if external libyuv devkit is installed" >&5 6066 $as_echo_n "checking if external libyuv devkit is installed... " >&6; } 6067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6068 /* end confdefs.h. */ 6069 #include <libyuv.h> 6070 int 6071 main () 6072 { 6073 RGB24ToI420(0,0,0,0,0,0,0,0,0,0); 6074 ; 6075 return 0; 6076 } 6077 _ACEOF 6078 if ac_fn_c_try_compile "$LINENO"; then : 6079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes!!" >&5 6080 $as_echo "yes!!" >&6; } 6081 ac_external_yuv="1" 6082 6083 else 6084 as_fn_error $? "Unable to use external libyuv. If libyuv development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths" "$LINENO" 5 6085 fi 6086 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6087 fi 6088 6089 6090 fi 6091 6092 6093 6052 6094 ac_pjmedia_resample=libresample 6053 6095 … … 6213 6255 6214 6256 6257 # Disable video on mingw 6258 case $target in 6259 *mingw*) 6260 enable_video="no" 6261 ;; 6262 esac 6263 6215 6264 # Check whether --enable-video was given. 6216 6265 if test "${enable_video+set}" = set; then : … … 6871 6920 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1" 6872 6921 av_pkg="$av_pkg libswscale" 6922 enable_libyuv="no" 6873 6923 fi 6874 6924 if $PKG_CONFIG --exists libavutil; then … … 7109 7159 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1" 7110 7160 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lswscale" 7161 enable_libyuv="no" 7111 7162 7112 7163 fi … … 7321 7372 rm -f core conftest.err conftest.$ac_objext \ 7322 7373 conftest$ac_exeext conftest.$ac_ext 7323 7324 7325 fi7326 7327 7328 7329 # Check whether --with-libyuv was given.7330 if test "${with_libyuv+set}" = set; then :7331 withval=$with_libyuv;7332 else7333 with_libyuv=no7334 7335 fi7336 7337 7338 if test "x$ac_cross_compile" != "x" -a "x$with_libyuv" = "xno"; then7339 enable_libyuv=no7340 fi7341 7342 7343 7344 # Check whether --enable-libyuv was given.7345 if test "${enable_libyuv+set}" = set; then :7346 enableval=$enable_libyuv; if test "$enable_libyuv" = "no"; then7347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if libyuv is disabled...yes" >&57348 $as_echo "Checking if libyuv is disabled...yes" >&6; }7349 fi7350 else7351 7352 if test "x$with_libyuv" != "xno" -a "x$with_libyuv" != "x"; then7353 LIBYUV_PREFIX=$with_libyuv7354 LIBYUV_CFLAGS="-I$LIBYUV_PREFIX/include"7355 7356 case $target in7357 *-apple-darwin_ios*)7358 LIBYUV_LDFLAGS="-L$LIBYUV_PREFIX/out_ios/Release-iphoneos"7359 case $ARCH in7360 *arm*)7361 LIBYUV_LIBS="-lyuv_neon"7362 ;;7363 *)7364 ;;7365 esac7366 ;;7367 *mingw* | *cygw* | *win32* | *w32* | *darwin* | *linux* | *android*)7368 LIBYUV_LDFLAGS="-L$LIBYUV_PREFIX/out/Release"7369 ;;7370 *)7371 LIBYUV_CFLAGS=""7372 LIBYUV_LDFLAGS=""7373 ;;7374 esac7375 7376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using libyuv prefix... $with_libyuv" >&57377 $as_echo "Using libyuv prefix... $with_libyuv" >&6; }7378 else7379 LIBYUV_CFLAGS=""7380 LIBYUV_LDFLAGS=""7381 fi7382 7383 LIBYUV_LIBS="$LIBYUV_LIBS -lyuv"7384 7385 SAVED_LIBS="$LIBS"7386 SAVED_LDFLAGS="$LDFLAGS"7387 SAVED_CFLAGS="$CFLAGS"7388 7389 LIBS="$LIBYUV_LIBS $LIBS"7390 LDFLAGS="$LIBYUV_LDFLAGS $LDFLAGS"7391 CFLAGS="$LIBYUV_CFLAGS $CFLAGS"7392 7393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for I420Scale in -lyuv" >&57394 $as_echo_n "checking for I420Scale in -lyuv... " >&6; }7395 if ${ac_cv_lib_yuv_I420Scale+:} false; then :7396 $as_echo_n "(cached) " >&67397 else7398 ac_check_lib_save_LIBS=$LIBS7399 LIBS="-lyuv7400 $LIBS"7401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext7402 /* end confdefs.h. */7403 7404 /* Override any GCC internal prototype to avoid an error.7405 Use char because int might match the return type of a GCC7406 builtin and then its argument prototype would still apply. */7407 #ifdef __cplusplus7408 extern "C"7409 #endif7410 char I420Scale ();7411 int7412 main ()7413 {7414 return I420Scale ();7415 ;7416 return 0;7417 }7418 _ACEOF7419 if ac_fn_c_try_link "$LINENO"; then :7420 ac_cv_lib_yuv_I420Scale=yes7421 else7422 ac_cv_lib_yuv_I420Scale=no7423 fi7424 rm -f core conftest.err conftest.$ac_objext \7425 conftest$ac_exeext conftest.$ac_ext7426 LIBS=$ac_check_lib_save_LIBS7427 fi7428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_yuv_I420Scale" >&57429 $as_echo "$ac_cv_lib_yuv_I420Scale" >&6; }7430 if test "x$ac_cv_lib_yuv_I420Scale" = xyes; then :7431 ac_libyuv_cflags="-DPJMEDIA_HAS_LIBYUV=1 $LIBYUV_CFLAGS"7432 ac_libyuv_ldflags="$LIBYUV_LDFLAGS $LIBYUV_LIBS"7433 7434 else7435 LIBS="$SAVED_LIBS"7436 LDFLAGS="$SAVED_LDFLAGS"7437 CFLAGS="$SAVED_CFLAGS"7438 7439 fi7440 7374 7441 7375 … … 8441 8375 fi 8442 8376 8377 fi 8378 8379 8380 8381 # Check whether --enable-libyuv was given. 8382 if test "${enable_libyuv+set}" = set; then : 8383 enableval=$enable_libyuv; if test "$enable_libyuv" = "no"; then 8384 ac_no_yuv=1, 8385 $as_echo "#define PJMEDIA_HAS_LIBYUV 0" >>confdefs.h 8386 8387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if libyuv is disabled...yes" >&5 8388 $as_echo "Checking if libyuv is disabled...yes" >&6; } 8389 fi 8390 else 8391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if libyuv is disabled...no" >&5 8392 $as_echo "Checking if libyuv is disabled...no" >&6; } 8443 8393 fi 8444 8394 -
pjproject/trunk/aconfigure.ac
r5355 r5361 569 569 fi 570 570 571 572 dnl # Use external libyuv installation 573 AC_SUBST(ac_external_yuv,0) 574 AC_ARG_WITH(external-yuv, 575 AS_HELP_STRING([--with-external-yuv], 576 [Use external libyuv development files, not the one in "third_party" directory. When this option is set, make sure that libyuv is accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]), 577 [ 578 if test "x$with_external_yuv" != "xno"; then 579 # Test libyuv installation 580 AC_MSG_CHECKING([if external libyuv devkit is installed]) 581 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libyuv.h>]], 582 [RGB24ToI420(0,0,0,0,0,0,0,0,0,0);])], 583 [AC_MSG_RESULT(yes!!) 584 ac_external_yuv="1" 585 ], 586 [AC_MSG_ERROR([Unable to use external libyuv. If libyuv development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths])]) 587 fi 588 ] 589 ) 590 591 571 592 dnl # Resample implementation 572 593 AC_SUBST(ac_pjmedia_resample,libresample) … … 685 706 686 707 AC_SUBST(ac_pjmedia_video) 708 709 # Disable video on mingw 710 case $target in 711 *mingw*) 712 enable_video="no" 713 ;; 714 esac 687 715 688 716 dnl # --disable-video option … … 1038 1066 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1" 1039 1067 av_pkg="$av_pkg libswscale" 1068 dnl # disable libyuv when libswscale is enabled 1069 enable_libyuv="no" 1040 1070 fi 1041 1071 if $PKG_CONFIG --exists libavutil; then … … 1096 1126 [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1" 1097 1127 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lswscale" 1128 enable_libyuv="no" 1098 1129 ], 1099 1130 [], … … 1204 1235 ]) 1205 1236 1206 ])1207 1208 dnl # libyuv alt prefix1209 AC_ARG_WITH(libyuv,1210 AS_HELP_STRING([--with-libyuv=DIR],1211 [Specify alternate libyuv prefix]),1212 [],1213 [with_libyuv=no]1214 )1215 1216 dnl # Do not use default libyuv installation if we are cross-compiling1217 if test "x$ac_cross_compile" != "x" -a "x$with_libyuv" = "xno"; then1218 enable_libyuv=no1219 fi1220 1221 dnl # Include libyuv1222 AC_SUBST(ac_libyuv_cflags)1223 AC_SUBST(ac_libyuv_ldflags)1224 AC_ARG_ENABLE(libyuv,1225 AS_HELP_STRING([--disable-libyuv],1226 [Exclude libyuv in the build]),1227 [if test "$enable_libyuv" = "no"; then1228 AC_MSG_RESULT([Checking if libyuv is disabled...yes])1229 fi],1230 [1231 if test "x$with_libyuv" != "xno" -a "x$with_libyuv" != "x"; then1232 LIBYUV_PREFIX=$with_libyuv1233 LIBYUV_CFLAGS="-I$LIBYUV_PREFIX/include"1234 1235 case $target in1236 *-apple-darwin_ios*)1237 LIBYUV_LDFLAGS="-L$LIBYUV_PREFIX/out_ios/Release-iphoneos"1238 case $ARCH in1239 *arm*)1240 LIBYUV_LIBS="-lyuv_neon"1241 ;;1242 *)1243 ;;1244 esac1245 ;;1246 *mingw* | *cygw* | *win32* | *w32* | *darwin* | *linux* | *android*)1247 LIBYUV_LDFLAGS="-L$LIBYUV_PREFIX/out/Release"1248 ;;1249 *)1250 LIBYUV_CFLAGS=""1251 LIBYUV_LDFLAGS=""1252 ;;1253 esac1254 1255 AC_MSG_RESULT([Using libyuv prefix... $with_libyuv])1256 else1257 LIBYUV_CFLAGS=""1258 LIBYUV_LDFLAGS=""1259 fi1260 1261 LIBYUV_LIBS="$LIBYUV_LIBS -lyuv"1262 1263 SAVED_LIBS="$LIBS"1264 SAVED_LDFLAGS="$LDFLAGS"1265 SAVED_CFLAGS="$CFLAGS"1266 1267 LIBS="$LIBYUV_LIBS $LIBS"1268 LDFLAGS="$LIBYUV_LDFLAGS $LDFLAGS"1269 CFLAGS="$LIBYUV_CFLAGS $CFLAGS"1270 1271 AC_CHECK_LIB(yuv,1272 I420Scale,1273 [ ac_libyuv_cflags="-DPJMEDIA_HAS_LIBYUV=1 $LIBYUV_CFLAGS"1274 ac_libyuv_ldflags="$LIBYUV_LDFLAGS $LIBYUV_LIBS"1275 ],1276 [ LIBS="$SAVED_LIBS"1277 LDFLAGS="$SAVED_LDFLAGS"1278 CFLAGS="$SAVED_CFLAGS"1279 ],1280 []1281 )1282 1237 ]) 1283 1238 … … 1835 1790 ]) 1836 1791 1792 dnl # Include libyuv 1793 AC_SUBST(ac_no_yuv) 1794 AC_ARG_ENABLE(libyuv, 1795 AS_HELP_STRING([--disable-libyuv], 1796 [Exclude libyuv in the build]), 1797 [if test "$enable_libyuv" = "no"; then 1798 [ac_no_yuv=1], 1799 AC_DEFINE(PJMEDIA_HAS_LIBYUV,0) 1800 AC_MSG_RESULT([Checking if libyuv is disabled...yes]) 1801 fi], 1802 AC_MSG_RESULT([Checking if libyuv is disabled...no])) 1803 1837 1804 1838 1805 dnl ########################################## -
pjproject/trunk/build.mak.in
r5347 r5361 122 122 endif 123 123 124 ifneq (@ac_no_yuv@,1) 125 ifeq (@ac_external_yuv@,1) 126 APP_THIRD_PARTY_EXT += -lyuv 127 else 128 APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libyuv-$(LIB_SUFFIX) 129 ifeq ($(PJ_SHARED_LIBRARIES),) 130 APP_THIRD_PARTY_LIBS += -lyuv-$(TARGET_NAME) 131 else 132 APP_THIRD_PARTY_LIBS += -lyuv 133 APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libyuv.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/third_party/lib/libyuv.$(SHLIB_SUFFIX) 134 endif 135 endif 136 endif 137 138 124 139 # Additional flags 125 140 @ac_build_mak_vars@ … … 158 173 ANDROID_CFLAGS = @ac_android_cflags@ 159 174 160 # libyuv161 LIBYUV_CFLAGS = @ac_libyuv_cflags@162 LIBYUV_LDFLAGS = @ac_libyuv_ldflags@163 164 175 # PJMEDIA features exclusion 165 176 PJ_VIDEO_CFLAGS += $(SDL_CFLAGS) $(FFMPEG_CFLAGS) $(V4L2_CFLAGS) $(QT_CFLAGS) \ 166 $(OPENH264_CFLAGS) $(DARWIN_CFLAGS) $(LIBYUV_CFLAGS)177 $(OPENH264_CFLAGS) $(DARWIN_CFLAGS) 167 178 PJ_VIDEO_LDFLAGS += $(SDL_LDFLAGS) $(FFMPEG_LDFLAGS) $(V4L2_LDFLAGS) \ 168 $(OPENH264_LDFLAGS) $(LIBYUV_LDFLAGS)179 $(OPENH264_LDFLAGS) 169 180 170 181 # CFLAGS, LDFLAGS, and LIBS to be used by applications -
pjproject/trunk/build/rules.mak
r5154 r5361 52 52 # FULL_SRCS is ../src/app/file1.c ../src/app/file1.S 53 53 # 54 FULL_SRCS = $(foreach file, $($(APP)_OBJS), $(SRCDIR)/$(basename $(file)).m $(SRCDIR)/$(basename $(file)).c $(SRCDIR)/$(basename $(file)).cpp $(SRCDIR)/$(basename $(file)). S)54 FULL_SRCS = $(foreach file, $($(APP)_OBJS), $(SRCDIR)/$(basename $(file)).m $(SRCDIR)/$(basename $(file)).c $(SRCDIR)/$(basename $(file)).cpp $(SRCDIR)/$(basename $(file)).cc $(SRCDIR)/$(basename $(file)).S) 55 55 56 56 # … … 171 171 172 172 $(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.cpp 173 $(CXX) $($(APP)_CXXFLAGS) \ 174 $(CC_OUT)$(subst /,$(HOST_PSEP),$@) \ 175 $(subst /,$(HOST_PSEP),$<) 176 177 $(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.cc 173 178 $(CXX) $($(APP)_CXXFLAGS) \ 174 179 $(CC_OUT)$(subst /,$(HOST_PSEP),$@) \ -
pjproject/trunk/pjmedia/build/os-auto.mak.in
r5347 r5361 29 29 ANDROID_CFLAGS = @ac_android_cflags@ 30 30 31 # libyuv32 LIBYUV_CFLAGS = @ac_libyuv_cflags@33 LIBYUV_LDFLAGS = @ac_libyuv_ldflags@34 35 31 # openh264 36 32 OPENH264_CFLAGS = @ac_openh264_cflags@ … … 45 41 export CFLAGS += @ac_no_small_filter@ @ac_no_large_filter@ @ac_no_speex_aec@ \ 46 42 $(SDL_CFLAGS) $(FFMPEG_CFLAGS) $(V4L2_CFLAGS) $(QT_CFLAGS) \ 47 $(DARWIN_CFLAGS) $(ANDROID_CFLAGS) $(LIBYUV_CFLAGS)\43 $(DARWIN_CFLAGS) $(ANDROID_CFLAGS) \ 48 44 $(OPENH264_CFLAGS) $(WEBRTC_CFLAGS) 49 45 export LDFLAGS += $(SDL_LDFLAGS) $(FFMPEG_LDFLAGS) $(V4L2_LDFLAGS) \ 50 $( LIBYUV_LDFLAGS) $(OPENH264_LDFLAGS) $(WEBRTC_LDFLAGS)46 $(OPENH264_LDFLAGS) $(WEBRTC_LDFLAGS) 51 47 52 48 # Define the desired sound device backend … … 197 193 198 194 # 195 # libyuv 196 # 197 ifeq (@ac_no_yuv@,1) 198 export CFLAGS += -DPJMEDIA_HAS_LIBYUV=0 199 else 200 export CFLAGS += -DPJMEDIA_HAS_LIBYUV=1 201 ifeq (@ac_external_yuv@,0) 202 export CFLAGS += -I$(THIRD_PARTY)/yuv/include 203 endif 204 endif 205 206 207 # 199 208 # MacOSX specific 200 209 # -
pjproject/trunk/pjsip-apps/src/swig/java/android/src/org/pjsip/pjsua2/app/MyApp.java
r5102 r5361 284 284 try{ 285 285 System.loadLibrary("openh264"); 286 System.loadLibrary("yuv"); 286 // Ticket #1937: libyuv is now included as static lib 287 //System.loadLibrary("yuv"); 287 288 } catch (UnsatisfiedLinkError e) { 288 289 System.out.println("UnsatisfiedLinkError: " + e.getMessage()); -
pjproject/trunk/third_party/build/os-auto.mak.in
r5268 r5361 41 41 DIRS += resample 42 42 endif 43 44 ifneq (@ac_no_yuv@,1) 45 ifeq (@ac_external_yuv@,1) 46 # External yuv 47 else 48 DIRS += yuv 49 endif 50 endif
Note: See TracChangeset
for help on using the changeset viewer.