Discussion:
[PATCH 1/4] add ffmpeg test script
Johannes Weißl
2012-05-15 19:36:06 UTC
Permalink
This script enables automatic testing of the cmus ffmpeg plugin against
thousands of (relevant) revisions of FFmpeg. Only for (devoted)
developers :-).
---
scripts/ffmpeg_test.sh | 220 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 220 insertions(+)
create mode 100755 scripts/ffmpeg_test.sh

diff --git a/scripts/ffmpeg_test.sh b/scripts/ffmpeg_test.sh
new file mode 100755
index 0000000..927b213
--- /dev/null
+++ b/scripts/ffmpeg_test.sh
@@ -0,0 +1,220 @@
+#!/bin/bash
+# vim: set expandtab shiftwidth=4:
+#
+# Copyright 2010-2012 Various Authors
+# Copyright 2012 Johannes Weißl
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+# many (!) FFmpeg versions will be installed here, at least 25GB
+FFMPEG_BUILD_DIR=$HOME/cmus_ffmpeg_test/ffmpeg_builds
+
+# ffmpeg/libav source will be cloned into this directory
+FFMPEG_SRC_DIR=$HOME/cmus_ffmpeg_test/ffmpeg_src
+
+# source code of cmus is expected here
+CMUS_SRC_DIR=$HOME/cmus_ffmpeg_test/cmus_src
+
+# cmus versions will be installed here
+CMUS_BUILD_DIR=$HOME/cmus_ffmpeg_test/cmus_builds
+
+FFMPEG_CLONE_URL=git://source.ffmpeg.org/ffmpeg.git
+LIBAV_CLONE_URL=git://git.libav.org/libav.git
+
+# headers of ffmpeg that are relevant to cmus compilation
+HEADERS="avcodec.h avformat.h avio.h mathematics.h version.h"
+
+# argument to make -j
+MAKE_J=$(grep -c "^processor" /proc/cpuinfo 2>/dev/null || echo 1)
+
+print_usage () {
+ echo "Usage: $progname build_ffmpeg | build_libav | build_cmus | test_cmus"
+ echo
+ echo "build_{ffmpeg,libav}:"
+ echo " 1. clone/pull source into $FFMPEG_SRC_DIR/{ffmpeg,libav}"
+ echo " 2. build and install (necessary) revisions into $FFMPEG_BUILD_DIR"
+ echo " can take days and needs up to 25 GB hard disk (!)"
+ echo " you can use ctrl-c to stop the script and run it later to continue"
+ echo
+ echo "build_cmus:"
+ echo " 1. expects cmus source in $CMUS_SRC_DIR"
+ echo " 2. build cmus for every revision in $FFMPEG_BUILD_DIR and install"
+ echo " to $CMUS_BUILD_DIR"
+ echo
+ echo "test_cmus:"
+ echo " test ffmpeg plugin of every cmus build in $CMUS_BUILD_DIR"
+}
+
+function get_commits () {
+ for name in "$@" ; do
+ find -type f -name "$name" -exec git log --follow --pretty=format:"%H%n" {} \;
+ done
+ for tag in $(git tag) ; do
+ git show "$tag" | sed -n "s/^commit //p"
+ done
+}
+
+function uniq_stable () {
+ nl -ba | sort -suk2 | sort -n | cut -f2-
+}
+
+DONE=
+trap 'DONE=1' SIGINT
+
+function build_to_prefix () {
+ prefix=$1
+ cur=$2
+ all=$3
+ cur_name=$4
+ build_cmd=$5
+ echo -n "[$((cur*100/all))%] "
+ if [ -e "$prefix.broken" ] ; then
+ echo "skip $cur_name, broken"
+ elif [ -e "$prefix.part" ] ; then
+ echo "skip $cur_name, is being build"
+ else
+ if [ -e "$prefix" ] ; then
+ echo "skip $cur_name, already built"
+ else
+ echo -n "build and install to $prefix: "
+ echo $build_cmd >"$prefix.log"
+ (mkdir -p "$prefix.part" && eval $build_cmd && mv "$prefix.part/$prefix" "$prefix" && rm -rf "$prefix.part") >>"$prefix.log" 2>&1 && echo "ok" ||
+ (touch "$prefix.broken" ; echo "FAILED:" ; echo $build_cmd)
+ fi
+ fi
+ [ -n "$DONE" ] && rm -rvf "$prefix" "$prefix".part "$prefix".broken
+}
+
+function build_revisions () {
+ name=$1
+ url=$2
+ mkdir -p "$FFMPEG_SRC_DIR" "$FFMPEG_BUILD_DIR"
+ FFMPEG_SRC_DIR=$FFMPEG_SRC_DIR/$name
+ if [ -e "$FFMPEG_SRC_DIR" ] ; then
+ echo "pull $url in $FFMPEG_SRC_DIR"
+ pushd "$FFMPEG_SRC_DIR" >/dev/null
+ git reset --hard origin/master >/dev/null
+ git clean -fxd >/dev/null
+ git pull >/dev/null
+ else
+ echo "clone $url in $FFMPEG_SRC_DIR"
+ git clone "$url" "$FFMPEG_SRC_DIR" >/dev/null
+ pushd "$FFMPEG_SRC_DIR" >/dev/null
+ fi
+ commits=$(get_commits $HEADERS | uniq_stable)
+ commits_count=$(echo $commits | wc -w)
+ i=0
+ for c in $commits ; do
+ i=$((i+1))
+ git reset --hard "$c" >/dev/null
+ git clean -fxd >/dev/null
+ prefix="$FFMPEG_BUILD_DIR/$c"
+ build_to_prefix "$prefix" "$i" "$commits_count" "$c" \
+ "./configure --prefix=\"$prefix.part\" --enable-shared --disable-static && make -j$MAKE_J && make install"
+ [ -n "$DONE" ] && break
+ done
+ popd >/dev/null
+}
+
+build_cmus () {
+ pushd "$CMUS_SRC_DIR" >/dev/null
+ mkdir -p "$CMUS_BUILD_DIR"
+ revdirs=$(find "$FFMPEG_BUILD_DIR" -mindepth 1 -maxdepth 1 -type d ! -name "*.part")
+ revdirs_count=$(echo $revdirs | wc -w)
+ i=0
+ for revdir in $revdirs ; do
+ i=$((i+1))
+ rev=$(basename "$revdir")
+ prefix="$CMUS_BUILD_DIR/$rev"
+ make distclean >/dev/null 2>&1
+ build_to_prefix "$prefix" "$i" "$revdirs_count" "$rev" \
+ "CFLAGS=\"-I$revdir/include\" LDFLAGS=\"-L$revdir/lib\" ./configure prefix=\"$prefix\" CONFIG_FFMPEG=y DEBUG=2 && make -j$MAKE_J && make install DESTDIR=\"$prefix.part\""
+ [ -n "$DONE" ] && break
+ done
+ popd >/dev/null
+}
+
+test_cmus () {
+ mkdir -p "$CMUS_BUILD_DIR"
+ revdirs=$(find "$CMUS_BUILD_DIR" -mindepth 1 -maxdepth 1 -type d ! -name "*.part")
+ revdirs_count=$(echo $revdirs | wc -w)
+ i=0
+ for revdir in $revdirs ; do
+ i=$((i+1))
+ rev=$(basename "$revdir")
+ tmpdir=$(mktemp -d)
+ lib_prefix=$FFMPEG_BUILD_DIR/$rev
+ echo -n "[$((i*100/revdirs_count))%] test $revdir: "
+ if CMUS_HOME=$tmpdir LD_LIBRARY_PATH=$lib_prefix/lib:$LD_LIBRARY_PATH "$revdir"/bin/cmus --plugins | grep -q "^ *ffmpeg" ; then
+ echo "working"
+ else
+ echo "not working: "
+ echo "CMUS_HOME=$tmpdir LD_LIBRARY_PATH=$lib_prefix/lib:$LD_LIBRARY_PATH \"$revdir\"/bin/cmus --plugins"
+ cat $tmpdir/cmus-debug.txt
+ fi
+ rm "$tmpdir"/cmus-debug.txt
+ rmdir "$tmpdir"
+ [ -n "$DONE" ] && break
+ done
+}
+
+progname=$(basename "$0")
+
+while [ $# -gt 0 ] ; do
+ case "$1" in
+ -h | --help)
+ print_usage
+ exit 0
+ ;;
+ --)
+ shift ; break
+ ;;
+ -*)
+ echo >&2 "$progname: unrecognized option \`$1'"
+ echo >&2 "Try \`$0 --help' for more information."
+ exit 1
+ ;;
+ *)
+ break
+ ;;
+ esac
+done
+
+if [ $# -eq 0 ] ; then
+ print_usage
+ exit 0
+elif [ $# -gt 1 ] ; then
+ echo >&2 "$progname: too many arguments"
+ echo >&2 "Try \`$0 --help' for more information."
+ exit 1
+fi
+
+case "$1" in
+ build_ffmpeg)
+ build_revisions ffmpeg "$FFMPEG_CLONE_URL"
+ ;;
+ build_libav)
+ build_revisions libav "$LIBAV_CLONE_URL"
+ ;;
+ build_cmus)
+ build_cmus
+ ;;
+ test_cmus)
+ test_cmus
+ ;;
+ *)
+ echo >&2 "$progname: unrecognized command \`$1'"
+ echo >&2 "Try \`$0 --help' for more information."
+ exit 1
+esac
--
1.7.10
Johannes Weißl
2012-05-15 19:36:08 UTC
Permalink
ffmpeg.c:200:3: error: implicit declaration of function 'avformat_find_stream_info'

