Changeset ebbc287d752e33efd2bdb74fbc4916134df00bf7

Show
Ignore:
Timestamp:
06/03/08 11:23:11 (3 months ago)
Author:
Antoine Cellerier <dionoea@videolan.org>
git-committer:
Antoine Cellerier <dionoea@videolan.org> 1212484991 +0200
git-parent:

[e81f8e4ca21f28b3449b8922b6b81e12c1e56a4b]

git-author:
Antoine Cellerier <dionoea@videolan.org> 1212484991 +0200
Message:

Add fallback to img_resample based plugin if swscale isn't available on the system. img_resample will be built as a seperate module than avcodec to prevent avcodec from refusing to dlopen if img_resample is unavailable (debian...).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • configure.ac

    re81f8e4 rebbc287  
    193193    VLC_ADD_LDFLAGS([vlc],[-Wl,-undefined,dynamic_lookup]) 
    194194    VLC_ADD_LDFLAGS([libvlc_control],[-Wl,dynamic_lookup]) 
    195     VLC_ADD_LDFLAGS([avcodec avformat swscale postproc i420_rgb_mmx x264],[-Wl,-read_only_relocs,suppress]) 
     195    VLC_ADD_LDFLAGS([avcodec avformat swscale imgresample postproc i420_rgb_mmx x264],[-Wl,-read_only_relocs,suppress]) 
    196196    VLC_ADD_CFLAGS([motion],[-fconstant-cfstrings]) 
    197197    VLC_ADD_LDFLAGS([libvlc],[-Wl,-framework,Cocoa,-framework,CoreFoundation]) 
     
    646646]) 
    647647AC_CHECK_LIB(m,pow,[ 
    648   VLC_ADD_LIBS([avcodec avformat swscale postproc ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer spatializer param_eq libvlc vorbis freetype mod mpc dmo quicktime realaudio realvideo galaktos opengl],[-lm]) 
     648  VLC_ADD_LIBS([avcodec avformat swscale imgresample postproc ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer spatializer param_eq libvlc vorbis freetype mod mpc dmo quicktime realaudio realvideo galaktos opengl],[-lm]) 
    649649]) 
    650650AC_CHECK_LIB(m,sqrt,[ 
     
    29382938      VLC_RESTORE_FLAGS 
    29392939    ],[ 
    2940       AC_MSG_ERROR([Could not find libavcodec or libavutil.]) 
     2940      AC_MSG_ERROR([Could not find libavcodec or libavutil. Use --disable-avcodec to ignore this error.]) 
    29412941  ]) 
    29422942fi 
     
    29632963      VLC_RESTORE_FLAGS 
    29642964    ],[ 
    2965       AC_MSG_ERROR([Could not find libavformat, libavcodec or libavutil.]) 
     2965      AC_MSG_ERROR([Could not find libavformat, libavcodec or libavutil. Use --disable-avformat to ignore this error.]) 
    29662966  ]) 
    29672967fi 
     
    29872987      VLC_RESTORE_FLAGS 
    29882988    ],[ 
    2989       AC_MSG_ERROR([Could not find libswscale or libavutil.]) 
     2989      AC_MSG_WARN([Could not find libswscale or libavutil. Trying to enable imgresample.]) 
     2990      enable_imgresample=yes 
     2991  ]) 
     2992fi 
     2993 
     2994dnl 
     2995dnl  avcodec (deprecated API) image scaling and conversion plugin 
     2996dnl 
     2997dnl  This is build as a seperate module than the avcodec one to prevent 
     2998dnl  stupid run time library load errors from disabling most codecs 
     2999dnl  from VLC. 
     3000dnl 
     3001 
     3002AC_ARG_ENABLE(imgresample, 
     3003[  --enable-imgresample deprecated libavcodec image scaling and conversion (default disabled)]) 
     3004if test "${enable_imgresample}" = "yes" 
     3005then 
     3006  PKG_CHECK_MODULES(IMGRESAMPLE,[libavcodec, libavutil], 
     3007    [ 
     3008      VLC_SAVE_FLAGS 
     3009      CPPFLAGS="${CPPFLAGS} ${IMGRESAMPLE_CFLAGS}" 
     3010      CFLAGS="${CFLAGS} ${IMGRESAMPLE_CFLAGS}" 
     3011      LIBS="${CFLAGS} ${IMGRESAMPLE_LIBS}" 
     3012      AC_CHECK_HEADERS(libavcodec/avcodec.h ffmpeg/avcodec.h) 
     3013      AC_CHECK_HEADERS(libavutil/avutil.h ffmpeg/avutil.h) 
     3014      AC_CHECK_LIB(avcodec,img_resample, 
     3015        [ 
     3016          VLC_ADD_PLUGIN([imgresample]) 
     3017          VLC_ADD_LIBS([imgresample],[$IMGRESAMPLE_LIBS]) 
     3018          VLC_ADD_CFLAGS([imgresample],[$IMGRESAMPLE_CFLAGS]) 
     3019        ],[ 
     3020          AC_MSG_WARN([Could not find img_resample in libavcodec.]) 
     3021          if test "${enable_swscale}" != "no" 
     3022          then 
     3023            AC_MSG_ERROR([swscale (and its fallback module imgresample) support will be missing. Use --disable-swscale to ignore this error. (This basically means that you will be missing any good software scaling module and some video chroma converters.)]) 
     3024          fi 
     3025        ]) 
     3026      VLC_RESTORE_FLAGS 
     3027    ],[ 
     3028      AC_MSG_WARN([Could not find libavcodec or libavutil.]) 
    29903029  ]) 
    29913030fi 
  • modules/codec/ffmpeg/Modules.am

    rb538efd rebbc287  
    3737    $(NULL) 
    3838 
     39# FIXME 
     40SOURCES_imgresample = \ 
     41    avcodec.c \ 
     42    avcodec.h \ 
     43    video.c \ 
     44    audio.c \ 
     45    deinterlace.c \ 
     46    $(NULL) 
     47 
    3948SOURCES_postproc = \ 
    4049    postprocess.c \ 
  • modules/codec/ffmpeg/avcodec.c

    ra519cac rebbc287  
    9090#if defined(MODULE_NAME_is_ffmpegaltivec) \ 
    9191     || (defined(CAN_COMPILE_ALTIVEC) && !defined(NO_ALTIVEC_IN_FFMPEG)) 
    92     set_description( N_("AltiVec FFmpeg audio/video decoder/encoder ((MS)MPEG4,SVQ1,H263,WMV,WMA)") ); 
     92    set_description( N_("AltiVec FFmpeg audio/video decoder ((MS)MPEG4,SVQ1,H263,WMV,WMA)") ); 
    9393    /*add_requirement( ALTIVEC );*/ 
    9494    set_capability( "decoder", 71 ); 
    9595#else 
    96     set_description( N_("FFmpeg audio/video decoders/encoders") ); 
     96    set_description( N_("FFmpeg audio/video decoder") ); 
    9797    set_help( MODULE_DESCRIPTION ); 
    9898    set_capability( "decoder", 70 );