[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcvd-members] libcvd configure configure.in cvd_src/videofile...
From: |
Edward Rosten |
Subject: |
[libcvd-members] libcvd configure configure.in cvd_src/videofile... |
Date: |
Tue, 19 Apr 2011 13:23:32 +0000 |
CVSROOT: /cvsroot/libcvd
Module name: libcvd
Changes by: Edward Rosten <edrosten> 11/04/19 13:23:32
Modified files:
. : configure configure.in
cvd_src : videofilebuffer.cc
Log message:
Remove support for ancient (2005 and earlier) versions of ffmpeg.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/configure?cvsroot=libcvd&r1=1.158&r2=1.159
http://cvs.savannah.gnu.org/viewcvs/libcvd/configure.in?cvsroot=libcvd&r1=1.159&r2=1.160
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd_src/videofilebuffer.cc?cvsroot=libcvd&r1=1.17&r2=1.18
Patches:
Index: configure
===================================================================
RCS file: /cvsroot/libcvd/libcvd/configure,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -b -r1.158 -r1.159
--- configure 19 Apr 2011 13:12:06 -0000 1.158
+++ configure 19 Apr 2011 13:23:31 -0000 1.159
@@ -11641,156 +11641,6 @@
if test "$enable_gpl" != no && test "$enable_gpl" != ""
then
-
-
-
-
-for ac_header in ffmpeg/avcodec.h ffmpeg/avformat.h ffmpeg/swscale.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- $as_echo_n "(cached) " >&6
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
- yes:no: )
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler,
rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by
the preprocessor!" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the
compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result"
>&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be
compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing
prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite
headers?" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf
documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But
Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be
Compiled\"" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the
preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's
result" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the
compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take
precedence" >&2;}
-
- ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- $as_echo_n "(cached) " >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-
-fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ffmpeg_old_headers=1
-fi
-
-done
-
-
{ $as_echo "$as_me:$LINENO: checking for ffmpeg headers" >&5
$as_echo_n "checking for ffmpeg headers... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
Index: configure.in
===================================================================
RCS file: /cvsroot/libcvd/libcvd/configure.in,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -b -r1.159 -r1.160
--- configure.in 19 Apr 2011 13:12:06 -0000 1.159
+++ configure.in 19 Apr 2011 13:23:31 -0000 1.160
@@ -794,9 +794,6 @@
CHECK_FOR_OPTION(ffmpeg, [
if test "$enable_gpl" != no && test "$enable_gpl" != ""
then
-
- AC_CHECK_HEADERS(ffmpeg/avcodec.h ffmpeg/avformat.h
ffmpeg/swscale.h, [ffmpeg_old_headers=1], [])
-
AC_MSG_CHECKING([for ffmpeg headers])
AC_COMPILE_IFELSE([
#define __STDC_CONSTANT_MACROS
@@ -806,12 +803,8 @@
int main(){}
], [ ffmpeg_new_headers=1], [])
- if test "$ffmpeg_old_headers" == 1 || test
"$ffmpeg_new_headers" == 1
- then
- if test "$ffmpeg_old_headers" == 1
+ if test "$ffmpeg_new_headers" == 1
then
- AC_DEFINE(CVD_INTERNAL_HAVE_FFMPEG_OLD_HEADERS,
1)
- fi
AC_CHECK_LIB(avutil, main, [], [a=1])
AC_CHECK_LIB(avformat, av_open_input_file, [], [a=1])
@@ -825,22 +818,6 @@
a=1
AC_MSG_WARN([FFMPEG currently requires the use of --enable-gpl])
fi
- #if test "$with_ffmpeg" != yes
- #then
-# APPEND(LIBS, [-L $with_ffmpeg])
-# fi
-# if test "`$CXX -dumpversion`" = 4.1.0
-# then
-# APPEND(CXXFLAGS, -D__STDC_CONSTANT_MACROS)
-# fi
-
- #Old ffmpeg?
- #AC_CHECK_HEADERS(ffmpeg/avcodec.h ffmpeg/avformat.h, [], [a=1])
- #AC_CHECK_LIB(avutil, main, [], [a=1])
- #AC_CHECK_LIB(avformat, av_open_input_file, [], [a=1])
- #AC_CHECK_LIB(avformat, av_read_frame, [ffmpeg_recent=yes], [a=1])
#only in >= 0.4.9
- #AC_CHECK_LIB(avcodec, avcodec_open, [], [a=1])
-
])
AC_CHECK_PROG(docs, doxygen, docs, no)
Index: cvd_src/videofilebuffer.cc
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd_src/videofilebuffer.cc,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- cvd_src/videofilebuffer.cc 19 Apr 2011 13:12:06 -0000 1.17
+++ cvd_src/videofilebuffer.cc 19 Apr 2011 13:23:32 -0000 1.18
@@ -134,11 +134,7 @@
/// What is the (expected) frame rate of this video
buffer, in frames per second?
double frames_per_second()
{
- #if LIBAVCODEC_BUILD >= 4754
return pCodecContext->time_base.den /
static_cast<double>(pCodecContext->time_base.num);
- #else
- return pCodecContext->frame_rate /
static_cast<double>(pCodecContext->frame_rate_base);
- #endif
};
/// What is the path to the video file?
@@ -212,23 +208,14 @@
video_stream = -1;
for(int i=0; i < pFormatContext->nb_streams && video_stream ==
-1; i++)
{
- #if LIBAVFORMAT_BUILD >= 4629
if(pFormatContext->streams[i]->codec->codec_type ==
CODEC_TYPE_VIDEO)
video_stream = i; // Found one!
- #else
- if(pFormatContext->streams[i]->codec.codec_type ==
CODEC_TYPE_VIDEO)
- video_stream = i; // Found one!
- #endif
}
if(video_stream == -1)
throw FileOpen(file, "No video stream found.");
// Get the codec context for this video stream
- #if LIBAVFORMAT_BUILD >= 4629
pCodecContext = pFormatContext->streams[video_stream]->codec;
- #else
- pCodecContext = &pFormatContext->streams[video_stream]->codec;
- #endif
// Find the decoder for the video stream
AVCodec* pCodec = avcodec_find_decoder(pCodecContext->codec_id);
@@ -245,13 +232,6 @@
throw FileOpen(file, string(pCodec->name) + " codec
could not be initialised.");
}
- #if LIBAVCODEC_BUILD < 4754
- // Hack to fix wrong frame rates
- if(pCodecContext->frame_rate > 1000 &&
pCodecContext->frame_rate_base == 1)
- pCodecContext->frame_rate_base = 1000;
- #endif
-
-
// Allocate video frame
pFrame = avcodec_alloc_frame();
if(pFrame == NULL)
@@ -505,13 +485,9 @@
// If t was initially zero, it is now negative. Fix this.
int64_t seekToPts = targetPts < 0 ? 0 : targetPts;
- #if LIBAVFORMAT_BUILD >= 4623
// The flag AVSEEK_FLAG_ANY will seek to the specified frame, but we
cannot decode from there because
// we do not have the info from the previous frames and keyframe, hence
the BACKWARD flag.
if (av_seek_frame(pFormatContext, -1, seekToPts, AVSEEK_FLAG_BACKWARD)
< 0)
- #else
- if (av_seek_frame(pFormatContext, -1, seekToPts < 0))
- #endif
{
cerr << "av_seek_frame not supported by this codec: performing
(slow) manual seek" << endl;
@@ -532,11 +508,7 @@
// No need to find the stream--we know which one it is (in
video_stream)
// Get the codec context for this video stream
- #if LIBAVFORMAT_BUILD >= 4629
pCodecContext = pFormatContext->streams[video_stream]->codec;
- #else
- pCodecContext = &pFormatContext->streams[video_stream]->codec;
- #endif
// Find the decoder for the video stream
AVCodec* pCodec = avcodec_find_decoder(pCodecContext->codec_id);
- [libcvd-members] libcvd configure configure.in cvd_src/videofile...,
Edward Rosten <=