Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
e00551fb
Commit
e00551fb
authored
Feb 29, 2008
by
Faustino Osuna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect and allow older versions of ffmpeg to be used in conjunction with VLC.
parent
17579930
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
85 additions
and
43 deletions
+85
-43
configure.ac
configure.ac
+24
-10
extras/buildsystem/cmake/config.h.cmake
extras/buildsystem/cmake/config.h.cmake
+4
-0
extras/buildsystem/cmake/include/config.cmake
extras/buildsystem/cmake/include/config.cmake
+3
-3
modules/codec/ffmpeg/audio.c
modules/codec/ffmpeg/audio.c
+3
-1
modules/codec/ffmpeg/chroma.c
modules/codec/ffmpeg/chroma.c
+6
-4
modules/codec/ffmpeg/deinterlace.c
modules/codec/ffmpeg/deinterlace.c
+3
-1
modules/codec/ffmpeg/demux.c
modules/codec/ffmpeg/demux.c
+4
-2
modules/codec/ffmpeg/encoder.c
modules/codec/ffmpeg/encoder.c
+3
-1
modules/codec/ffmpeg/ffmpeg.c
modules/codec/ffmpeg/ffmpeg.c
+6
-4
modules/codec/ffmpeg/mux.c
modules/codec/ffmpeg/mux.c
+1
-1
modules/codec/ffmpeg/postprocess.c
modules/codec/ffmpeg/postprocess.c
+3
-1
modules/codec/ffmpeg/scale.c
modules/codec/ffmpeg/scale.c
+7
-3
modules/codec/ffmpeg/video.c
modules/codec/ffmpeg/video.c
+4
-2
modules/codec/ffmpeg/video_filter.c
modules/codec/ffmpeg/video_filter.c
+5
-3
modules/codec/zvbi.c
modules/codec/zvbi.c
+6
-6
modules/stream_out/switcher.c
modules/stream_out/switcher.c
+3
-1
No files found.
configure.ac
View file @
e00551fb
...
@@ -3058,9 +3058,10 @@ dnl Trying with pkg-config
...
@@ -3058,9 +3058,10 @@ dnl Trying with pkg-config
VLC_SAVE_FLAGS
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${FFMPEG_CFLAGS}"
CPPFLAGS="${CPPFLAGS} ${FFMPEG_CFLAGS}"
CFLAGS="${CFLAGS} ${FFMPEG_CFLAGS}"
CFLAGS="${CFLAGS} ${FFMPEG_CFLAGS}"
AC_CHECK_HEADERS(libavcodec/avcodec.h, [], [AC_MSG_ERROR([Missing header file libavcodec/avcodec.h.])] )
AC_CHECK_HEADERS(libavcodec/avcodec.h ffmpeg/avcodec.h)
AC_CHECK_HEADERS(libavformat/avformat.h, [], [AC_MSG_ERROR([Missing header file libavformat/avformat.h.])] )
AC_CHECK_HEADERS(libavformat/avformat.h ffmpeg/avformat.h)
AC_CHECK_HEADERS(libavutil/avutil.h, [], [AC_MSG_ERROR([Missing header file libavutil/avutil.h.])] )
AC_CHECK_HEADERS(libavutil/avutil.h ffmpeg/avformat.h)
dnl newer ffmpeg have a separate libpostproc
dnl newer ffmpeg have a separate libpostproc
PKG_CHECK_MODULES(POSTPROC, libpostproc,[
PKG_CHECK_MODULES(POSTPROC, libpostproc,[
VLC_ADD_CFLAGS([ffmpeg],[${POSTPROC_CFLAGS}])
VLC_ADD_CFLAGS([ffmpeg],[${POSTPROC_CFLAGS}])
...
@@ -3068,7 +3069,7 @@ dnl Trying with pkg-config
...
@@ -3068,7 +3069,7 @@ dnl Trying with pkg-config
],[ true ])
],[ true ])
CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}"
CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}"
CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}"
CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}"
AC_CHECK_HEADERS(
libpostproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file libpostproc/postprocess.h.])]
)
AC_CHECK_HEADERS(
postproc/postprocess.h
)
if test "${SYS}" = "darwin"; then
if test "${SYS}" = "darwin"; then
VLC_ADD_BUILTINS([ffmpeg])
VLC_ADD_BUILTINS([ffmpeg])
else
else
...
@@ -3089,7 +3090,7 @@ dnl Trying with pkg-config
...
@@ -3089,7 +3090,7 @@ dnl Trying with pkg-config
VLC_ADD_CFLAGS([ffmpeg],[${SWSCALE_CFLAGS}])
VLC_ADD_CFLAGS([ffmpeg],[${SWSCALE_CFLAGS}])
VLC_ADD_LIBS([ffmpeg],[${SWSCALE_LIBS}])
VLC_ADD_LIBS([ffmpeg],[${SWSCALE_LIBS}])
AC_CHECK_LIB(swscale, sws_getContext,
AC_CHECK_LIB(swscale, sws_getContext,
[AC_CHECK_HEADERS([
libavutil/avutil
.h libswscale/swscale.h])],[],[-lavutil -lm])
[AC_CHECK_HEADERS([
ffmpeg/avutil.h libavutil/avutil.h ffmpeg/swscale
.h libswscale/swscale.h])],[],[-lavutil -lm])
],[ true ])
],[ true ])
VLC_RESTORE_FLAGS
VLC_RESTORE_FLAGS
],[
],[
...
@@ -3099,10 +3100,10 @@ dnl Trying with pkg-config
...
@@ -3099,10 +3100,10 @@ dnl Trying with pkg-config
dnl
dnl
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg} ${LIBS_ffmpeg}"
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg} ${LIBS_ffmpeg}"
AC_CHECK_HEADERS(libavcodec/avcodec.h
, [], [AC_MSG_ERROR([Missing header file libavcodec/avcodec.h.])]
)
AC_CHECK_HEADERS(libavcodec/avcodec.h
ffmpeg/avcodec.h
)
AC_CHECK_HEADERS(libavformat/avformat.h)
AC_CHECK_HEADERS(libavformat/avformat.h
ffmpeg/avformat.h
)
AC_CHECK_HEADERS(libavutil/avutil.h)
AC_CHECK_HEADERS(libavutil/avutil.h
ffmpeg/avutil.h
)
AC_CHECK_HEADERS(
libpostproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file libpostproc/postprocess.h.])]
)
AC_CHECK_HEADERS(
postproc/postprocess.h
)
AC_CHECK_LIB(avutil, av_crc_init, [
AC_CHECK_LIB(avutil, av_crc_init, [
VLC_ADD_LIBS([ffmpeg],[-lavutil])
VLC_ADD_LIBS([ffmpeg],[-lavutil])
...
@@ -3127,11 +3128,24 @@ dnl Trying with pkg-config
...
@@ -3127,11 +3128,24 @@ dnl Trying with pkg-config
CPPFLAGS="${CPPFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
AC_CHECK_LIB(swscale, sws_getContext, [
AC_CHECK_LIB(swscale, sws_getContext, [
AC_CHECK_HEADERS(libswscale/swscale.h)
AC_CHECK_HEADERS(libswscale/swscale.h
ffmpeg/swscale.h
)
VLC_ADD_LIBS([ffmpeg],[-lswscale]) ], [], [-lavcodec $LDAVUTIL])
VLC_ADD_LIBS([ffmpeg],[-lswscale]) ], [], [-lavcodec $LDAVUTIL])
LDFLAGS="${LDFLAGS_save}"
LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
])
])
if test "$ac_cv_header_libavcodec_avcodec_h" = "no" && test "$ac_cv_header_ffmpeg_avcodec_h" = "no"; then
AC_MSG_ERROR([Missing header file libavcodec/avcodec.h.])
fi
if test "$ac_cv_header_libavformat_avformat_h" = "no" && test $"ac_cv_header_ffmpeg_avformat_h" = "no"; then
AC_MSG_ERROR([Missing header file libavformat/avformat.h.])
fi
if test "$ac_cv_header_libavutil_avutil_h" = "no" && test "$ac_cv_header_ffmpeg_avutil_h" = "no"; then
AC_MSG_ERROR([Missing header file libavutil/avutil.h.])
fi
if test "$ac_cv_header_libswscale_swscale_h" = "no" && test "$ac_cv_header_ffmpeg_swscale_h" = "no"; then
AC_MSG_ERROR([Missing header file libswscale/swscale.h.])
fi
fi
fi
fi
fi
...
...
extras/buildsystem/cmake/config.h.cmake
View file @
e00551fb
...
@@ -87,6 +87,10 @@
...
@@ -87,6 +87,10 @@
#cmakedefine HAVE_ERRNO_H
#cmakedefine HAVE_ERRNO_H
#cmakedefine HAVE_FAAD_H
#cmakedefine HAVE_FAAD_H
#cmakedefine HAVE_FCNTL_H
#cmakedefine HAVE_FCNTL_H
#cmakedefine HAVE_FFMPEG_AVCODEC_H
#cmakedefine HAVE_FFMPEG_AVFORMAT_H
#cmakedefine HAVE_FFMPEG_AVUTIL_H
#cmakedefine HAVE_FFMPEG_SWSCALE_H
#cmakedefine HAVE_LIBAVCODEC_AVCODEC_H
#cmakedefine HAVE_LIBAVCODEC_AVCODEC_H
#cmakedefine HAVE_LIBAVFORMAT_AVFORMAT_H
#cmakedefine HAVE_LIBAVFORMAT_AVFORMAT_H
#cmakedefine HAVE_LIBAVUTIL_AVUTIL_H
#cmakedefine HAVE_LIBAVUTIL_AVUTIL_H
...
...
extras/buildsystem/cmake/include/config.cmake
View file @
e00551fb
...
@@ -451,9 +451,9 @@ if(FFmpeg_FOUND)
...
@@ -451,9 +451,9 @@ if(FFmpeg_FOUND)
set
(
CMAKE_REQUIRED_FLAGS_saved
${
CMAKE_REQUIRED_FLAGS
}
)
set
(
CMAKE_REQUIRED_FLAGS_saved
${
CMAKE_REQUIRED_FLAGS
}
)
set
(
CMAKE_REQUIRED_FLAGS
${
FFmpeg_CFLAGS
}
)
set
(
CMAKE_REQUIRED_FLAGS
${
FFmpeg_CFLAGS
}
)
vlc_check_include_files
(
libavcodec/avcodec.h
)
vlc_check_include_files
(
libavcodec/avcodec.h
ffmpeg/avcodec.h
)
vlc_check_include_files
(
libavutil/avutil.h
)
vlc_check_include_files
(
libavutil/avutil.h
ffmpeg/avutil.h
)
vlc_check_include_files
(
libswscale/swscale.h
)
vlc_check_include_files
(
libswscale/swscale.h
ffmpeg/swscale.h
)
check_include_files
(
"stdint.h;postproc/postprocess.h"
HAVE_POSTPROC_POSTPROCESS_H
)
check_include_files
(
"stdint.h;postproc/postprocess.h"
HAVE_POSTPROC_POSTPROCESS_H
)
vlc_enable_modules
(
ffmpeg
)
vlc_enable_modules
(
ffmpeg
)
...
...
modules/codec/ffmpeg/audio.c
View file @
e00551fb
...
@@ -35,8 +35,10 @@
...
@@ -35,8 +35,10 @@
#include <vlc_input.h>
#include <vlc_input.h>
/* ffmpeg header */
/* ffmpeg header */
#if
def HAVE_LIBAVCODEC_AVCODEC_H
#if
defined(HAVE_LIBAVCODEC_AVCODEC_H)
# include <libavcodec/avcodec.h>
# include <libavcodec/avcodec.h>
#elif defined(HAVE_FFMPEG_AVCODEC_H)
# include <ffmpeg/avcodec.h>
#else
#else
# include <avcodec.h>
# include <avcodec.h>
#endif
#endif
...
...
modules/codec/ffmpeg/chroma.c
View file @
e00551fb
...
@@ -32,20 +32,22 @@
...
@@ -32,20 +32,22 @@
#include <vlc/vlc.h>
#include <vlc/vlc.h>
#include <vlc_vout.h>
#include <vlc_vout.h>
#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)
#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_
FFMPEG_SWSCALE_H) || defined(HAVE_
LIBSWSCALE_TREE)
#include <vlc_filter.h>
#include <vlc_filter.h>
#endif
#endif
/* ffmpeg header */
/* ffmpeg header */
#if
def HAVE_LIBAVCODEC_AVCODEC_H
#if
defined(HAVE_LIBAVCODEC_AVCODEC_H)
# include <libavcodec/avcodec.h>
# include <libavcodec/avcodec.h>
#elif defined(HAVE_FFMPEG_AVCODEC_H)
# include <ffmpeg/avcodec.h>
#else
#else
# include <avcodec.h>
# include <avcodec.h>
#endif
#endif
#include "ffmpeg.h"
#include "ffmpeg.h"
#if !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE)
#if !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_
FFMPEG_SWSCALE_H) && !defined(HAVE_
LIBSWSCALE_TREE)
void
E_
(
InitLibavcodec
)
(
vlc_object_t
*
p_object
);
void
E_
(
InitLibavcodec
)
(
vlc_object_t
*
p_object
);
static
void
ChromaConversion
(
vout_thread_t
*
,
picture_t
*
,
picture_t
*
);
static
void
ChromaConversion
(
vout_thread_t
*
,
picture_t
*
,
picture_t
*
);
...
@@ -361,4 +363,4 @@ void E_(CloseChroma)( vlc_object_t *p_this )
...
@@ -361,4 +363,4 @@ void E_(CloseChroma)( vlc_object_t *p_this )
free
(
p_vout
->
chroma
.
p_sys
);
free
(
p_vout
->
chroma
.
p_sys
);
}
}
#endif
/* !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) */
#endif
/* !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_
FFMPEG_SWSCALE_H) && !defined(HAVE_
LIBSWSCALE_TREE) */
modules/codec/ffmpeg/deinterlace.c
View file @
e00551fb
...
@@ -35,8 +35,10 @@
...
@@ -35,8 +35,10 @@
#include <vlc_filter.h>
#include <vlc_filter.h>
/* ffmpeg header */
/* ffmpeg header */
#if
def HAVE_LIBAVCODEC_AVCODEC_H
#if
defined(HAVE_LIBAVCODEC_AVCODEC_H)
# include <libavcodec/avcodec.h>
# include <libavcodec/avcodec.h>
#elif defined(HAVE_FFMPEG_AVCODEC_H)
# include <ffmpeg/avcodec.h>
#else
#else
# include <avcodec.h>
# include <avcodec.h>
#endif
#endif
...
...
modules/codec/ffmpeg/demux.c
View file @
e00551fb
...
@@ -36,8 +36,10 @@
...
@@ -36,8 +36,10 @@
#include <vlc_meta.h>
#include <vlc_meta.h>
/* ffmpeg header */
/* ffmpeg header */
#if
def HAVE_LIBAVFORMAT_AVFORMAT_H
#if
defined(HAVE_LIBAVFORMAT_AVFORMAT_H)
# include <libavformat/avformat.h>
# include <libavformat/avformat.h>
#elif defined(HAVE_FFMPEG_AVFORMAT_H)
# include <ffmpeg/avformat.h>
#elif defined(HAVE_LIBAVFORMAT_TREE)
#elif defined(HAVE_LIBAVFORMAT_TREE)
# include <avformat.h>
# include <avformat.h>
#endif
#endif
...
@@ -47,7 +49,7 @@
...
@@ -47,7 +49,7 @@
//#define AVFORMAT_DEBUG 1
//#define AVFORMAT_DEBUG 1
/* Version checking */
/* Version checking */
#if defined(HAVE_LIB
AVFORMAT_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT
_TREE)
#if defined(HAVE_LIB
SWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE
_TREE)
/*****************************************************************************
/*****************************************************************************
* demux_sys_t: demux descriptor
* demux_sys_t: demux descriptor
...
...
modules/codec/ffmpeg/encoder.c
View file @
e00551fb
...
@@ -41,8 +41,10 @@
...
@@ -41,8 +41,10 @@
/* ffmpeg header */
/* ffmpeg header */
#define HAVE_MMX 1
#define HAVE_MMX 1
#if
def HAVE_LIBAVCODEC_AVCODEC_H
#if
defined(HAVE_LIBAVCODEC_AVCODEC_H)
# include <libavcodec/avcodec.h>
# include <libavcodec/avcodec.h>
#elif defined(HAVE_FFMPEG_AVCODEC_H)
# include <ffmpeg/avcodec.h>
#else
#else
# include <avcodec.h>
# include <avcodec.h>
#endif
#endif
...
...
modules/codec/ffmpeg/ffmpeg.c
View file @
e00551fb
...
@@ -34,8 +34,10 @@
...
@@ -34,8 +34,10 @@
/* ffmpeg header */
/* ffmpeg header */
#define HAVE_MMX 1
#define HAVE_MMX 1
#if
def HAVE_LIBAVCODEC_AVCODEC_H
#if
defined(HAVE_LIBAVCODEC_AVCODEC_H)
# include <libavcodec/avcodec.h>
# include <libavcodec/avcodec.h>
#elif defined(HAVE_FFMPEG_AVCODEC_H)
# include <ffmpeg/avcodec.h>
#else
#else
# include <avcodec.h>
# include <avcodec.h>
#endif
#endif
...
@@ -74,7 +76,7 @@ static const char *nloopf_list_text[] =
...
@@ -74,7 +76,7 @@ static const char *nloopf_list_text[] =
static
const
char
*
enc_hq_list
[]
=
{
"rd"
,
"bits"
,
"simple"
};
static
const
char
*
enc_hq_list
[]
=
{
"rd"
,
"bits"
,
"simple"
};
static
const
char
*
enc_hq_list_text
[]
=
{
N_
(
"rd"
),
N_
(
"bits"
),
N_
(
"simple"
)
};
static
const
char
*
enc_hq_list_text
[]
=
{
N_
(
"rd"
),
N_
(
"bits"
),
N_
(
"simple"
)
};
#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)
#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_
FFMPEG_SWSCALE_H) || defined(HAVE_
LIBSWSCALE_TREE)
static
int
pi_mode_values
[]
=
{
0
,
1
,
2
,
4
,
8
,
5
,
6
,
9
,
10
};
static
int
pi_mode_values
[]
=
{
0
,
1
,
2
,
4
,
8
,
5
,
6
,
9
,
10
};
static
const
char
*
ppsz_mode_descriptions
[]
=
static
const
char
*
ppsz_mode_descriptions
[]
=
{
N_
(
"Fast bilinear"
),
N_
(
"Bilinear"
),
N_
(
"Bicubic (good quality)"
),
{
N_
(
"Fast bilinear"
),
N_
(
"Bilinear"
),
N_
(
"Bicubic (good quality)"
),
...
@@ -196,7 +198,7 @@ vlc_module_begin();
...
@@ -196,7 +198,7 @@ vlc_module_begin();
add_integer
(
ENC_CFG_PREFIX
"chroma-elim-threshold"
,
0
,
NULL
,
add_integer
(
ENC_CFG_PREFIX
"chroma-elim-threshold"
,
0
,
NULL
,
ENC_CHROMA_ELIM_TEXT
,
ENC_CHROMA_ELIM_LONGTEXT
,
VLC_TRUE
);
ENC_CHROMA_ELIM_TEXT
,
ENC_CHROMA_ELIM_LONGTEXT
,
VLC_TRUE
);
#if defined(HAVE_LIB
AVFORMAT_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT
_TREE)
#if defined(HAVE_LIB
SWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE
_TREE)
/* demux submodule */
/* demux submodule */
add_submodule
();
add_submodule
();
set_description
(
_
(
"FFmpeg demuxer"
)
);
set_description
(
_
(
"FFmpeg demuxer"
)
);
...
@@ -212,7 +214,7 @@ vlc_module_begin();
...
@@ -212,7 +214,7 @@ vlc_module_begin();
set_callbacks
(
E_
(
OpenMux
),
E_
(
CloseMux
)
);
set_callbacks
(
E_
(
OpenMux
),
E_
(
CloseMux
)
);
#endif
#endif
#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)
#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_
FFMPEG_SWSCALE_H) || defined(HAVE_
LIBSWSCALE_TREE)
/* video filter submodule */
/* video filter submodule */
add_submodule
();
add_submodule
();
set_description
(
_
(
"Video scaling filter"
)
);
set_description
(
_
(
"Video scaling filter"
)
);
...
...
modules/codec/ffmpeg/mux.c
View file @
e00551fb
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
//#define AVFORMAT_DEBUG 1
//#define AVFORMAT_DEBUG 1
/* Version checking */
/* Version checking */
#if defined(HAVE_LIB
AVFORMAT_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT
_TREE)
#if defined(HAVE_LIB
SWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE
_TREE)
static
const
char
*
ppsz_mux_options
[]
=
{
static
const
char
*
ppsz_mux_options
[]
=
{
"mux"
,
NULL
"mux"
,
NULL
...
...
modules/codec/ffmpeg/postprocess.c
View file @
e00551fb
...
@@ -31,8 +31,10 @@
...
@@ -31,8 +31,10 @@
#include <vlc_codec.h>
#include <vlc_codec.h>
/* ffmpeg header */
/* ffmpeg header */
#if
def HAVE_LIBAVCODEC_AVCODEC_H
#if
defined(HAVE_LIBAVCODEC_AVCODEC_H)
# include <libavcodec/avcodec.h>
# include <libavcodec/avcodec.h>
#elif defined(HAVE_FFMPEG_AVCODEC_H)
# include <ffmpeg/avcodec.h>
#else
#else
# include <avcodec.h>
# include <avcodec.h>
#endif
#endif
...
...
modules/codec/ffmpeg/scale.c
View file @
e00551fb
...
@@ -34,14 +34,18 @@
...
@@ -34,14 +34,18 @@
#include <vlc_filter.h>
#include <vlc_filter.h>
/* ffmpeg headers */
/* ffmpeg headers */
#if
def HAVE_LIBAVCODEC_AVCODEC_H
#if
defined(HAVE_LIBAVCODEC_AVCODEC_H)
# include <libavcodec/avcodec.h>
# include <libavcodec/avcodec.h>
#elif defined(HAVE_FFMPEG_AVCODEC_H)
# include <ffmpeg/avcodec.h>
#else
#else
# include <avcodec.h>
# include <avcodec.h>
#endif
#endif
#if
def HAVE_LIBSWSCALE_SWSCALE_H
#if
defined(HAVE_LIBSWSCALE_SWSCALE_H)
# include <libswscale/swscale.h>
# include <libswscale/swscale.h>
#elif defined(HAVE_FFMPEG_H)
# include <ffmpeg/swscale.h>
#elif defined(HAVE_LIBSWSCALE_TREE)
#elif defined(HAVE_LIBSWSCALE_TREE)
# include <swscale.h>
# include <swscale.h>
#endif
#endif
...
@@ -49,7 +53,7 @@
...
@@ -49,7 +53,7 @@
#include "ffmpeg.h"
#include "ffmpeg.h"
/* Version checking */
/* Version checking */
#if ( (defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)) && (LIBSWSCALE_VERSION_INT >= ((0<<16)+(5<<8)+0)) )
#if ( (defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_
FFMPEG_SWSCALE_H) || defined(HAVE_
LIBSWSCALE_TREE)) && (LIBSWSCALE_VERSION_INT >= ((0<<16)+(5<<8)+0)) )
/*****************************************************************************
/*****************************************************************************
* filter_sys_t : filter descriptor
* filter_sys_t : filter descriptor
...
...
modules/codec/ffmpeg/video.c
View file @
e00551fb
...
@@ -35,8 +35,10 @@
...
@@ -35,8 +35,10 @@
#include <vlc_input.h>
/* hmmm, just for INPUT_RATE_DEFAULT */
#include <vlc_input.h>
/* hmmm, just for INPUT_RATE_DEFAULT */
/* ffmpeg header */
/* ffmpeg header */
#if
def HAVE_LIBAVCODEC_AVCODEC_H
#if
defined(HAVE_LIBAVCODEC_AVCODEC_H)
# include <libavcodec/avcodec.h>
# include <libavcodec/avcodec.h>
#elif defined(HAVE_FFMPEG_AVCODEC_H)
# include <ffmpeg/avcodec.h>
#else
#else
# include <avcodec.h>
# include <avcodec.h>
#endif
#endif
...
@@ -843,7 +845,7 @@ static void ffmpeg_CopyPicture( decoder_t *p_dec,
...
@@ -843,7 +845,7 @@ static void ffmpeg_CopyPicture( decoder_t *p_dec,
dest_pic
.
data
[
i
]
=
p_pic
->
p
[
i
].
p_pixels
;
dest_pic
.
data
[
i
]
=
p_pic
->
p
[
i
].
p_pixels
;
dest_pic
.
linesize
[
i
]
=
p_pic
->
p
[
i
].
i_pitch
;
dest_pic
.
linesize
[
i
]
=
p_pic
->
p
[
i
].
i_pitch
;
}
}
#if !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE)
#if !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_
FFMPEG_SWSCALE_H) && !defined(HAVE_
LIBSWSCALE_TREE)
img_convert
(
&
dest_pic
,
PIX_FMT_YUV420P
,
img_convert
(
&
dest_pic
,
PIX_FMT_YUV420P
,
(
AVPicture
*
)
p_ff_pic
,
(
AVPicture
*
)
p_ff_pic
,
p_sys
->
p_context
->
pix_fmt
,
p_sys
->
p_context
->
pix_fmt
,
...
...
modules/codec/ffmpeg/video_filter.c
View file @
e00551fb
...
@@ -35,15 +35,17 @@
...
@@ -35,15 +35,17 @@
#include <vlc_filter.h>
#include <vlc_filter.h>
/* ffmpeg header */
/* ffmpeg header */
#if
def HAVE_LIBAVCODEC_AVCODEC_H
#if
defined(HAVE_LIBAVCODEC_AVCODEC_H)
# include <libavcodec/avcodec.h>
# include <libavcodec/avcodec.h>
#elif defined(HAVE_FFMPEG_AVCODEC_H)
# include <ffmpeg/avcodec.h>
#else
#else
# include <avcodec.h>
# include <avcodec.h>
#endif
#endif
#include "ffmpeg.h"
#include "ffmpeg.h"
#if !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE)
#if !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_
FFMPEG_SWSCALE_H) && !defined(HAVE_
LIBSWSCALE_TREE)
void
E_
(
InitLibavcodec
)
(
vlc_object_t
*
p_object
);
void
E_
(
InitLibavcodec
)
(
vlc_object_t
*
p_object
);
static
int
CheckInit
(
filter_t
*
p_filter
);
static
int
CheckInit
(
filter_t
*
p_filter
);
static
picture_t
*
Process
(
filter_t
*
p_filter
,
picture_t
*
p_pic
);
static
picture_t
*
Process
(
filter_t
*
p_filter
,
picture_t
*
p_pic
);
...
@@ -566,4 +568,4 @@ static picture_t *Process( filter_t *p_filter, picture_t *p_pic )
...
@@ -566,4 +568,4 @@ static picture_t *Process( filter_t *p_filter, picture_t *p_pic )
p_pic
->
pf_release
(
p_pic
);
p_pic
->
pf_release
(
p_pic
);
return
p_pic_dst
;
return
p_pic_dst
;
}
}
#endif
/* ( (defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)) */
#endif
/* ( (defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_
FFMPEG_SWSCALE_H) || defined(HAVE_
LIBSWSCALE_TREE)) */
modules/codec/zvbi.c
View file @
e00551fb
...
@@ -136,7 +136,7 @@ struct decoder_sys_t
...
@@ -136,7 +136,7 @@ struct decoder_sys_t
int
i_align
;
int
i_align
;
/* Misc */
/* Misc */
#if
def HAVE_LIBSWSCALE_SWSCALE_H
#if
defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H)
image_handler_t
*
p_image
;
image_handler_t
*
p_image
;
#endif
#endif
};
};
...
@@ -181,7 +181,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -181,7 +181,7 @@ static int Open( vlc_object_t *p_this )
}
}
memset
(
p_sys
,
0
,
sizeof
(
decoder_sys_t
)
);
memset
(
p_sys
,
0
,
sizeof
(
decoder_sys_t
)
);
#if
def HAVE_LIBSWSCALE_SWSCALE_H
#if
defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H)
p_sys
->
p_image
=
image_HandlerCreate
(
VLC_OBJECT
(
p_dec
)
);
p_sys
->
p_image
=
image_HandlerCreate
(
VLC_OBJECT
(
p_dec
)
);
if
(
!
p_sys
->
p_image
)
if
(
!
p_sys
->
p_image
)
{
{
...
@@ -225,7 +225,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -225,7 +225,7 @@ static int Open( vlc_object_t *p_this )
if
(
p_sys
->
b_text
)
if
(
p_sys
->
b_text
)
p_dec
->
fmt_out
.
video
.
i_chroma
=
VLC_FOURCC
(
'T'
,
'E'
,
'X'
,
'T'
);
p_dec
->
fmt_out
.
video
.
i_chroma
=
VLC_FOURCC
(
'T'
,
'E'
,
'X'
,
'T'
);
else
else
#if
def HAVE_LIBSWSCALE_SWSCALE_H
#if
defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H)
p_dec
->
fmt_out
.
video
.
i_chroma
=
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'A'
);
p_dec
->
fmt_out
.
video
.
i_chroma
=
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'A'
);
#else
#else
p_dec
->
fmt_out
.
video
.
i_chroma
=
VLC_FOURCC
(
'R'
,
'G'
,
'B'
,
'A'
);
p_dec
->
fmt_out
.
video
.
i_chroma
=
VLC_FOURCC
(
'R'
,
'G'
,
'B'
,
'A'
);
...
@@ -246,7 +246,7 @@ static void Close( vlc_object_t *p_this )
...
@@ -246,7 +246,7 @@ static void Close( vlc_object_t *p_this )
var_DelCallback
(
p_dec
,
"vbi-page"
,
RequestPage
,
p_sys
);
var_DelCallback
(
p_dec
,
"vbi-page"
,
RequestPage
,
p_sys
);
var_DelCallback
(
p_dec
,
"vbi-opaque"
,
Opaque
,
p_sys
);
var_DelCallback
(
p_dec
,
"vbi-opaque"
,
Opaque
,
p_sys
);
#if
def HAVE_LIBSWSCALE_SWSCALE_H
#if
defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H)
if
(
p_sys
->
p_image
)
image_HandlerDelete
(
p_sys
->
p_image
);
if
(
p_sys
->
p_image
)
image_HandlerDelete
(
p_sys
->
p_image
);
#endif
#endif
if
(
p_sys
->
p_vbi_dec
)
vbi_decoder_delete
(
p_sys
->
p_vbi_dec
);
if
(
p_sys
->
p_vbi_dec
)
vbi_decoder_delete
(
p_sys
->
p_vbi_dec
);
...
@@ -323,7 +323,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
...
@@ -323,7 +323,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
/* Create a new subpicture region */
/* Create a new subpicture region */
memset
(
&
fmt
,
0
,
sizeof
(
video_format_t
)
);
memset
(
&
fmt
,
0
,
sizeof
(
video_format_t
)
);
fmt
.
i_chroma
=
p_sys
->
b_text
?
VLC_FOURCC
(
'T'
,
'E'
,
'X'
,
'T'
)
:
fmt
.
i_chroma
=
p_sys
->
b_text
?
VLC_FOURCC
(
'T'
,
'E'
,
'X'
,
'T'
)
:
#if
def HAVE_LIBSWSCALE_SWSCALE_H
#if
defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H)
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'A'
);
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'A'
);
#else
#else
VLC_FOURCC
(
'R'
,
'G'
,
'B'
,
'A'
);
VLC_FOURCC
(
'R'
,
'G'
,
'B'
,
'A'
);
...
@@ -383,7 +383,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
...
@@ -383,7 +383,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
}
}
else
else
{
{
#if
def HAVE_LIBSWSCALE_SWSCALE_H
#if
defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H)
video_format_t
fmt_in
;
video_format_t
fmt_in
;
picture_t
*
p_pic
,
*
p_dest
;
picture_t
*
p_pic
,
*
p_dest
;
...
...
modules/stream_out/switcher.c
View file @
e00551fb
...
@@ -38,7 +38,9 @@
...
@@ -38,7 +38,9 @@
#include <vlc_network.h>
#include <vlc_network.h>
#define HAVE_MMX
#define HAVE_MMX
#ifdef HAVE_LIBAVCODEC_AVCODEC_H
#if defined(HAVE_LIBAVCODEC_AVCODEC_H)
# include <libavcodec/avcodec.h>
#elif defined(HAVE_FFMPEG_AVCODEC_H)
# include <ffmpeg/avcodec.h>
# include <ffmpeg/avcodec.h>
#else
#else
# include <avcodec.h>
# include <avcodec.h>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment