Ignore:
Timestamp:
Jun 16, 2016 10:38:34 AM (8 years ago)
Author:
ming
Message:

Re #1931: Add support for AVFoundation on Mac

  • Deprecate QTKit
  • Rename ios_dev.m to darwin_dev.m
  • Important: Re-run configure and make dep after applying this change!
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure

    r5303 r5347  
    670670ac_qt_cflags 
    671671ac_pjmedia_video_has_qt 
    672 ac_ios_cflags 
    673 ac_pjmedia_video_has_ios 
     672ac_darwin_cflags 
     673ac_pjmedia_video_has_ios_opengl 
     674ac_pjmedia_video_has_darwin 
    674675ac_android_cflags 
    675676ac_pjmedia_video_has_android 
     
    62796280        ac_android_cflags="$ac_android_cflags -DPJMEDIA_VIDEO_DEV_HAS_ANDROID=1" 
    62806281        ;; 
    6281   *-apple-darwin_ios*) 
    6282         ac_pjmedia_video=iphone_os 
     6282  *darwin*) 
     6283        ac_pjmedia_video=darwin_os 
     6284 
    62836285 
    62846286 
     
    62976299_ACEOF 
    62986300if ac_fn_c_try_link "$LINENO"; then : 
    6299   ac_pjmedia_video_has_ios=yes 
    6300 else 
    6301   ac_pjmedia_video_has_ios=no 
     6301  ac_pjmedia_video_has_darwin=yes 
     6302else 
     6303  ac_pjmedia_video_has_darwin=no 
     6304fi 
     6305rm -f core conftest.err conftest.$ac_objext \ 
     6306    conftest$ac_exeext conftest.$ac_ext 
     6307        LIBS="-framework OpenGLES" 
     6308        cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
     6309/* end confdefs.h.  */ 
     6310 
     6311int 
     6312main () 
     6313{ 
     6314 
     6315  ; 
     6316  return 0; 
     6317} 
     6318_ACEOF 
     6319if ac_fn_c_try_link "$LINENO"; then : 
     6320  ac_pjmedia_video_has_ios_opengl=yes 
     6321else 
     6322  ac_pjmedia_video_has_ios_opengl=no 
    63026323fi 
    63036324rm -f core conftest.err conftest.$ac_objext \ 
    63046325    conftest$ac_exeext conftest.$ac_ext 
    63056326        LIBS="$SAVED_LIBS" 
    6306         if test "$ac_pjmedia_video_has_ios" = "yes"; then 
    6307           ac_ios_cflags="-DPJMEDIA_VIDEO_DEV_HAS_IOS=1 -DPJMEDIA_VIDEO_DEV_HAS_IOS_OPENGL=1" 
    6308           LIBS="$LIBS -framework OpenGLES -framework AVFoundation -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia" 
     6327        if test "$ac_pjmedia_video_has_darwin" = "yes"; then 
     6328          ac_darwin_cflags="-DPJMEDIA_VIDEO_DEV_HAS_DARWIN=1" 
     6329          LIBS="$LIBS -framework AVFoundation -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia" 
    63096330          { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if AVFoundation framework is available... yes" >&5 
    63106331$as_echo "Checking if AVFoundation framework is available... yes" >&6; } 
     
    63136334$as_echo "Checking if AVFoundation framework is available... no" >&6; } 
    63146335        fi 
    6315         ;; 
    6316   *darwin*) 
    6317         ac_pjmedia_video=mac_os 
    6318  
    6319  
    6320         SAVED_LIBS="$LIBS" 
    6321         LIBS="-framework QTKit" 
    6322         cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
     6336        if test "$ac_pjmedia_video_has_ios_opengl" = "yes"; then 
     6337          ac_darwin_cflags="-DPJMEDIA_VIDEO_DEV_HAS_IOS_OPENGL=1" 
     6338          LIBS="$LIBS -framework OpenGLES" 
     6339          { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if OpenGLES framework is available... yes" >&5 
     6340$as_echo "Checking if OpenGLES framework is available... yes" >&6; } 
     6341        else 
     6342          { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if OpenGLES framework is available... no" >&5 
     6343$as_echo "Checking if OpenGLES framework is available... no" >&6; } 
     6344        fi 
     6345        if false; then 
     6346          # QTKit is deprecated, see ticket #1931. 
     6347          ac_pjmedia_video=mac_os 
     6348 
     6349 
     6350          SAVED_LIBS="$LIBS" 
     6351          LIBS="-framework QTKit" 
     6352          cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
    63236353/* end confdefs.h.  */ 
    63246354 
     
    63386368rm -f core conftest.err conftest.$ac_objext \ 
    63396369    conftest$ac_exeext conftest.$ac_ext 
    6340         LIBS="$SAVED_LIBS" 
    6341         if test "$ac_pjmedia_video_has_qt" = "yes"; then 
    6342           ac_qt_cflags="-DPJMEDIA_VIDEO_DEV_HAS_QT=1" 
    6343           LIBS="$LIBS -framework QTKit -framework QuartzCore -framework OpenGL" 
    6344           { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if QTKit framework is available... yes" >&5 
     6370          LIBS="$SAVED_LIBS" 
     6371          if test "$ac_pjmedia_video_has_qt" = "yes"; then 
     6372            ac_qt_cflags="-DPJMEDIA_VIDEO_DEV_HAS_QT=1" 
     6373            LIBS="$LIBS -framework QTKit -framework QuartzCore -framework OpenGL" 
     6374            { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if QTKit framework is available... yes" >&5 
    63456375$as_echo "Checking if QTKit framework is available... yes" >&6; } 
    6346         else 
    6347           { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if QTKit framework is available... no" >&5 
     6376          else 
     6377            { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if QTKit framework is available... no" >&5 
    63486378$as_echo "Checking if QTKit framework is available... no" >&6; } 
    6349         fi 
    6350         ;; 
     6379          fi 
     6380        fi 
     6381        ;; 
    63516382 esac 
    63526383fi 
Note: See TracChangeset for help on using the changeset viewer.