Changeset 2724


Ignore:
Timestamp:
Dec 9, 2011, 11:40:15 AM (13 years ago)
Author:
gah
Message:

Addition checks for ffmeg

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure

    r2723 r2724  
    1003310033done
    1003410034
     10035  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     10036/* end confdefs.h.  */
     10037
     10038#define __STDC_CONSTANT_MACROS 1
     10039#include <stdlib.h>
     10040#ifdef HAVE_FFMPEG_AVCODEC_H
     10041# include <ffmpeg/avcodec.h>
     10042#endif
     10043#ifdef HAVE_LIBAVCODEC_AVCODEC_H
     10044# include <libavcodec/avcodec.h>
     10045#endif
     10046int x = AVMEDIA_TYPE_VIDEO;
     10047
     10048int
     10049main ()
     10050{
     10051
     10052  ;
     10053  return 0;
     10054}
     10055_ACEOF
     10056if ac_fn_cxx_try_compile "$LINENO"; then :
     10057  ac_avmedia_type_video="yes"
     10058else
     10059  ac_avmedia_type_video="no"
     10060fi
     10061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     10062  if test "$ac_avmedia_type_video" == "yes" ; then
     10063
     10064$as_echo "#define HAVE_AVMEDIA_TYPE_VIDEO 1" >>confdefs.h
     10065
     10066  fi
    1003510067fi
    1003610068
  • trunk/configure.in

    r2723 r2724  
    381381  AC_CHECK_FUNCS(img_convert)
    382382  AC_CHECK_FUNCS(sws_scale)
     383  AC_TRY_COMPILE([
     384#define __STDC_CONSTANT_MACROS 1
     385#include <stdlib.h>
     386#ifdef HAVE_FFMPEG_AVCODEC_H
     387# include <ffmpeg/avcodec.h>
     388#endif
     389#ifdef HAVE_LIBAVCODEC_AVCODEC_H
     390# include <libavcodec/avcodec.h>
     391#endif
     392int x = AVMEDIA_TYPE_VIDEO;
     393],, ac_avmedia_type_video="yes", ac_avmedia_type_video="no")
     394  if test "$ac_avmedia_type_video" == "yes" ; then
     395    AC_DEFINE(HAVE_AVMEDIA_TYPE_VIDEO,1,[Define if AVMEDIA_TYPE_VIDEO enum exists. ])
     396  fi
    383397fi
    384398
  • trunk/packages/vizservers/configure

    r2667 r2724  
    85508550CPPFLAGS=$save_CPPFLAGS
    85518551
     8552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lavcodec" >&5
     8553$as_echo_n "checking for main in -lavcodec... " >&6; }
     8554if ${ac_cv_lib_avcodec_main+:} false; then :
     8555  $as_echo_n "(cached) " >&6
     8556else
     8557  ac_check_lib_save_LIBS=$LIBS
     8558LIBS="-lavcodec  $LIBS"
     8559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     8560/* end confdefs.h.  */
     8561
     8562
     8563int
     8564main ()
     8565{
     8566return main ();
     8567  ;
     8568  return 0;
     8569}
     8570_ACEOF
     8571if ac_fn_cxx_try_link "$LINENO"; then :
     8572  ac_cv_lib_avcodec_main=yes
     8573else
     8574  ac_cv_lib_avcodec_main=no
     8575fi
     8576rm -f core conftest.err conftest.$ac_objext \
     8577    conftest$ac_exeext conftest.$ac_ext
     8578LIBS=$ac_check_lib_save_LIBS
     8579fi
     8580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avcodec_main" >&5
     8581$as_echo "$ac_cv_lib_avcodec_main" >&6; }
     8582if test "x$ac_cv_lib_avcodec_main" = xyes; then :
     8583  cat >>confdefs.h <<_ACEOF
     8584#define HAVE_LIBAVCODEC 1
     8585_ACEOF
     8586
     8587  LIBS="-lavcodec $LIBS"
     8588
     8589else
     8590  as_fn_error $? "requires libavcodec" "$LINENO" 5
     8591fi
     8592
     8593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lavutil" >&5
     8594$as_echo_n "checking for main in -lavutil... " >&6; }
     8595if ${ac_cv_lib_avutil_main+:} false; then :
     8596  $as_echo_n "(cached) " >&6
     8597else
     8598  ac_check_lib_save_LIBS=$LIBS
     8599LIBS="-lavutil  $LIBS"
     8600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     8601/* end confdefs.h.  */
     8602
     8603
     8604int
     8605main ()
     8606{
     8607return main ();
     8608  ;
     8609  return 0;
     8610}
     8611_ACEOF
     8612if ac_fn_cxx_try_link "$LINENO"; then :
     8613  ac_cv_lib_avutil_main=yes
     8614else
     8615  ac_cv_lib_avutil_main=no
     8616fi
     8617rm -f core conftest.err conftest.$ac_objext \
     8618    conftest$ac_exeext conftest.$ac_ext
     8619LIBS=$ac_check_lib_save_LIBS
     8620fi
     8621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avutil_main" >&5
     8622$as_echo "$ac_cv_lib_avutil_main" >&6; }
     8623if test "x$ac_cv_lib_avutil_main" = xyes; then :
     8624  cat >>confdefs.h <<_ACEOF
     8625#define HAVE_LIBAVUTIL 1
     8626_ACEOF
     8627
     8628  LIBS="-lavutil $LIBS"
     8629
     8630else
     8631  as_fn_error $? "requires libavutil" "$LINENO" 5
     8632fi
     8633
     8634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lavformat" >&5
     8635$as_echo_n "checking for main in -lavformat... " >&6; }
     8636if ${ac_cv_lib_avformat_main+:} false; then :
     8637  $as_echo_n "(cached) " >&6
     8638else
     8639  ac_check_lib_save_LIBS=$LIBS
     8640LIBS="-lavformat  $LIBS"
     8641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     8642/* end confdefs.h.  */
     8643
     8644
     8645int
     8646main ()
     8647{
     8648return main ();
     8649  ;
     8650  return 0;
     8651}
     8652_ACEOF
     8653if ac_fn_cxx_try_link "$LINENO"; then :
     8654  ac_cv_lib_avformat_main=yes
     8655else
     8656  ac_cv_lib_avformat_main=no
     8657fi
     8658rm -f core conftest.err conftest.$ac_objext \
     8659    conftest$ac_exeext conftest.$ac_ext
     8660LIBS=$ac_check_lib_save_LIBS
     8661fi
     8662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avformat_main" >&5
     8663$as_echo "$ac_cv_lib_avformat_main" >&6; }
     8664if test "x$ac_cv_lib_avformat_main" = xyes; then :
     8665  cat >>confdefs.h <<_ACEOF
     8666#define HAVE_LIBAVFORMAT 1
     8667_ACEOF
     8668
     8669  LIBS="-lavformat $LIBS"
     8670
     8671else
     8672  as_fn_error $? "requires libavformat" "$LINENO" 5
     8673fi
     8674
     8675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lswscale" >&5
     8676$as_echo_n "checking for main in -lswscale... " >&6; }
     8677if ${ac_cv_lib_swscale_main+:} false; then :
     8678  $as_echo_n "(cached) " >&6
     8679else
     8680  ac_check_lib_save_LIBS=$LIBS
     8681LIBS="-lswscale  $LIBS"
     8682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     8683/* end confdefs.h.  */
     8684
     8685
     8686int
     8687main ()
     8688{
     8689return main ();
     8690  ;
     8691  return 0;
     8692}
     8693_ACEOF
     8694if ac_fn_cxx_try_link "$LINENO"; then :
     8695  ac_cv_lib_swscale_main=yes
     8696else
     8697  ac_cv_lib_swscale_main=no
     8698fi
     8699rm -f core conftest.err conftest.$ac_objext \
     8700    conftest$ac_exeext conftest.$ac_ext
     8701LIBS=$ac_check_lib_save_LIBS
     8702fi
     8703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_swscale_main" >&5
     8704$as_echo "$ac_cv_lib_swscale_main" >&6; }
     8705if test "x$ac_cv_lib_swscale_main" = xyes; then :
     8706  cat >>confdefs.h <<_ACEOF
     8707#define HAVE_LIBSWSCALE 1
     8708_ACEOF
     8709
     8710  LIBS="-lswscale $LIBS"
     8711
     8712else
     8713  as_fn_error $? "requires libswscale" "$LINENO" 5
     8714fi
     8715
     8716for ac_func in avcodec_decode_video2
     8717do :
     8718  ac_fn_cxx_check_func "$LINENO" "avcodec_decode_video2" "ac_cv_func_avcodec_decode_video2"
     8719if test "x$ac_cv_func_avcodec_decode_video2" = xyes; then :
     8720  cat >>confdefs.h <<_ACEOF
     8721#define HAVE_AVCODEC_DECODE_VIDEO2 1
     8722_ACEOF
     8723
     8724fi
     8725done
     8726
     8727for ac_func in avcodec_decode_video
     8728do :
     8729  ac_fn_cxx_check_func "$LINENO" "avcodec_decode_video" "ac_cv_func_avcodec_decode_video"
     8730if test "x$ac_cv_func_avcodec_decode_video" = xyes; then :
     8731  cat >>confdefs.h <<_ACEOF
     8732#define HAVE_AVCODEC_DECODE_VIDEO 1
     8733_ACEOF
     8734
     8735fi
     8736done
     8737
     8738for ac_func in avformat_open_input
     8739do :
     8740  ac_fn_cxx_check_func "$LINENO" "avformat_open_input" "ac_cv_func_avformat_open_input"
     8741if test "x$ac_cv_func_avformat_open_input" = xyes; then :
     8742  cat >>confdefs.h <<_ACEOF
     8743#define HAVE_AVFORMAT_OPEN_INPUT 1
     8744_ACEOF
     8745
     8746fi
     8747done
     8748
     8749for ac_func in av_open_input_file
     8750do :
     8751  ac_fn_cxx_check_func "$LINENO" "av_open_input_file" "ac_cv_func_av_open_input_file"
     8752if test "x$ac_cv_func_av_open_input_file" = xyes; then :
     8753  cat >>confdefs.h <<_ACEOF
     8754#define HAVE_AV_OPEN_INPUT_FILE 1
     8755_ACEOF
     8756
     8757fi
     8758done
     8759
     8760for ac_func in av_guess_format
     8761do :
     8762  ac_fn_cxx_check_func "$LINENO" "av_guess_format" "ac_cv_func_av_guess_format"
     8763if test "x$ac_cv_func_av_guess_format" = xyes; then :
     8764  cat >>confdefs.h <<_ACEOF
     8765#define HAVE_AV_GUESS_FORMAT 1
     8766_ACEOF
     8767
     8768fi
     8769done
     8770
     8771for ac_func in guess_format
     8772do :
     8773  ac_fn_cxx_check_func "$LINENO" "guess_format" "ac_cv_func_guess_format"
     8774if test "x$ac_cv_func_guess_format" = xyes; then :
     8775  cat >>confdefs.h <<_ACEOF
     8776#define HAVE_GUESS_FORMAT 1
     8777_ACEOF
     8778
     8779fi
     8780done
     8781
     8782for ac_func in av_dump_format
     8783do :
     8784  ac_fn_cxx_check_func "$LINENO" "av_dump_format" "ac_cv_func_av_dump_format"
     8785if test "x$ac_cv_func_av_dump_format" = xyes; then :
     8786  cat >>confdefs.h <<_ACEOF
     8787#define HAVE_AV_DUMP_FORMAT 1
     8788_ACEOF
     8789
     8790fi
     8791done
     8792
     8793for ac_func in dump_format
     8794do :
     8795  ac_fn_cxx_check_func "$LINENO" "dump_format" "ac_cv_func_dump_format"
     8796if test "x$ac_cv_func_dump_format" = xyes; then :
     8797  cat >>confdefs.h <<_ACEOF
     8798#define HAVE_DUMP_FORMAT 1
     8799_ACEOF
     8800
     8801fi
     8802done
     8803
     8804for ac_func in avio_open
     8805do :
     8806  ac_fn_cxx_check_func "$LINENO" "avio_open" "ac_cv_func_avio_open"
     8807if test "x$ac_cv_func_avio_open" = xyes; then :
     8808  cat >>confdefs.h <<_ACEOF
     8809#define HAVE_AVIO_OPEN 1
     8810_ACEOF
     8811
     8812fi
     8813done
     8814
     8815for ac_func in url_fopen
     8816do :
     8817  ac_fn_cxx_check_func "$LINENO" "url_fopen" "ac_cv_func_url_fopen"
     8818if test "x$ac_cv_func_url_fopen" = xyes; then :
     8819  cat >>confdefs.h <<_ACEOF
     8820#define HAVE_URL_FOPEN 1
     8821_ACEOF
     8822
     8823fi
     8824done
     8825
     8826for ac_func in avio_close
     8827do :
     8828  ac_fn_cxx_check_func "$LINENO" "avio_close" "ac_cv_func_avio_close"
     8829if test "x$ac_cv_func_avio_close" = xyes; then :
     8830  cat >>confdefs.h <<_ACEOF
     8831#define HAVE_AVIO_CLOSE 1
     8832_ACEOF
     8833
     8834fi
     8835done
     8836
     8837for ac_func in url_fclose
     8838do :
     8839  ac_fn_cxx_check_func "$LINENO" "url_fclose" "ac_cv_func_url_fclose"
     8840if test "x$ac_cv_func_url_fclose" = xyes; then :
     8841  cat >>confdefs.h <<_ACEOF
     8842#define HAVE_URL_FCLOSE 1
     8843_ACEOF
     8844
     8845fi
     8846done
     8847
     8848for ac_func in avformat_alloc_context
     8849do :
     8850  ac_fn_cxx_check_func "$LINENO" "avformat_alloc_context" "ac_cv_func_avformat_alloc_context"
     8851if test "x$ac_cv_func_avformat_alloc_context" = xyes; then :
     8852  cat >>confdefs.h <<_ACEOF
     8853#define HAVE_AVFORMAT_ALLOC_CONTEXT 1
     8854_ACEOF
     8855
     8856fi
     8857done
     8858
     8859for ac_func in av_alloc_format_context
     8860do :
     8861  ac_fn_cxx_check_func "$LINENO" "av_alloc_format_context" "ac_cv_func_av_alloc_format_context"
     8862if test "x$ac_cv_func_av_alloc_format_context" = xyes; then :
     8863  cat >>confdefs.h <<_ACEOF
     8864#define HAVE_AV_ALLOC_FORMAT_CONTEXT 1
     8865_ACEOF
     8866
     8867fi
     8868done
     8869
     8870for ac_func in av_set_parameters
     8871do :
     8872  ac_fn_cxx_check_func "$LINENO" "av_set_parameters" "ac_cv_func_av_set_parameters"
     8873if test "x$ac_cv_func_av_set_parameters" = xyes; then :
     8874  cat >>confdefs.h <<_ACEOF
     8875#define HAVE_AV_SET_PARAMETERS 1
     8876_ACEOF
     8877
     8878fi
     8879done
     8880
     8881for ac_func in avformat_write_header
     8882do :
     8883  ac_fn_cxx_check_func "$LINENO" "avformat_write_header" "ac_cv_func_avformat_write_header"
     8884if test "x$ac_cv_func_avformat_write_header" = xyes; then :
     8885  cat >>confdefs.h <<_ACEOF
     8886#define HAVE_AVFORMAT_WRITE_HEADER 1
     8887_ACEOF
     8888
     8889fi
     8890done
     8891
     8892for ac_func in av_write_header
     8893do :
     8894  ac_fn_cxx_check_func "$LINENO" "av_write_header" "ac_cv_func_av_write_header"
     8895if test "x$ac_cv_func_av_write_header" = xyes; then :
     8896  cat >>confdefs.h <<_ACEOF
     8897#define HAVE_AV_WRITE_HEADER 1
     8898_ACEOF
     8899
     8900fi
     8901done
     8902
     8903ac_fn_cxx_check_func "$LINENO" "av_write_trailer" "ac_cv_func_av_write_trailer"
     8904if test "x$ac_cv_func_av_write_trailer" = xyes; then :
     8905
     8906else
     8907  as_fn_error $? "oops! no av_write_trailer?!?" "$LINENO" 5
     8908fi
     8909
     8910ac_fn_cxx_check_func "$LINENO" "av_freep" "ac_cv_func_av_freep"
     8911if test "x$ac_cv_func_av_freep" = xyes; then :
     8912
     8913else
     8914  as_fn_error $? "oops! no av_freep ?!?" "$LINENO" 5
     8915fi
     8916
     8917ac_fn_cxx_check_func "$LINENO" "av_free" "ac_cv_func_av_free"
     8918if test "x$ac_cv_func_av_free" = xyes; then :
     8919
     8920else
     8921  as_fn_error $? "oops! no av_free ?!?" "$LINENO" 5
     8922fi
     8923
     8924ac_fn_cxx_check_func "$LINENO" "av_new_stream" "ac_cv_func_av_new_stream"
     8925if test "x$ac_cv_func_av_new_stream" = xyes; then :
     8926
     8927else
     8928  as_fn_error $? "oops! av_new_stream ?!?" "$LINENO" 5
     8929fi
     8930
     8931ac_fn_cxx_check_func "$LINENO" "av_malloc" "ac_cv_func_av_malloc"
     8932if test "x$ac_cv_func_av_malloc" = xyes; then :
     8933
     8934else
     8935  as_fn_error $? "oops! no av_malloc ?!?" "$LINENO" 5
     8936fi
     8937
     8938ac_fn_cxx_check_func "$LINENO" "av_init_packet" "ac_cv_func_av_init_packet"
     8939if test "x$ac_cv_func_av_init_packet" = xyes; then :
     8940
     8941else
     8942  as_fn_error $? "oops! no av_init_packet ?!?" "$LINENO" 5
     8943fi
     8944
     8945ac_fn_cxx_check_func "$LINENO" "av_rescale_q" "ac_cv_func_av_rescale_q"
     8946if test "x$ac_cv_func_av_rescale_q" = xyes; then :
     8947
     8948else
     8949  as_fn_error $? "oops! no av_rescale_q ?!?" "$LINENO" 5
     8950fi
     8951
     8952ac_fn_cxx_check_func "$LINENO" "av_write_frame" "ac_cv_func_av_write_frame"
     8953if test "x$ac_cv_func_av_write_frame" = xyes; then :
     8954
     8955else
     8956  as_fn_error $? "oops! av_write_frame ?!?" "$LINENO" 5
     8957fi
     8958
     8959ac_fn_cxx_check_func "$LINENO" "avformat_alloc_context" "ac_cv_func_avformat_alloc_context"
     8960if test "x$ac_cv_func_avformat_alloc_context" = xyes; then :
     8961
     8962else
     8963  as_fn_error $? "oops! avformat_alloc_context ?!?" "$LINENO" 5
     8964fi
     8965
     8966for ac_func in img_convert
     8967do :
     8968  ac_fn_cxx_check_func "$LINENO" "img_convert" "ac_cv_func_img_convert"
     8969if test "x$ac_cv_func_img_convert" = xyes; then :
     8970  cat >>confdefs.h <<_ACEOF
     8971#define HAVE_IMG_CONVERT 1
     8972_ACEOF
     8973
     8974fi
     8975done
     8976
     8977for ac_func in sws_scale
     8978do :
     8979  ac_fn_cxx_check_func "$LINENO" "sws_scale" "ac_cv_func_sws_scale"
     8980if test "x$ac_cv_func_sws_scale" = xyes; then :
     8981  cat >>confdefs.h <<_ACEOF
     8982#define HAVE_SWS_SCALE 1
     8983_ACEOF
     8984
     8985fi
     8986done
     8987
     8988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     8989/* end confdefs.h.  */
     8990
     8991#define __STDC_CONSTANT_MACROS 1
     8992#include <stdlib.h>
     8993#ifdef HAVE_FFMPEG_AVCODEC_H
     8994# include <ffmpeg/avcodec.h>
     8995#endif
     8996#ifdef HAVE_LIBAVCODEC_AVCODEC_H
     8997# include <libavcodec/avcodec.h>
     8998#endif
     8999int x = AVMEDIA_TYPE_VIDEO;
     9000
     9001int
     9002main ()
     9003{
     9004
     9005  ;
     9006  return 0;
     9007}
     9008_ACEOF
     9009if ac_fn_cxx_try_compile "$LINENO"; then :
     9010  ac_avmedia_type_video="yes"
     9011else
     9012  ac_avmedia_type_video="no"
     9013fi
     9014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     9015if test "$ac_avmedia_type_video" == "yes" ; then
     9016
     9017$as_echo "#define HAVE_AVMEDIA_TYPE_VIDEO 1" >>confdefs.h
     9018
     9019fi
     9020
    85529021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for avcodec_alloc_frame in -lavcodec" >&5
    85539022$as_echo_n "checking for avcodec_alloc_frame in -lavcodec... " >&6; }
     
    86899158
    86909159fi
    8691 
    8692 for ac_func in avformat_alloc_context
    8693 do :
    8694   ac_fn_cxx_check_func "$LINENO" "avformat_alloc_context" "ac_cv_func_avformat_alloc_context"
    8695 if test "x$ac_cv_func_avformat_alloc_context" = xyes; then :
    8696   cat >>confdefs.h <<_ACEOF
    8697 #define HAVE_AVFORMAT_ALLOC_CONTEXT 1
    8698 _ACEOF
    8699 
    8700 fi
    8701 done
    8702 
    8703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for av_free in -lavutil" >&5
    8704 $as_echo_n "checking for av_free in -lavutil... " >&6; }
    8705 if ${ac_cv_lib_avutil_av_free+:} false; then :
    8706   $as_echo_n "(cached) " >&6
    8707 else
    8708   ac_check_lib_save_LIBS=$LIBS
    8709 LIBS="-lavutil  $LIBS"
    8710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    8711 /* end confdefs.h.  */
    8712 
    8713 /* Override any GCC internal prototype to avoid an error.
    8714    Use char because int might match the return type of a GCC
    8715    builtin and then its argument prototype would still apply.  */
    8716 #ifdef __cplusplus
    8717 extern "C"
    8718 #endif
    8719 char av_free ();
    8720 int
    8721 main ()
    8722 {
    8723 return av_free ();
    8724   ;
    8725   return 0;
    8726 }
    8727 _ACEOF
    8728 if ac_fn_cxx_try_link "$LINENO"; then :
    8729   ac_cv_lib_avutil_av_free=yes
    8730 else
    8731   ac_cv_lib_avutil_av_free=no
    8732 fi
    8733 rm -f core conftest.err conftest.$ac_objext \
    8734     conftest$ac_exeext conftest.$ac_ext
    8735 LIBS=$ac_check_lib_save_LIBS
    8736 fi
    8737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avutil_av_free" >&5
    8738 $as_echo "$ac_cv_lib_avutil_av_free" >&6; }
    8739 if test "x$ac_cv_lib_avutil_av_free" = xyes; then :
    8740   cat >>confdefs.h <<_ACEOF
    8741 #define HAVE_LIBAVUTIL 1
    8742 _ACEOF
    8743 
    8744   LIBS="-lavutil $LIBS"
    8745 
    8746 fi
    8747 
    8748 for ac_func in img_convert
    8749 do :
    8750   ac_fn_cxx_check_func "$LINENO" "img_convert" "ac_cv_func_img_convert"
    8751 if test "x$ac_cv_func_img_convert" = xyes; then :
    8752   cat >>confdefs.h <<_ACEOF
    8753 #define HAVE_IMG_CONVERT 1
    8754 _ACEOF
    8755 
    8756 fi
    8757 done
    87589160
    87599161
  • trunk/packages/vizservers/configure.in

    r2667 r2724  
    286286CPPFLAGS=$save_CPPFLAGS
    287287
     288AC_CHECK_LIB(avcodec, main,,AC_MSG_ERROR(requires libavcodec))
     289AC_CHECK_LIB(avutil, main,,AC_MSG_ERROR(requires libavutil))
     290AC_CHECK_LIB(avformat, main,,AC_MSG_ERROR(requires libavformat))
     291AC_CHECK_LIB(swscale, main,,AC_MSG_ERROR(requires libswscale))
     292AC_CHECK_FUNCS(avcodec_decode_video2)
     293AC_CHECK_FUNCS(avcodec_decode_video)
     294AC_CHECK_FUNCS(avformat_open_input)
     295AC_CHECK_FUNCS(av_open_input_file)
     296AC_CHECK_FUNCS(av_guess_format)
     297AC_CHECK_FUNCS(guess_format)
     298AC_CHECK_FUNCS(av_dump_format)
     299AC_CHECK_FUNCS(dump_format)
     300AC_CHECK_FUNCS(avio_open)
     301AC_CHECK_FUNCS(url_fopen)
     302AC_CHECK_FUNCS(avio_close)
     303AC_CHECK_FUNCS(url_fclose)
     304AC_CHECK_FUNCS(avformat_alloc_context)
     305AC_CHECK_FUNCS(av_alloc_format_context)
     306AC_CHECK_FUNCS(av_set_parameters)
     307AC_CHECK_FUNCS(avformat_write_header)
     308AC_CHECK_FUNCS(av_write_header)
     309AC_CHECK_FUNC(av_write_trailer,,
     310  AC_MSG_ERROR(oops! no av_write_trailer?!?))
     311AC_CHECK_FUNC(av_freep,, AC_MSG_ERROR(oops! no av_freep ?!?))
     312AC_CHECK_FUNC(av_free,,AC_MSG_ERROR(oops! no av_free ?!?))
     313AC_CHECK_FUNC(av_new_stream,,AC_MSG_ERROR(oops! av_new_stream ?!?))
     314AC_CHECK_FUNC(av_malloc,, AC_MSG_ERROR(oops! no av_malloc ?!?))
     315AC_CHECK_FUNC(av_init_packet,,AC_MSG_ERROR(oops! no av_init_packet ?!?))
     316AC_CHECK_FUNC(av_rescale_q,,AC_MSG_ERROR(oops! no av_rescale_q ?!?))
     317AC_CHECK_FUNC(av_write_frame,,AC_MSG_ERROR(oops! av_write_frame ?!?))
     318AC_CHECK_FUNC(avformat_alloc_context,,
     319  AC_MSG_ERROR(oops! avformat_alloc_context ?!?))
     320AC_CHECK_FUNCS(img_convert)
     321AC_CHECK_FUNCS(sws_scale)
     322AC_TRY_COMPILE([
     323#define __STDC_CONSTANT_MACROS 1
     324#include <stdlib.h>
     325#ifdef HAVE_FFMPEG_AVCODEC_H
     326# include <ffmpeg/avcodec.h>
     327#endif
     328#ifdef HAVE_LIBAVCODEC_AVCODEC_H
     329# include <libavcodec/avcodec.h>
     330#endif
     331int x = AVMEDIA_TYPE_VIDEO;
     332],, ac_avmedia_type_video="yes", ac_avmedia_type_video="no")
     333if test "$ac_avmedia_type_video" == "yes" ; then
     334  AC_DEFINE(HAVE_AVMEDIA_TYPE_VIDEO,1,[Define if AVMEDIA_TYPE_VIDEO enum exists. ])
     335fi
     336
    288337AC_CHECK_LIB([avcodec], [avcodec_alloc_frame])
    289338# Fallback to deprecated av_alloc_format_context if avformat_alloc_context isn't found
     
    291340    AC_CHECK_LIB([avformat], [av_alloc_format_context], [],
    292341        [AC_MSG_WARN([libavformat not usable])]))
    293 AC_CHECK_FUNCS([avformat_alloc_context])
    294 AC_CHECK_LIB([avutil], [av_free])
    295 AC_CHECK_FUNCS([img_convert])
    296342
    297343
  • trunk/packages/vizservers/nanovis/RpAVTranslate.cpp

    r2720 r2724  
    3535#include "RpAVTranslate.h"
    3636
    37 #if LIBAVUTIL_VERSION_MAJOR < 51
     37#ifndef HAVE_AVMEDIA_TYPE_VIDEO
    3838#define AVMEDIA_TYPE_VIDEO      CODEC_TYPE_VIDEO
     39#endif  /* HAVE_AVMEDIA_TYPE_VIDEO */
     40
     41#ifndef AV_PKT_FLAG_KEY
    3942#define AV_PKT_FLAG_KEY         PKT_FLAG_KEY           
     43#endif
     44
     45#ifndef HAVE_AV_GUESS_FORMAT
    4046#define av_guess_format         guess_format
     47#endif  /*HAVE_AV_GUESS_FORMAT*/
     48
     49#ifndef HAVE_AV_DUMP_FORMAT
    4150#define av_dump_format          dump_format
     51#endif  /*HAVE_AV_DUMP_FORMAT*/
     52
     53#ifndef HAVE_AVIO_OPEN
    4254#define avio_open               url_fopen       
     55#endif  /*HAVE_AVIO_OPEN*/
     56
     57#ifndef HAVE_AVIO_CLOSE
    4358#define avio_close              url_fclose     
    44 #endif  /* LIBAVUTIL_VERSION_MAJOR */
     59#endif  /*HAVE_AVIO_CLOSE*/
    4560
    4661#ifndef M_PI
     
    145160    }
    146161
    147 #if LIBAVUTIL_VERSION_MAJOR < 51
     162#if defined(HAVE_AV_SET_PARAMETERS) && !defined(HAVE_AVFORMAT_WRITE_HEADER)
    148163    /* Set the output parameters (must be done even if no parameters). */
    149164    if (av_set_parameters(_ocPtr, NULL) < 0) {
     
    171186
    172187    /* write the stream header, if any */
    173 #if LIBAVUTIL_VERSION_MAJOR < 51
     188#ifdef HAVE_AVFORMAT_WRITE_HEADER
     189    avformat_write_header(_ocPtr, NULL);
     190#else
    174191    av_write_header(_ocPtr);
    175 #else
    176     avformat_write_header(_ocPtr, NULL);
    177192#endif
    178193    return true;
  • trunk/packages/vizservers/nanovis/nvconf.h.in

    r2648 r2724  
    1010#undef HAVE_ARPA_INET_H
    1111
     12/* Define to 1 if you have the `avcodec_decode_video' function. */
     13#undef HAVE_AVCODEC_DECODE_VIDEO
     14
     15/* Define to 1 if you have the `avcodec_decode_video2' function. */
     16#undef HAVE_AVCODEC_DECODE_VIDEO2
     17
    1218/* Define to 1 if you have the `avformat_alloc_context' function. */
    1319#undef HAVE_AVFORMAT_ALLOC_CONTEXT
    1420
     21/* Define to 1 if you have the `avformat_open_input' function. */
     22#undef HAVE_AVFORMAT_OPEN_INPUT
     23
     24/* Define to 1 if you have the `avformat_write_header' function. */
     25#undef HAVE_AVFORMAT_WRITE_HEADER
     26
     27/* Define to 1 if you have the `avio_close' function. */
     28#undef HAVE_AVIO_CLOSE
     29
     30/* Define to 1 if you have the `avio_open' function. */
     31#undef HAVE_AVIO_OPEN
     32
     33/* Define if AVMEDIA_TYPE_VIDEO enum exists. */
     34#undef HAVE_AVMEDIA_TYPE_VIDEO
     35
     36/* Define to 1 if you have the `av_alloc_format_context' function. */
     37#undef HAVE_AV_ALLOC_FORMAT_CONTEXT
     38
     39/* Define to 1 if you have the `av_dump_format' function. */
     40#undef HAVE_AV_DUMP_FORMAT
     41
     42/* Define to 1 if you have the `av_guess_format' function. */
     43#undef HAVE_AV_GUESS_FORMAT
     44
     45/* Define to 1 if you have the `av_open_input_file' function. */
     46#undef HAVE_AV_OPEN_INPUT_FILE
     47
     48/* Define to 1 if you have the `av_set_parameters' function. */
     49#undef HAVE_AV_SET_PARAMETERS
     50
     51/* Define to 1 if you have the `av_write_header' function. */
     52#undef HAVE_AV_WRITE_HEADER
     53
    1554/* Define to 1 if you have the <Cg/cgGL.h> header file. */
    1655#undef HAVE_CG_CGGL_H
    1756
     57/* Define to 1 if you have the `dump_format' function. */
     58#undef HAVE_DUMP_FORMAT
     59
    1860/* Define to 1 if you have the <dx/dx.h> header file. */
    1961#undef HAVE_DX_DX_H
     
    2870#undef HAVE_FFMPEG_AVUTIL_H
    2971
     72/* Define to 1 if you have the `guess_format' function. */
     73#undef HAVE_GUESS_FORMAT
     74
    3075/* Define to 1 if you have the `img_convert' function. */
    3176#undef HAVE_IMG_CONVERT
     
    55100#undef HAVE_LIBHIGHGUI
    56101
     102/* Define to 1 if you have the `swscale' library (-lswscale). */
     103#undef HAVE_LIBSWSCALE
     104
    57105/* Define to 1 if you have the <memory.h> header file. */
    58106#undef HAVE_MEMORY_H
     
    88136#undef HAVE_STRING_H
    89137
     138/* Define to 1 if you have the `sws_scale' function. */
     139#undef HAVE_SWS_SCALE
     140
    90141/* Define to 1 if you have the <sys/socket.h> header file. */
    91142#undef HAVE_SYS_SOCKET_H
     
    102153/* Define to 1 if you have the <unistd.h> header file. */
    103154#undef HAVE_UNISTD_H
     155
     156/* Define to 1 if you have the `url_fclose' function. */
     157#undef HAVE_URL_FCLOSE
     158
     159/* Define to 1 if you have the `url_fopen' function. */
     160#undef HAVE_URL_FOPEN
    104161
    105162/* Define to 1 if you have the <vtkSmartPointer.h> header file. */
  • trunk/src/core/config.h.in

    r2723 r2724  
    2424/* Define to 1 if you have the `avio_close' function. */
    2525#undef HAVE_AVIO_CLOSE
     26
     27/* Define if AVMEDIA_TYPE_VIDEO enum exists. */
     28#undef HAVE_AVMEDIA_TYPE_VIDEO
    2629
    2730/* Define to 1 if you have the `av_open_input_file' function. */
  • trunk/src/objects/RpVideo.c

    r2723 r2724  
    5555#include "RpVideo.h"
    5656
    57 #if LIBAVUTIL_VERSION_MAJOR < 51
     57#ifndef HAVE_AVMEDIA_TYPE_VIDEO
    5858#define AVMEDIA_TYPE_VIDEO      CODEC_TYPE_VIDEO
     59#endif  /* HAVE_AVMEDIA_TYPE_VIDEO */
     60
     61#ifndef AV_PKT_FLAG_KEY
    5962#define AV_PKT_FLAG_KEY         PKT_FLAG_KEY           
    60 #endif  /* LIBAVUTIL_VERSION_MAJOR */
     63#endif
    6164
    6265#ifndef HAVE_AVIO_CLOSE
Note: See TracChangeset for help on using the changeset viewer.