with ffmpeg revision 518d8d436566e6260d73346cd999ff69eeb94e49
---
ffmpeg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 58291f9..c14b8e8 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -194,7 +194,7 @@ static int ffmpeg_open(struct input_plugin_data *ip_data)
}

do {
-#if (LIBAVFORMAT_VERSION_INT < ((53<<16)+(5<<8)+0))
+#if (LIBAVFORMAT_VERSION_INT <= ((53<<16)+(5<<8)+0))
err = av_find_stream_info(ic);
#else
err = avformat_find_stream_info(ic, NULL);
--
1.7.10
Johannes Weißl
2012-05-15 19:36:09 UTC
Permalink
It turns out the FFmpeg API is so unstable (especially now that there
are two projects) that we can't guarantee the compilation of the ffmpeg
plugin. So the best option is to let ./configure test the actual
successful build as test.
---
configure | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 83e9ce4..c40def7 100755
--- a/configure
+++ b/configure
@@ -354,7 +354,23 @@ check_ffmpeg()
else
check_header "ffmpeg/avcodec.h" $FFMPEG_CFLAGS || return $?
fi
- return 0
+ # ffmpeg api changes so frequently that it is best to compile the module
+ libs="$LDDLFLAGS $FFMPEG_LIBS"
+ cflags="$SOFLAGS $FFMPEG_CFLAGS"
+ if test "$HAVE_FFMPEG_AVCODEC_H" = y
+ then
+ cflags="$cflags -DHAVE_FFMPEG_AVCODEC_H"
+ fi
+ topdir=`dirname "$0"`
+ ffmpeg_code=`cat "$topdir"/ffmpeg.c | grep -v '^#include "config/' | sed 's/\\\n//g'`
+ msg_checking "for successful build of ffmpeg.c"
+ if try_compile_link "$ffmpeg_code" $cflags $libs
+ then
+ msg_result yes
+ return 0
+ fi
+ msg_result no
+ return 1
}

