Changeset 5271
- Timestamp:
- Mar 24, 2016 1:16:25 PM (9 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/aconfigure
r5270 r5271 2011 2011 2012 2012 } # ac_fn_c_check_func 2013 2014 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES 2015 # ------------------------------------------- 2016 # Tests whether TYPE exists after having included INCLUDES, setting cache 2017 # variable VAR accordingly. 2018 ac_fn_c_check_type () 2019 { 2020 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2022 $as_echo_n "checking for $2... " >&6; } 2023 if eval \${$3+:} false; then : 2024 $as_echo_n "(cached) " >&6 2025 else 2026 eval "$3=no" 2027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2028 /* end confdefs.h. */ 2029 $4 2030 int 2031 main () 2032 { 2033 if (sizeof ($2)) 2034 return 0; 2035 ; 2036 return 0; 2037 } 2038 _ACEOF 2039 if ac_fn_c_try_compile "$LINENO"; then : 2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2041 /* end confdefs.h. */ 2042 $4 2043 int 2044 main () 2045 { 2046 if (sizeof (($2))) 2047 return 0; 2048 ; 2049 return 0; 2050 } 2051 _ACEOF 2052 if ac_fn_c_try_compile "$LINENO"; then : 2053 2054 else 2055 eval "$3=yes" 2056 fi 2057 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2058 fi 2059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2060 fi 2061 eval ac_res=\$$3 2062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2063 $as_echo "$ac_res" >&6; } 2064 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2065 2066 } # ac_fn_c_check_type 2013 2067 cat >config.log <<_ACEOF 2014 2068 This file contains any messages produced by compilers while … … 2274 2328 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2275 2329 as_fn_error $? "failed to load site script $ac_site_file 2276 See \`config.log' for more details" "$LINENO" 5 ; }2330 See \`config.log' for more details" "$LINENO" 5 ; } 2277 2331 fi 2278 2332 done … … 2417 2471 case $ac_cv_build in 2418 2472 *-*-*) ;; 2419 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;2473 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; 2420 2474 esac 2421 2475 build=$ac_cv_build … … 2450 2504 case $ac_cv_host in 2451 2505 *-*-*) ;; 2452 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;2506 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; 2453 2507 esac 2454 2508 host=$ac_cv_host … … 2483 2537 case $ac_cv_target in 2484 2538 *-*-*) ;; 2485 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;2539 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;; 2486 2540 esac 2487 2541 target=$ac_cv_target … … 2820 2874 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2821 2875 as_fn_error $? "no acceptable C compiler found in \$PATH 2822 See \`config.log' for more details" "$LINENO" 5 ; }2876 See \`config.log' for more details" "$LINENO" 5 ; } 2823 2877 2824 2878 # Provide some information about the compiler. … … 2935 2989 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2936 2990 as_fn_error 77 "C compiler cannot create executables 2937 See \`config.log' for more details" "$LINENO" 5 ; }2991 See \`config.log' for more details" "$LINENO" 5 ; } 2938 2992 else 2939 2993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 … … 2978 3032 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2979 3033 as_fn_error $? "cannot compute suffix of executables: cannot compile and link 2980 See \`config.log' for more details" "$LINENO" 5 ; }3034 See \`config.log' for more details" "$LINENO" 5 ; } 2981 3035 fi 2982 3036 rm -f conftest conftest$ac_cv_exeext … … 3037 3091 as_fn_error $? "cannot run C compiled programs. 3038 3092 If you meant to cross compile, use \`--host'. 3039 See \`config.log' for more details" "$LINENO" 5 ; }3093 See \`config.log' for more details" "$LINENO" 5 ; } 3040 3094 fi 3041 3095 fi … … 3089 3143 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 3090 3144 as_fn_error $? "cannot compute suffix of object files: cannot compile 3091 See \`config.log' for more details" "$LINENO" 5 ; }3145 See \`config.log' for more details" "$LINENO" 5 ; } 3092 3146 fi 3093 3147 rm -f conftest.$ac_cv_objext conftest.$ac_ext … … 4483 4537 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 4484 4538 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check 4485 See \`config.log' for more details" "$LINENO" 5 ; }4539 See \`config.log' for more details" "$LINENO" 5 ; } 4486 4540 fi 4487 4541 … … 4973 5027 *) 4974 5028 as_fn_error $? "unknown endianness 4975 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;5029 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; 4976 5030 esac 4977 5031 … … 7077 7131 fi 7078 7132 7133 ac_fn_c_check_type "$LINENO" "enum AVPixelFormat" "ac_cv_type_enum_AVPixelFormat" "#include <libavformat/avformat.h> 7134 7135 " 7136 if test "x$ac_cv_type_enum_AVPixelFormat" = xyes; then : 7137 7138 cat >>confdefs.h <<_ACEOF 7139 #define HAVE_ENUM_AVPIXELFORMAT 1 7140 _ACEOF 7141 7142 7143 else 7144 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_USE_OLD_FFMPEG=1" 7145 fi 7146 7147 7079 7148 LIBS="$LIBS $ac_ffmpeg_ldflags" 7080 7149 export PKG_CONFIG_PATH=$SAVED_PKG_CONFIG_PATH … … 7614 7683 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 7615 7684 as_fn_error $? "Error: unable to recognize your IPP installation. Make sure the paths and ARCH suffix are set correctly, run with --help for more info 7616 See \`config.log' for more details" "$LINENO" 5 ; }7685 See \`config.log' for more details" "$LINENO" 5 ; } 7617 7686 fi 7618 7687 rm -f core conftest.err conftest.$ac_objext \ … … 7670 7739 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 7671 7740 as_fn_error $? "Unable to find to find built binaries under $IPPSAMPLES/speech-codecs/{bin,_bin}. Have you built the IPP samples? 7672 See \`config.log' for more details" "$LINENO" 5 ; }7741 See \`config.log' for more details" "$LINENO" 5 ; } 7673 7742 fi 7674 7743 else … … 7676 7745 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 7677 7746 as_fn_error $? "unable to find $IPPSAMPLES/speech-codecs/bin/*gcc*/lib or $IPPSAMPLES/speech-codecs/_bin/*gcc*/lib directory. Have you built the samples? 7678 See \`config.log' for more details" "$LINENO" 5 ; }7747 See \`config.log' for more details" "$LINENO" 5 ; } 7679 7748 fi 7680 7749 … … 7684 7753 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 7685 7754 as_fn_error $? "There's something wrong with this script, directory $IPPSAMP_DIR does not exist 7686 See \`config.log' for more details" "$LINENO" 5 ; }7755 See \`config.log' for more details" "$LINENO" 5 ; } 7687 7756 exit 1; 7688 7757 fi … … 7698 7767 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 7699 7768 as_fn_error $? "bug in this script: unsupported IPP version 7700 See \`config.log' for more details" "$LINENO" 5 ; }7769 See \`config.log' for more details" "$LINENO" 5 ; } 7701 7770 fi 7702 7771 … … 7705 7774 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 7706 7775 as_fn_error $? "$IPPSAMP_LIBS doesn't exist in $IPPSAMP_DIR 7707 See \`config.log' for more details" "$LINENO" 5 ; }7776 See \`config.log' for more details" "$LINENO" 5 ; } 7708 7777 fi 7709 7778 … … 7741 7810 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 7742 7811 as_fn_error $? "no 7743 See \`config.log' for more details" "$LINENO" 5 ; }7812 See \`config.log' for more details" "$LINENO" 5 ; } 7744 7813 fi 7745 7814 rm -f core conftest.err conftest.$ac_objext \ … … 9139 9208 "third_party/build/os-auto.mak") CONFIG_FILES="$CONFIG_FILES third_party/build/os-auto.mak" ;; 9140 9209 9141 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;9210 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; 9142 9211 esac 9143 9212 done … … 9456 9525 case $ac_mode$ac_tag in 9457 9526 :[FHL]*:*);; 9458 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;9527 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; 9459 9528 :[FH]-) ac_tag=-:-;; 9460 9529 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; … … 9484 9553 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 9485 9554 esac || 9486 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;9555 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; 9487 9556 esac 9488 9557 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac … … 9511 9580 case $ac_tag in 9512 9581 *:-:* | *:-) cat >"$ac_tmp/stdin" \ 9513 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;9582 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; 9514 9583 esac 9515 9584 ;; -
pjproject/trunk/aconfigure.ac
r5270 r5271 1098 1098 fi 1099 1099 1100 AC_CHECK_TYPES(enum AVPixelFormat, 1101 [], 1102 [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_USE_OLD_FFMPEG=1"], 1103 [[#include <libavformat/avformat.h>]] 1104 ) 1105 1100 1106 LIBS="$LIBS $ac_ffmpeg_ldflags" 1101 1107 export PKG_CONFIG_PATH=$SAVED_PKG_CONFIG_PATH -
pjproject/trunk/pjmedia/src/pjmedia/ffmpeg_util.c
r5198 r5271 34 34 } ffmpeg_fmt_table[] = 35 35 { 36 { PJMEDIA_FORMAT_RGBA, AV _PIX_FMT_RGBA},37 { PJMEDIA_FORMAT_RGB24,AV _PIX_FMT_BGR24},38 { PJMEDIA_FORMAT_BGRA, AV _PIX_FMT_BGRA},39 { PJMEDIA_FORMAT_GBRP, AV _PIX_FMT_GBRP},36 { PJMEDIA_FORMAT_RGBA, AV(PIX_FMT_RGBA)}, 37 { PJMEDIA_FORMAT_RGB24,AV(PIX_FMT_BGR24)}, 38 { PJMEDIA_FORMAT_BGRA, AV(PIX_FMT_BGRA)}, 39 { PJMEDIA_FORMAT_GBRP, AV(PIX_FMT_GBRP)}, 40 40 41 { PJMEDIA_FORMAT_AYUV, AV _PIX_FMT_NONE},42 { PJMEDIA_FORMAT_YUY2, AV _PIX_FMT_YUYV422},43 { PJMEDIA_FORMAT_UYVY, AV _PIX_FMT_UYVY422},44 { PJMEDIA_FORMAT_I420, AV _PIX_FMT_YUV420P},45 //{ PJMEDIA_FORMAT_YV12, AV _PIX_FMT_YUV420P},46 { PJMEDIA_FORMAT_I422, AV _PIX_FMT_YUV422P},47 { PJMEDIA_FORMAT_I420JPEG, AV _PIX_FMT_YUVJ420P},48 { PJMEDIA_FORMAT_I422JPEG, AV _PIX_FMT_YUVJ422P},41 { PJMEDIA_FORMAT_AYUV, AV(PIX_FMT_NONE)}, 42 { PJMEDIA_FORMAT_YUY2, AV(PIX_FMT_YUYV422)}, 43 { PJMEDIA_FORMAT_UYVY, AV(PIX_FMT_UYVY422)}, 44 { PJMEDIA_FORMAT_I420, AV(PIX_FMT_YUV420P)}, 45 //{ PJMEDIA_FORMAT_YV12, AV(PIX_FMT_YUV420P)}, 46 { PJMEDIA_FORMAT_I422, AV(PIX_FMT_YUV422P)}, 47 { PJMEDIA_FORMAT_I420JPEG, AV(PIX_FMT_YUVJ420P)}, 48 { PJMEDIA_FORMAT_I422JPEG, AV(PIX_FMT_YUVJ422P)}, 49 49 }; 50 50 … … 56 56 } ffmpeg_codec_table[] = 57 57 { 58 {PJMEDIA_FORMAT_H261, AV _CODEC_ID_H261},59 {PJMEDIA_FORMAT_H263, AV _CODEC_ID_H263},60 {PJMEDIA_FORMAT_H263P, AV _CODEC_ID_H263P},61 {PJMEDIA_FORMAT_H264, AV _CODEC_ID_H264},62 {PJMEDIA_FORMAT_MPEG1VIDEO, AV _CODEC_ID_MPEG1VIDEO},63 {PJMEDIA_FORMAT_MPEG2VIDEO, AV _CODEC_ID_MPEG2VIDEO},64 {PJMEDIA_FORMAT_MPEG4, AV _CODEC_ID_MPEG4},65 {PJMEDIA_FORMAT_MJPEG, AV _CODEC_ID_MJPEG}58 {PJMEDIA_FORMAT_H261, AV(CODEC_ID_H261)}, 59 {PJMEDIA_FORMAT_H263, AV(CODEC_ID_H263)}, 60 {PJMEDIA_FORMAT_H263P, AV(CODEC_ID_H263P)}, 61 {PJMEDIA_FORMAT_H264, AV(CODEC_ID_H264)}, 62 {PJMEDIA_FORMAT_MPEG1VIDEO, AV(CODEC_ID_MPEG1VIDEO)}, 63 {PJMEDIA_FORMAT_MPEG2VIDEO, AV(CODEC_ID_MPEG2VIDEO)}, 64 {PJMEDIA_FORMAT_MPEG4, AV(CODEC_ID_MPEG4)}, 65 {PJMEDIA_FORMAT_MJPEG, AV(CODEC_ID_MJPEG)} 66 66 }; 67 67 … … 132 132 for (i=0; i<PJ_ARRAY_SIZE(ffmpeg_fmt_table); ++i) { 133 133 const struct ffmpeg_fmt_table_t *t = &ffmpeg_fmt_table[i]; 134 if (t->id==fmt_id && t->pf != AV _PIX_FMT_NONE) {134 if (t->id==fmt_id && t->pf != AV(PIX_FMT_NONE)) { 135 135 *pixel_format = t->pf; 136 136 return PJ_SUCCESS; … … 138 138 } 139 139 140 *pixel_format = AV _PIX_FMT_NONE;140 *pixel_format = AV(PIX_FMT_NONE); 141 141 return PJ_ENOTFOUND; 142 142 } … … 163 163 for (i=0; i<PJ_ARRAY_SIZE(ffmpeg_codec_table); ++i) { 164 164 const struct ffmpeg_codec_table_t *t = &ffmpeg_codec_table[i]; 165 if (t->id==fmt_id && t->codec_id != AV _PIX_FMT_NONE) {165 if (t->id==fmt_id && t->codec_id != AV(PIX_FMT_NONE)) { 166 166 *codec_id = t->codec_id; 167 167 return PJ_SUCCESS; … … 169 169 } 170 170 171 *codec_id = (unsigned)AV _PIX_FMT_NONE;171 *codec_id = (unsigned)AV(PIX_FMT_NONE); 172 172 return PJ_ENOTFOUND; 173 173 } -
pjproject/trunk/pjmedia/src/pjmedia/ffmpeg_util.h
r5198 r5271 38 38 #include <libavcodec/avcodec.h> 39 39 40 41 #ifdef PJMEDIA_USE_OLD_FFMPEG 42 # define AVPixelFormat PixelFormat 43 # define AV(str) str 44 # define PIX_FMT_GBRP PIX_FMT_GBR24P 45 #else 46 # define AV(str) AV_ ## str 47 #endif 48 49 40 50 void pjmedia_ffmpeg_add_ref(); 41 51 void pjmedia_ffmpeg_dec_ref();
Note: See TracChangeset
for help on using the changeset viewer.