Changeset e00551fba283031fa8e4036eb044c640cfdb64be
- Timestamp:
- 02/29/08 01:46:50
(5 months ago)
- Author:
- Faustino Osuna <riquedafreak@videolan.org>
- git-committer:
- Faustino Osuna <riquedafreak@videolan.org> 1204246010 +0000
- git-parent:
[1757993049ffe608cd538e2d43aad3cabb68385b]
- git-author:
- Faustino Osuna <riquedafreak@videolan.org> 1204246010 +0000
- Message:
Detect and allow older versions of ffmpeg to be used in conjunction with VLC.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r9f3fa00 |
re00551f |
|
| 3059 | 3059 | CPPFLAGS="${CPPFLAGS} ${FFMPEG_CFLAGS}" |
|---|
| 3060 | 3060 | CFLAGS="${CFLAGS} ${FFMPEG_CFLAGS}" |
|---|
| 3061 | | AC_CHECK_HEADERS(libavcodec/avcodec.h, [], [AC_MSG_ERROR([Missing header file libavcodec/avcodec.h.])] ) |
|---|
| 3062 | | AC_CHECK_HEADERS(libavformat/avformat.h, [], [AC_MSG_ERROR([Missing header file libavformat/avformat.h.])] ) |
|---|
| 3063 | | AC_CHECK_HEADERS(libavutil/avutil.h, [], [AC_MSG_ERROR([Missing header file libavutil/avutil.h.])] ) |
|---|
| | 3061 | AC_CHECK_HEADERS(libavcodec/avcodec.h ffmpeg/avcodec.h) |
|---|
| | 3062 | AC_CHECK_HEADERS(libavformat/avformat.h ffmpeg/avformat.h) |
|---|
| | 3063 | AC_CHECK_HEADERS(libavutil/avutil.h ffmpeg/avformat.h) |
|---|
| | 3064 | |
|---|
| 3064 | 3065 | dnl newer ffmpeg have a separate libpostproc |
|---|
| 3065 | 3066 | PKG_CHECK_MODULES(POSTPROC, libpostproc,[ |
|---|
| … | … | |
| 3069 | 3070 | CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}" |
|---|
| 3070 | 3071 | CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}" |
|---|
| 3071 | | AC_CHECK_HEADERS(libpostproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file libpostproc/postprocess.h.])] ) |
|---|
| | 3072 | AC_CHECK_HEADERS(postproc/postprocess.h) |
|---|
| 3072 | 3073 | if test "${SYS}" = "darwin"; then |
|---|
| 3073 | 3074 | VLC_ADD_BUILTINS([ffmpeg]) |
|---|
| … | … | |
| 3090 | 3091 | VLC_ADD_LIBS([ffmpeg],[${SWSCALE_LIBS}]) |
|---|
| 3091 | 3092 | AC_CHECK_LIB(swscale, sws_getContext, |
|---|
| 3092 | | [AC_CHECK_HEADERS([libavutil/avutil.h libswscale/swscale.h])],[],[-lavutil -lm]) |
|---|
| | 3093 | [AC_CHECK_HEADERS([ffmpeg/avutil.h libavutil/avutil.h ffmpeg/swscale.h libswscale/swscale.h])],[],[-lavutil -lm]) |
|---|
| 3093 | 3094 | ],[ true ]) |
|---|
| 3094 | 3095 | VLC_RESTORE_FLAGS |
|---|
| … | … | |
| 3100 | 3101 | CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}" |
|---|
| 3101 | 3102 | LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg} ${LIBS_ffmpeg}" |
|---|
| 3102 | | AC_CHECK_HEADERS(libavcodec/avcodec.h, [], [AC_MSG_ERROR([Missing header file libavcodec/avcodec.h.])] ) |
|---|
| 3103 | | AC_CHECK_HEADERS(libavformat/avformat.h) |
|---|
| 3104 | | AC_CHECK_HEADERS(libavutil/avutil.h) |
|---|
| 3105 | | AC_CHECK_HEADERS(libpostproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file libpostproc/postprocess.h.])] ) |
|---|
| | 3103 | AC_CHECK_HEADERS(libavcodec/avcodec.h ffmpeg/avcodec.h) |
|---|
| | 3104 | AC_CHECK_HEADERS(libavformat/avformat.h ffmpeg/avformat.h) |
|---|
| | 3105 | AC_CHECK_HEADERS(libavutil/avutil.h ffmpeg/avutil.h) |
|---|
| | 3106 | AC_CHECK_HEADERS(postproc/postprocess.h) |
|---|
| 3106 | 3107 | |
|---|
| 3107 | 3108 | AC_CHECK_LIB(avutil, av_crc_init, [ |
|---|
| … | … | |
| 3128 | 3129 | |
|---|
| 3129 | 3130 | AC_CHECK_LIB(swscale, sws_getContext, [ |
|---|
| 3130 | | AC_CHECK_HEADERS(libswscale/swscale.h) |
|---|
| | 3131 | AC_CHECK_HEADERS(libswscale/swscale.h ffmpeg/swscale.h) |
|---|
| 3131 | 3132 | VLC_ADD_LIBS([ffmpeg],[-lswscale]) ], [], [-lavcodec $LDAVUTIL]) |
|---|
| 3132 | 3133 | LDFLAGS="${LDFLAGS_save}" |
|---|
| 3133 | 3134 | CPPFLAGS="${CPPFLAGS_save}" |
|---|
| 3134 | 3135 | ]) |
|---|
| | 3136 | |
|---|
| | 3137 | if test "$ac_cv_header_libavcodec_avcodec_h" = "no" && test "$ac_cv_header_ffmpeg_avcodec_h" = "no"; then |
|---|
| | 3138 | AC_MSG_ERROR([Missing header file libavcodec/avcodec.h.]) |
|---|
| | 3139 | fi |
|---|
| | 3140 | if test "$ac_cv_header_libavformat_avformat_h" = "no" && test $"ac_cv_header_ffmpeg_avformat_h" = "no"; then |
|---|
| | 3141 | AC_MSG_ERROR([Missing header file libavformat/avformat.h.]) |
|---|
| | 3142 | fi |
|---|
| | 3143 | if test "$ac_cv_header_libavutil_avutil_h" = "no" && test "$ac_cv_header_ffmpeg_avutil_h" = "no"; then |
|---|
| | 3144 | AC_MSG_ERROR([Missing header file libavutil/avutil.h.]) |
|---|
| | 3145 | fi |
|---|
| | 3146 | if test "$ac_cv_header_libswscale_swscale_h" = "no" && test "$ac_cv_header_ffmpeg_swscale_h" = "no"; then |
|---|
| | 3147 | AC_MSG_ERROR([Missing header file libswscale/swscale.h.]) |
|---|
| | 3148 | fi |
|---|
| 3135 | 3149 | fi |
|---|
| 3136 | 3150 | fi |
|---|
| r9f3fa00 |
re00551f |
|
| 88 | 88 | #cmakedefine HAVE_FAAD_H |
|---|
| 89 | 89 | #cmakedefine HAVE_FCNTL_H |
|---|
| | 90 | #cmakedefine HAVE_FFMPEG_AVCODEC_H |
|---|
| | 91 | #cmakedefine HAVE_FFMPEG_AVFORMAT_H |
|---|
| | 92 | #cmakedefine HAVE_FFMPEG_AVUTIL_H |
|---|
| | 93 | #cmakedefine HAVE_FFMPEG_SWSCALE_H |
|---|
| 90 | 94 | #cmakedefine HAVE_LIBAVCODEC_AVCODEC_H |
|---|
| 91 | 95 | #cmakedefine HAVE_LIBAVFORMAT_AVFORMAT_H |
|---|
| r9f3fa00 |
re00551f |
|
| 452 | 452 | set( CMAKE_REQUIRED_FLAGS ${FFmpeg_CFLAGS} ) |
|---|
| 453 | 453 | |
|---|
| 454 | | vlc_check_include_files (libavcodec/avcodec.h) |
|---|
| 455 | | vlc_check_include_files (libavutil/avutil.h) |
|---|
| 456 | | vlc_check_include_files (libswscale/swscale.h) |
|---|
| | 454 | vlc_check_include_files (libavcodec/avcodec.h ffmpeg/avcodec.h) |
|---|
| | 455 | vlc_check_include_files (libavutil/avutil.h ffmpeg/avutil.h) |
|---|
| | 456 | vlc_check_include_files (libswscale/swscale.h ffmpeg/swscale.h) |
|---|
| 457 | 457 | |
|---|
| 458 | 458 | check_include_files ("stdint.h;postproc/postprocess.h" HAVE_POSTPROC_POSTPROCESS_H) |
|---|
| r9f3fa00 |
re00551f |
|
| 36 | 36 | |
|---|
| 37 | 37 | /* ffmpeg header */ |
|---|
| 38 | | #ifdef HAVE_LIBAVCODEC_AVCODEC_H |
|---|
| | 38 | #if defined(HAVE_LIBAVCODEC_AVCODEC_H) |
|---|
| 39 | 39 | # include <libavcodec/avcodec.h> |
|---|
| | 40 | #elif defined(HAVE_FFMPEG_AVCODEC_H) |
|---|
| | 41 | # include <ffmpeg/avcodec.h> |
|---|
| 40 | 42 | #else |
|---|
| 41 | 43 | # include <avcodec.h> |
|---|
| r9f3fa00 |
re00551f |
|
| 33 | 33 | #include <vlc_vout.h> |
|---|
| 34 | 34 | |
|---|
| 35 | | #if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE) |
|---|
| | 35 | #if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE) |
|---|
| 36 | 36 | #include <vlc_filter.h> |
|---|
| 37 | 37 | #endif |
|---|
| 38 | 38 | |
|---|
| 39 | 39 | /* ffmpeg header */ |
|---|
| 40 | | #ifdef HAVE_LIBAVCODEC_AVCODEC_H |
|---|
| | 40 | #if defined(HAVE_LIBAVCODEC_AVCODEC_H) |
|---|
| 41 | 41 | # include <libavcodec/avcodec.h> |
|---|
| | 42 | #elif defined(HAVE_FFMPEG_AVCODEC_H) |
|---|
| | 43 | # include <ffmpeg/avcodec.h> |
|---|
| 42 | 44 | #else |
|---|
| 43 | 45 | # include <avcodec.h> |
|---|
| … | … | |
| 46 | 48 | #include "ffmpeg.h" |
|---|
| 47 | 49 | |
|---|
| 48 | | #if !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) |
|---|
| | 50 | #if !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_FFMPEG_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) |
|---|
| 49 | 51 | void E_(InitLibavcodec) ( vlc_object_t *p_object ); |
|---|
| 50 | 52 | static void ChromaConversion( vout_thread_t *, picture_t *, picture_t * ); |
|---|
| … | … | |
| 362 | 364 | } |
|---|
| 363 | 365 | |
|---|
| 364 | | #endif /* !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) */ |
|---|
| | 366 | #endif /* !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_FFMPEG_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) */ |
|---|
| r9f3fa00 |
re00551f |
|
| 36 | 36 | |
|---|
| 37 | 37 | /* ffmpeg header */ |
|---|
| 38 | | #ifdef HAVE_LIBAVCODEC_AVCODEC_H |
|---|
| | 38 | #if defined(HAVE_LIBAVCODEC_AVCODEC_H) |
|---|
| 39 | 39 | # include <libavcodec/avcodec.h> |
|---|
| | 40 | #elif defined(HAVE_FFMPEG_AVCODEC_H) |
|---|
| | 41 | # include <ffmpeg/avcodec.h> |
|---|
| 40 | 42 | #else |
|---|
| 41 | 43 | # include <avcodec.h> |
|---|
| r9f3fa00 |
re00551f |
|
| 37 | 37 | |
|---|
| 38 | 38 | /* ffmpeg header */ |
|---|
| 39 | | #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H |
|---|
| | 39 | #if defined(HAVE_LIBAVFORMAT_AVFORMAT_H) |
|---|
| 40 | 40 | # include <libavformat/avformat.h> |
|---|
| | 41 | #elif defined(HAVE_FFMPEG_AVFORMAT_H) |
|---|
| | 42 | # include <ffmpeg/avformat.h> |
|---|
| 41 | 43 | #elif defined(HAVE_LIBAVFORMAT_TREE) |
|---|
| 42 | 44 | # include <avformat.h> |
|---|
| … | … | |
| 48 | 50 | |
|---|
| 49 | 51 | /* Version checking */ |
|---|
| 50 | | #if defined(HAVE_LIBAVFORMAT_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT_TREE) |
|---|
| | 52 | #if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE) |
|---|
| 51 | 53 | |
|---|
| 52 | 54 | /***************************************************************************** |
|---|
| r9f3fa00 |
re00551f |
|
| 42 | 42 | /* ffmpeg header */ |
|---|
| 43 | 43 | #define HAVE_MMX 1 |
|---|
| 44 | | #ifdef HAVE_LIBAVCODEC_AVCODEC_H |
|---|
| | 44 | #if defined(HAVE_LIBAVCODEC_AVCODEC_H) |
|---|
| 45 | 45 | # include <libavcodec/avcodec.h> |
|---|
| | 46 | #elif defined(HAVE_FFMPEG_AVCODEC_H) |
|---|
| | 47 | # include <ffmpeg/avcodec.h> |
|---|
| 46 | 48 | #else |
|---|
| 47 | 49 | # include <avcodec.h> |
|---|
| r9f3fa00 |
re00551f |
|
| 35 | 35 | /* ffmpeg header */ |
|---|
| 36 | 36 | #define HAVE_MMX 1 |
|---|
| 37 | | #ifdef HAVE_LIBAVCODEC_AVCODEC_H |
|---|
| | 37 | #if defined(HAVE_LIBAVCODEC_AVCODEC_H) |
|---|
| 38 | 38 | # include <libavcodec/avcodec.h> |
|---|
| | 39 | #elif defined(HAVE_FFMPEG_AVCODEC_H) |
|---|
| | 40 | # include <ffmpeg/avcodec.h> |
|---|
| 39 | 41 | #else |
|---|
| 40 | 42 | # include <avcodec.h> |
|---|
| … | … | |
| 75 | 77 | static const char *enc_hq_list_text[] = { N_("rd"), N_("bits"), N_("simple") }; |
|---|
| 76 | 78 | |
|---|
| 77 | | #if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE) |
|---|
| | 79 | #if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE) |
|---|
| 78 | 80 | static int pi_mode_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; |
|---|
| 79 | 81 | static const char *ppsz_mode_descriptions[] = |
|---|
| … | … | |
| 197 | 199 | ENC_CHROMA_ELIM_TEXT, ENC_CHROMA_ELIM_LONGTEXT, VLC_TRUE ); |
|---|
| 198 | 200 | |
|---|
| 199 | | #if defined(HAVE_LIBAVFORMAT_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT_TREE) |
|---|
| | 201 | #if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE) |
|---|
| 200 | 202 | /* demux submodule */ |
|---|
| 201 | 203 | add_submodule(); |
|---|
| … | … | |
| 213 | 215 | #endif |
|---|
| 214 | 216 | |
|---|
| 215 | | #if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE) |
|---|
| | 217 | #if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE) |
|---|
| 216 | 218 | /* video filter submodule */ |
|---|
| 217 | 219 | add_submodule(); |
|---|
| r9f3fa00 |
re00551f |
|
| 46 | 46 | |
|---|
| 47 | 47 | /* Version checking */ |
|---|
| 48 | | #if defined(HAVE_LIBAVFORMAT_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT_TREE) |
|---|
| | 48 | #if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE) |
|---|
| 49 | 49 | |
|---|
| 50 | 50 | static const char *ppsz_mux_options[] = { |
|---|
| r9f3fa00 |
re00551f |
|
| 32 | 32 | |
|---|
| 33 | 33 | /* ffmpeg header */ |
|---|
| 34 | | #ifdef HAVE_LIBAVCODEC_AVCODEC_H |
|---|
| | 34 | #if defined(HAVE_LIBAVCODEC_AVCODEC_H) |
|---|
| 35 | 35 | # include <libavcodec/avcodec.h> |
|---|
| | 36 | #elif defined(HAVE_FFMPEG_AVCODEC_H) |
|---|
| | 37 | # include <ffmpeg/avcodec.h> |
|---|
| 36 | 38 | #else |
|---|
| 37 | 39 | # include <avcodec.h> |
|---|
| r9f3fa00 |
re00551f |
|
| 35 | 35 | |
|---|
| 36 | 36 | /* ffmpeg headers */ |
|---|
| 37 | | #ifdef HAVE_LIBAVCODEC_AVCODEC_H |
|---|
| | 37 | #if defined(HAVE_LIBAVCODEC_AVCODEC_H) |
|---|
| 38 | 38 | # include <libavcodec/avcodec.h> |
|---|
| | 39 | #elif defined(HAVE_FFMPEG_AVCODEC_H) |
|---|
| | 40 | # include <ffmpeg/avcodec.h> |
|---|
| 39 | 41 | #else |
|---|
| 40 | 42 | # include <avcodec.h> |
|---|
| 41 | 43 | #endif |
|---|
| 42 | 44 | |
|---|
| 43 | | #ifdef HAVE_LIBSWSCALE_SWSCALE_H |
|---|
| | 45 | #if defined(HAVE_LIBSWSCALE_SWSCALE_H) |
|---|
| 44 | 46 | # include <libswscale/swscale.h> |
|---|
| | 47 | #elif defined(HAVE_FFMPEG_H) |
|---|
| | 48 | # include <ffmpeg/swscale.h> |
|---|
| 45 | 49 | #elif defined(HAVE_LIBSWSCALE_TREE) |
|---|
| 46 | 50 | # include <swscale.h> |
|---|
| … | … | |
| 50 | 54 | |
|---|
| 51 | 55 | /* Version checking */ |
|---|
| 52 | | #if ( (defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)) && (LIBSWSCALE_VERSION_INT >= ((0<<16)+(5<<8)+0)) ) |
|---|
| | 56 | #if ( (defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)) && (LIBSWSCALE_VERSION_INT >= ((0<<16)+(5<<8)+0)) ) |
|---|
| 53 | 57 | |
|---|
| 54 | 58 | /***************************************************************************** |
|---|
| r9f3fa00 |
re00551f |
|
| 36 | 36 | |
|---|
| 37 | 37 | /* ffmpeg header */ |
|---|
| 38 | | #ifdef HAVE_LIBAVCODEC_AVCODEC_H |
|---|
| | 38 | #if defined(HAVE_LIBAVCODEC_AVCODEC_H) |
|---|
| 39 | 39 | # include <libavcodec/avcodec.h> |
|---|
| | 40 | #elif defined(HAVE_FFMPEG_AVCODEC_H) |
|---|
| | 41 | # include <ffmpeg/avcodec.h> |
|---|
| 40 | 42 | #else |
|---|
| 41 | 43 | # include <avcodec.h> |
|---|
| … | … | |
| 844 | 846 | dest_pic.linesize[i] = p_pic->p[i].i_pitch; |
|---|
| 845 | 847 | } |
|---|
| 846 | | #if !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) |
|---|
| | 848 | #if !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_FFMPEG_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) |
|---|
| 847 | 849 | img_convert( &dest_pic, PIX_FMT_YUV420P, |
|---|
| 848 | 850 | (AVPicture *)p_ff_pic, |
|---|
| r9f3fa00 |
re00551f |
|
| 36 | 36 | |
|---|
| 37 | 37 | /* ffmpeg header */ |
|---|
| 38 | | #ifdef HAVE_LIBAVCODEC_AVCODEC_H |
|---|
| | 38 | #if defined(HAVE_LIBAVCODEC_AVCODEC_H) |
|---|
| 39 | 39 | # include <libavcodec/avcodec.h> |
|---|
| | 40 | #elif defined(HAVE_FFMPEG_AVCODEC_H) |
|---|
| | 41 | # include <ffmpeg/avcodec.h> |
|---|
| 40 | 42 | #else |
|---|
| 41 | 43 | # include <avcodec.h> |
|---|
| … | … | |
| 44 | 46 | #include "ffmpeg.h" |
|---|
| 45 | 47 | |
|---|
| 46 | | #if !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) |
|---|
| | 48 | #if !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_FFMPEG_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) |
|---|
| 47 | 49 | void E_(InitLibavcodec) ( vlc_object_t *p_object ); |
|---|
| 48 | 50 | static int CheckInit( filter_t *p_filter ); |
|---|
| … | … | |
| 567 | 569 | return p_pic_dst; |
|---|
| 568 | 570 | } |
|---|
| 569 | | #endif /* ( (defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)) */ |
|---|
| | 571 | #endif /* ( (defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)) */ |
|---|
| r9f3fa00 |
re00551f |
|
| 137 | 137 | |
|---|
| 138 | 138 | /* Misc */ |
|---|
| 139 | | #ifdef HAVE_LIBSWSCALE_SWSCALE_H |
|---|
| | 139 | #if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) |
|---|
| 140 | 140 | image_handler_t *p_image; |
|---|
| 141 | 141 | #endif |
|---|
| … | … | |
| 182 | 182 | memset( p_sys, 0, sizeof(decoder_sys_t) ); |
|---|
| 183 | 183 | |
|---|
| 184 | | #ifdef HAVE_LIBSWSCALE_SWSCALE_H |
|---|
| | 184 | #if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) |
|---|
| 185 | 185 | p_sys->p_image = image_HandlerCreate( VLC_OBJECT(p_dec) ); |
|---|
| 186 | 186 | if( !p_sys->p_image ) |
|---|
| … | … | |
| 226 | 226 | p_dec->fmt_out.video.i_chroma = VLC_FOURCC('T','E','X','T'); |
|---|
| 227 | 227 | else |
|---|
| 228 | | #ifdef HAVE_LIBSWSCALE_SWSCALE_H |
|---|
| | 228 | #if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) |
|---|
| 229 | 229 | p_dec->fmt_out.video.i_chroma = VLC_FOURCC('Y','U','V','A'); |
|---|
| 230 | 230 | #else |
|---|
| … | … | |
| 247 | 247 | var_DelCallback( p_dec, "vbi-opaque", Opaque, p_sys ); |
|---|
| 248 | 248 | |
|---|
| 249 | | #ifdef HAVE_LIBSWSCALE_SWSCALE_H |
|---|
| | 249 | #if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) |
|---|
| 250 | 250 | if( p_sys->p_image ) image_HandlerDelete( p_sys->p_image ); |
|---|
| 251 | 251 | #endif |
|---|
| … | … | |
| 324 | 324 | memset( &fmt, 0, sizeof(video_format_t) ); |
|---|
| 325 | 325 | fmt.i_chroma = p_sys->b_text ? VLC_FOURCC('T','E','X','T') : |
|---|
| 326 | | #ifdef HAVE_LIBSWSCALE_SWSCALE_H |
|---|
| | 326 | #if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) |
|---|
| 327 | 327 | VLC_FOURCC('Y','U','V','A'); |
|---|
| 328 | 328 | #else |
|---|
| … | … | |
| 384 | 384 | else |
|---|
| 385 | 385 | { |
|---|
| 386 | | #ifdef HAVE_LIBSWSCALE_SWSCALE_H |
|---|
| | 386 | #if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) |
|---|
| 387 | 387 | video_format_t fmt_in; |
|---|
| 388 | 388 | picture_t *p_pic, *p_dest; |
|---|
| r9f3fa00 |
re00551f |
|
| 39 | 39 | |
|---|
| 40 | 40 | #define HAVE_MMX |
|---|
| 41 | | #ifdef HAVE_LIBAVCODEC_AVCODEC_H |
|---|
| | 41 | #if defined(HAVE_LIBAVCODEC_AVCODEC_H) |
|---|
| | 42 | # include <libavcodec/avcodec.h> |
|---|
| | 43 | #elif defined(HAVE_FFMPEG_AVCODEC_H) |
|---|
| 42 | 44 | # include <ffmpeg/avcodec.h> |
|---|
| 43 | 45 | #else |
|---|