check_string_function()
--
1.7.10
Johannes Weißl
2012-05-15 19:49:34 UTC
Permalink
Post by Johannes Weißl
+ ffmpeg_code=`cat "$topdir"/ffmpeg.c | grep -v '^#include "config/' | sed 's/\\\n//g'`
As it turns out this works only if cmus has been configured before, so
consider this patch (not the others) void. The only solution I can think
of is this:

We encapsulate every '#include "config/..."' with a "#if HAVE_CONFIG"
conditional (this is not that uncommon, with autoconf you do exactly
the same). What do you think?


Johannes
Gregory Petrosyan
2012-05-18 07:52:21 UTC
Permalink
Post by Johannes Weißl
Post by Johannes Weißl
+ ffmpeg_code=`cat "$topdir"/ffmpeg.c | grep -v '^#include "config/' | sed 's/\\\n//g'`
As it turns out this works only if cmus has been configured before, so
consider this patch (not the others) void. The only solution I can think
We encapsulate every '#include "config/..."' with a "#if HAVE_CONFIG"
conditional (this is not that uncommon, with autoconf you do exactly
the same). What do you think?
Maybe we should just not abort the 'make' when plugin compilation fails, and
just report it to user? This sounds a lot less intrusive and more general to
me.

Merged the first 3 patches, thanks a lot!

Gregory
Johannes Weißl
2012-05-20 23:20:16 UTC
Permalink
Hi Gregory,
Post by Gregory Petrosyan
Post by Johannes Weißl
Post by Johannes Weißl
+ ffmpeg_code=`cat "$topdir"/ffmpeg.c | grep -v '^#include "config/' | sed 's/\\\n//g'`
As it turns out this works only if cmus has been configured before, so
consider this patch (not the others) void. The only solution I can think
We encapsulate every '#include "config/..."' with a "#if HAVE_CONFIG"
conditional (this is not that uncommon, with autoconf you do exactly
the same). What do you think?
Maybe we should just not abort the 'make' when plugin compilation fails, and
just report it to user? This sounds a lot less intrusive and more general to
me.
Hmm, I think that is the wrong approach. It goes against the idea of
./configure && make: configure should find out what and how to build,
and make should just execute those rules. And if the only way
configure can find out if a small part of the program can be built is by
compiling/linking it, then so be it.

I attached (separate mail) a new patch, which does the proposed
encapsulation of config-headers. Tell me what you think :-).
Post by Gregory Petrosyan
Merged the first 3 patches, thanks a lot!
Thanks!


Johannes
Johannes Weißl
2012-05-20 23:23:53 UTC
Permalink
It turns out the FFmpeg API is so unstable (especially now that there
are two projects) that we can't guarantee the compilation of the ffmpeg
plugin. So the best option is to let ./configure test the actual
successful build as test.
---
cdio.c | 4 ++++
command_mode.c | 2 ++
configure | 20 +++++++++++++++++++-
convert.c | 2 ++
debug.h | 2 ++
ffmpeg.c | 2 ++
input.c | 2 ++
job.c | 2 ++
modplug.c | 2 ++
mp4.c | 2 ++
mpc.c | 2 ++
options.c | 2 ++
output.c | 2 ++
ui_curses.c | 2 ++
utils.h | 2 ++
vorbis.c | 2 ++
xmalloc.h | 2 ++
17 files changed, 53 insertions(+), 1 deletion(-)

diff --git a/cdio.c b/cdio.c
index 70a79a5..e437183 100644
--- a/cdio.c
+++ b/cdio.c
@@ -38,7 +38,11 @@
#include <fcntl.h>

#undef HAVE_CDDB
+
+#ifdef HAVE_CONFIG
#include "config/cdio.h"
+#endif
+
#ifdef HAVE_CDDB
#include "http.h"
#include "xstrjoin.h"
diff --git a/command_mode.c b/command_mode.c
index 763f211..cc6ff08 100644
--- a/command_mode.c
+++ b/command_mode.c
@@ -44,7 +44,9 @@
#include "list.h"
#include "debug.h"
#include "load_dir.h"
+#ifdef HAVE_CONFIG
#include "config/datadir.h"
+#endif
#include "help.h"
#include "op.h"

diff --git a/configure b/configure
index 83e9ce4..9791b64 100755
--- a/configure
+++ b/configure
@@ -354,7 +354,23 @@ check_ffmpeg()
else
check_header "ffmpeg/avcodec.h" $FFMPEG_CFLAGS || return $?
fi
- return 0
+ # ffmpeg api changes so frequently that it is best to compile the module
+ libs="$LDDLFLAGS $FFMPEG_LIBS"
+ cflags="$SOFLAGS $FFMPEG_CFLAGS"
+ if test "$HAVE_FFMPEG_AVCODEC_H" = y
+ then
+ cflags="$cflags -DHAVE_FFMPEG_AVCODEC_H"
+ fi
+ topdir=`dirname "$0"`
+ ffmpeg_code=`cat "$topdir"/ffmpeg.c | sed 's/\\\n//g'`
+ msg_checking "for successful build of ffmpeg.c"
+ if try_compile_link "$ffmpeg_code" $cflags $libs
+ then
+ msg_result yes
+ return 0
+ fi
+ msg_result no
+ return 1
}

check_string_function()
@@ -516,6 +532,8 @@ config_header config/iconv.h HAVE_ICONV
config_header config/xmalloc.h HAVE_STRDUP HAVE_STRNDUP
config_header config/cue.h CONFIG_CUE

+CFLAGS="${CFLAGS} -DHAVE_CONFIG"
+
makefile_vars bindir datadir libdir mandir exampledir
makefile_vars CONFIG_CDIO CONFIG_FLAC CONFIG_MAD CONFIG_MIKMOD CONFIG_MODPLUG CONFIG_MPC CONFIG_VORBIS CONFIG_WAVPACK CONFIG_WAV CONFIG_MP4 CONFIG_AAC CONFIG_FFMPEG CONFIG_CUE
makefile_vars CONFIG_ROAR CONFIG_PULSE CONFIG_ALSA CONFIG_AO CONFIG_ARTS CONFIG_OSS CONFIG_SUN CONFIG_WAVEOUT
diff --git a/convert.c b/convert.c
index 3c78e93..7b18ab3 100644
--- a/convert.c
+++ b/convert.c
@@ -18,7 +18,9 @@

#include "convert.h"
#include "xmalloc.h"
+#ifdef HAVE_CONFIG
#include "config/iconv.h"
+#endif

#ifdef HAVE_ICONV
#include <iconv.h>
diff --git a/debug.h b/debug.h
index 5cd6b64..c5c7b7e 100644
--- a/debug.h
+++ b/debug.h
@@ -20,7 +20,9 @@
#define DEBUG_H

#include "compiler.h"
+#ifdef HAVE_CONFIG
#include "config/debug.h"
+#endif

#include <errno.h>
#include <stdint.h>
diff --git a/ffmpeg.c b/ffmpeg.c
index c14b8e8..bd73f49 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -21,7 +21,9 @@
#include "debug.h"
#include "utils.h"
#include "comment.h"
+#ifdef HAVE_CONFIG
#include "config/ffmpeg.h"
+#endif

#include <stdio.h>
#ifdef HAVE_FFMPEG_AVCODEC_H
diff --git a/input.c b/input.c
index 39a9a3b..737c2aa 100644
--- a/input.c
+++ b/input.c
@@ -31,7 +31,9 @@
#include "misc.h"
#include "debug.h"
#include "ui_curses.h"
+#ifdef HAVE_CONFIG
#include "config/libdir.h"
+#endif

#include <unistd.h>
#include <string.h>
diff --git a/job.c b/job.c
index a44e9f4..2582bd5 100644
--- a/job.c
+++ b/job.c
@@ -33,7 +33,9 @@
#include "player.h"
#include "discid.h"
#include "xstrjoin.h"
+#ifdef HAVE_CONFIG
#include "config/cue.h"
+#endif
#ifdef CONFIG_CUE
#include "cue_utils.h"
#endif
diff --git a/modplug.c b/modplug.c
index 6c01c1c..6bdda8d 100644
--- a/modplug.c
+++ b/modplug.c
@@ -20,7 +20,9 @@
#include "file.h"
#include "xmalloc.h"
#include "comment.h"
+#ifdef HAVE_CONFIG
#include "config/modplug.h"
+#endif

#include <modplug.h>
#include <sys/types.h>
diff --git a/mp4.c b/mp4.c
index e8535aa..5bc7fa5 100644
--- a/mp4.c
+++ b/mp4.c
@@ -20,7 +20,9 @@
#include "xmalloc.h"
#include "debug.h"
#include "file.h"
+#ifdef HAVE_CONFIG
#include "config/mp4.h"
+#endif
#include "comment.h"
#include "aac.h"

diff --git a/mpc.c b/mpc.c
index 9b7628e..37793d5 100644
--- a/mpc.c
+++ b/mpc.c
@@ -25,7 +25,9 @@
#include "xmalloc.h"
#include "read_wrapper.h"

+#ifdef HAVE_CONFIG
#include "config/mpc.h"
+#endif

#if MPC_SV8
#include <mpc/mpcdec.h>
diff --git a/options.c b/options.c
index d7d6c23..8325c05 100644
--- a/options.c
+++ b/options.c
@@ -35,7 +35,9 @@
#include "prog.h"
#include "output.h"
#include "input.h"
+#ifdef HAVE_CONFIG
#include "config/datadir.h"
+#endif
#include "track_info.h"
#include "cache.h"
#include "debug.h"
diff --git a/output.c b/output.c
index e94f279..1a5740d 100644
--- a/output.c
+++ b/output.c
@@ -26,7 +26,9 @@
#include "debug.h"
#include "ui_curses.h"
#include "options.h"
+#ifdef HAVE_CONFIG
#include "config/libdir.h"
+#endif

#include <string.h>
#include <strings.h>
diff --git a/ui_curses.c b/ui_curses.c
index 2ef05f2..5b575f6 100644
--- a/ui_curses.c
+++ b/ui_curses.c
@@ -48,8 +48,10 @@
#include "file.h"
#include "path.h"
#include "mixer.h"
+#ifdef HAVE_CONFIG
#include "config/curses.h"
#include "config/iconv.h"
+#endif

#include <unistd.h>
#include <stdlib.h>
diff --git a/utils.h b/utils.h
index d3aa75f..d1bad57 100644
--- a/utils.h
+++ b/utils.h
@@ -19,7 +19,9 @@
#ifndef _UTILS_H
#define _UTILS_H

+#ifdef HAVE_CONFIG
#include "config/utils.h"
+#endif

#include <stdlib.h>
#include <string.h>
diff --git a/vorbis.c b/vorbis.c
index 2b69a2a..74f28ce 100644
--- a/vorbis.c
+++ b/vorbis.c
@@ -20,7 +20,9 @@
#include "xmalloc.h"
#include "read_wrapper.h"
#include "debug.h"
+#ifdef HAVE_CONFIG
#include "config/tremor.h"
+#endif
#include "comment.h"

#ifdef CONFIG_TREMOR
diff --git a/xmalloc.h b/xmalloc.h
index 1974e08..2b8ef94 100644
--- a/xmalloc.h
+++ b/xmalloc.h
@@ -20,7 +20,9 @@
#define _XMALLOC_H

#include "compiler.h"
+#ifdef HAVE_CONFIG
#include "config/xmalloc.h"
+#endif

#include <stdlib.h>
#include <string.h>
--
1.7.10
Gregory Petrosyan
2012-05-22 14:32:48 UTC
Permalink
Post by Johannes Weißl
Post by Gregory Petrosyan
Post by Johannes Weißl
Post by Johannes Weißl
+ ffmpeg_code=`cat "$topdir"/ffmpeg.c | grep -v '^#include "config/' | sed 's/\\\n//g'`
As it turns out this works only if cmus has been configured before, so
consider this patch (not the others) void. The only solution I can think
We encapsulate every '#include "config/..."' with a "#if HAVE_CONFIG"
conditional (this is not that uncommon, with autoconf you do exactly
the same). What do you think?
Maybe we should just not abort the 'make' when plugin compilation fails, and
just report it to user? This sounds a lot less intrusive and more general to
me.
Hmm, I think that is the wrong approach. It goes against the idea of
./configure && make: configure should find out what and how to build,
and make should just execute those rules. And if the only way
configure can find out if a small part of the program can be built is by
compiling/linking it, then so be it.
OK — I think there are just 2 different views on how the responsibility should
be split between configure and make.
Post by Johannes Weißl
I attached (separate mail) a new patch, which does the proposed
encapsulation of config-headers. Tell me what you think :-).
I have no hard feelings about this, so since you have a good patch — let it go
in! Merged. Thanks a lot, once again.

Gregory
Johannes Weißl
2012-05-23 18:35:56 UTC
Permalink
Post by Gregory Petrosyan
Post by Johannes Weißl
I attached (separate mail) a new patch, which does the proposed
encapsulation of config-headers. Tell me what you think :-).
I have no hard feelings about this, so since you have a good patch — let it go
in! Merged. Thanks a lot, once again.
Thanks! Lets see if it causes problems for people, and if not, we might
be able to turn CONFIG_FFMPEG back to "a" (automatic detection) again :-).

Johannes
Gregory Petrosyan
2012-05-24 08:13:13 UTC
Permalink
Post by Johannes Weißl
Post by Gregory Petrosyan
Post by Johannes Weißl
I attached (separate mail) a new patch, which does the proposed
encapsulation of config-headers. Tell me what you think :-).
I have no hard feelings about this, so since you have a good patch — let it go
in! Merged. Thanks a lot, once again.
Thanks! Lets see if it causes problems for people, and if not, we might
be able to turn CONFIG_FFMPEG back to "a" (automatic detection) again :-).
Oh, I totally forgot about why all this stuff started :-)

Sure, I'll change CONFIG_FFMPEG back to "a" again in a week or so.

Gregory

Johannes Weißl
2012-05-15 19:36:07 UTC
Permalink
ffmpeg.c:189:2: error: implicit declaration of function 'avformat_open_input'

with ffmpeg revision e71f26086ab899be7df1efb30b33e0a11973fd8e
---
ffmpeg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index e884274..58291f9 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -183,7 +183,7 @@ static int ffmpeg_open(struct input_plugin_data *ip_data)

ffmpeg_init();

-#if (LIBAVFORMAT_VERSION_INT < ((53<<16)+(2<<8)+0))
+#if (LIBAVFORMAT_VERSION_INT <= ((53<<16)+(2<<8)+0))
err = av_open_input_file(&ic, ip_data->filename, NULL, 0, NULL);
#else
err = avformat_open_input(&ic, ip_data->filename, NULL, NULL);
--
1.7.10
Loading...