google-code-export / ffmpegthumbnailer

Automatically exported from code.google.com/p/ffmpegthumbnailer
GNU General Public License v2.0
1 stars 1 forks source link

ffmpeg include path issues #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Tried different pc's i386 and x64 
2.

What is the expected output? What do you see instead?
Won't compile

In file included from moviedecoder.cpp:17:
moviedecoder.h:33:28: error: ffmpeg/avcodec.h: No such file or directory
moviedecoder.h:38:29: error: ffmpeg/avformat.h: No such file or directory
moviedecoder.cpp:28:28: error: ffmpeg/swscale.h: No such file or directory

Symlinking those files then gives another error.

In file included from moviedecoder.h:38,
                 from moviedecoder.cpp:17:
/usr/include/ffmpeg/avformat.h:47:18: error: avio.h: No such file or directory

Symlink that file as well and it compiles fine.

What version of the product are you using? On what operating system?
Fedora 10

Please provide any additional information below.

moviedecoder.h 

#if HAVE_LIBAVCODEC_AVCODEC_H
#include <libavcodec/avcodec.h>
#else
#include <ffmpeg/avcodec.h>
#endif
#if HAVE_LIBAVFORMAT_AVFORMAT_H
#include <libavformat/avformat.h>
#else
#include <ffmpeg/avformat.h>
#endif

Following required fixing for it to compile.  I just symlinked the files to
expected locations for testing.

Fedora's ffmpeg is installed ( on both 32 & 64bit in )
/usr/include/ffmpeg/libavcodec/avcodec.h
/usr/include/ffmpeg/libavformat/avformat.h
/usr/include/ffmpeg/libavformat/avio.h
/usr/include/ffmpeg/libswscale/swscale.h

Original issue reported on code.google.com by aob.phan...@gmail.com on 9 Jan 2009 at 4:26

GoogleCodeExporter commented 9 years ago
This is a bug of the fedora packages for ffmpeg. Old versions of the ffmpeg 
headers
should be in ffmpeg include dir. The headers of the current versions of ffmpeg 
are
stored in the the libavcodec, libavformat, ... directories.

Original comment by dirk.vdb on 9 Jan 2009 at 7:33

GoogleCodeExporter commented 9 years ago
Reported this as a bug against the fedora package.  And the response.

ffmpegthumbnailer developer should update his code to build against current
FFmpeg SVN. Nothing older is supported anyway. I won't add backwards
compatibility symlinks, because it'll give the developers of projects dependent
on FFmpeg less incentive to update their code. Besides, this is a one-time
change, and not a big one at that.

Original comment by aob.phan...@gmail.com on 13 Jan 2009 at 1:26

GoogleCodeExporter commented 9 years ago
I'll check out the latest ffmpeg svn and see if they changed the includes.

Original comment by dirk.vdb on 13 Jan 2009 at 8:37

GoogleCodeExporter commented 9 years ago
I have just build the trunk of ffmpeg and the include files get installed in:
/usr/include/libavcodec/
/usr/include/libavutil/

and so on.

I don't see why the fedora packager puts them inside an ffmpeg directory.

Original comment by dirk.vdb on 13 Jan 2009 at 8:53

GoogleCodeExporter commented 9 years ago
I dunno ... I was only trying to get it to build on Fedora and reported to both 
the
dev and packager when it didn't work. 

This was my bugzilla entry for the packager. 
https://bugzilla.rpmfusion.org/show_bug.cgi?id=311

I did find this however
http://osdir.com/ml/linux.redhat.fedora.freeworld/2008-06/msg00072.html

which discusses the header change.

Current FFmpeg snapshot (just committed) has changed the location of
its headers (no ABI change though). Where previously they were all directly
under /usr/include/ffmpeg
with .pc files containing

includedir=/usr/include
Cflags: -I%{includedir}/ffmpeg

they are now in subdirectories named after their respective libraries, i.e.

/usr/include/ffmpeg/avcodec.h -> /usr/include/ffmpeg/libavcodec/avcodec.h

Original comment by aob.phan...@gmail.com on 13 Jan 2009 at 12:15

GoogleCodeExporter commented 9 years ago
The say that headers are installed in /usr/include/ffmpeg/libavcodec/ but that 
is not
the case. They are installed in /usr/include/libavcodec/

You can verify this by checking out the code and running ./configure and make 
install

Original comment by dirk.vdb on 13 Jan 2009 at 1:11

GoogleCodeExporter commented 9 years ago

Original comment by dirk.vdb on 26 Jan 2009 at 9:26

GoogleCodeExporter commented 9 years ago
I'm not sure what the status of things overall is, but for now I was unable to 
build
this on Fedora 9. './configure' worked, but then I obviously couldn't 'make' 
because
headers were missing. The simple fix is four quick symlinks:

[root #] cd /usr/include/ffmpeg
[root #] ln -s libavcodec/avcodec.h avcodec.h
[root #] ln -s libavformat/avformat.h avformat.h
[root #] ln -s libswscale/swscale.h swscale.h
[root #] ln -s libavformat/avio.h avio.h

Re-run 'make' and things should compile fine after that.

Original comment by such...@gmail.com on 2 Feb 2009 at 10:37

GoogleCodeExporter commented 9 years ago
I am seeing the same problem on opensolaris snv_98 using gcc 4.3.2. I specified 
the
prefix /opt/mediatomb and hence libraries are in
/opt/mediatomb/include/libavcodec/avcodec.h etc. moviedecoder.h and .cpp has no 
idea
where the libraries are.

Original comment by sean....@gmail.com on 9 Mar 2009 at 2:11

GoogleCodeExporter commented 9 years ago
Setting the prefix only influences where the library will get installed, not 
where
header files will be looked for.

Try running this before running configure:
export CFLAGS="-I/opt/mediatomb/include" 

Original comment by dirk.vdb on 9 Mar 2009 at 9:50

GoogleCodeExporter commented 9 years ago
dirk,

I tried your recommendation export CFLAGS="-I/opt/mediatomb/include" and it had 
no
change. The usability FFMPEG/avcodec.h is no as well was libavcodec/avcodec.h 
etc. I
tried 1.4 as well as 1.5 and got the same results. The configure completes but 
fails
at moviedecoder.h :33 no such file as above. Any further help is greatly 
appreciated.
I even tried hardcoding moviedecoder.h with the
/opt/mediatomb/include/libavcodec/avcodec.h with no luck.

Original comment by sean....@gmail.com on 16 Mar 2009 at 8:34

GoogleCodeExporter commented 9 years ago
Can anyone on a fedora machine provide me with the output of:

pkg-config --cflags libavformat

Thanks,
Dirk

Original comment by dirk.vdb on 6 May 2009 at 7:41

GoogleCodeExporter commented 9 years ago
pkg-config --cflags libavformat
-I/usr/include/ffmpeg  

Original comment by aob.phan...@gmail.com on 6 May 2009 at 7:48

GoogleCodeExporter commented 9 years ago
Should of mentioned that was on Fedora 10, x86.

Original comment by aob.phan...@gmail.com on 6 May 2009 at 7:49

GoogleCodeExporter commented 9 years ago
I just committed a makefile fix in subversion, can you verify if you can build 
it
now? Make sure you remove any existing symlinks that you previously created to 
make
it build.

If it doesn't work, I would liek to see the build output.

Regards,
Dirk

Original comment by dirk.vdb on 6 May 2009 at 8:04

GoogleCodeExporter commented 9 years ago
checked out svn

./autogen.sh

./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... gfortran
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
checking the maximum length of command line arguments... 1966080
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
(cached) (cached) checking how to hardcode library paths into programs... 
immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gfortran option to produce PIC... -fPIC
checking if gfortran PIC flag -fPIC works... yes
checking if gfortran static flag -static works... yes
checking if gfortran supports -c -o file.o... yes
checking whether the gfortran linker (/usr/bin/ld) supports shared libraries... 
yes
checking dynamic linker characteristics... GNU/Linux ld.so
(cached) (cached) checking how to hardcode library paths into programs... 
immediate
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for ANSI C header files... (cached) yes
checking for inttypes.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for FFMPEG... yes
checking ffmpeg/avcodec.h usability... no
checking ffmpeg/avcodec.h presence... no
checking for ffmpeg/avcodec.h... no
checking libavcodec/avcodec.h usability... no
checking libavcodec/avcodec.h presence... no
checking for libavcodec/avcodec.h... no
checking ffmpeg/avformat.h usability... no
checking ffmpeg/avformat.h presence... no
checking for ffmpeg/avformat.h... no
checking libavformat/avformat.h usability... no
checking libavformat/avformat.h presence... no
checking for libavformat/avformat.h... no
checking ffmpeg/avutil.h usability... no
checking ffmpeg/avutil.h presence... no
checking for ffmpeg/avutil.h... no
checking libavutil/avutil.h usability... no
checking libavutil/avutil.h presence... no
checking for libavutil/avutil.h... no
checking ffmpeg/swscale.h usability... no
checking ffmpeg/swscale.h presence... no
checking for ffmpeg/swscale.h... no
checking libswscale/swscale.h usability... no
checking libswscale/swscale.h presence... no
checking for libswscale/swscale.h... no
checking for PNG... yes
configure: pkgconfig directory is ${libdir}/pkgconfig
configure: creating ./config.status
config.status: creating libffmpegthumbnailer.pc
config.status: creating Makefile
config.status: creating man/Makefile
config.status: executing depfiles commands

CONFIGURATION SUMMARY ----
unittests           : disabled
debug mode          : disabled

make
Making all in man
make[1]: Entering directory `/media/ramdisk/ffmpegthumbnailer-read-only/man'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/media/ramdisk/ffmpegthumbnailer-read-only/man'
make[1]: Entering directory `/media/ramdisk/ffmpegthumbnailer-read-only'
/bin/sh ./libtool --tag=CXX   --mode=compile g++ 
-DPACKAGE_NAME=\"ffmpegthumbnailer\"
-DPACKAGE_TARNAME=\"ffmpegthumbnailer\" -DPACKAGE_VERSION=\"1.5.0\"
-DPACKAGE_STRING=\"ffmpegthumbnailer\ 1.5.0\" -DPACKAGE_BUGREPORT=\"\"
-DPACKAGE=\"ffmpegthumbnailer\" -DVERSION=\"1.5.0\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -D_FILE_OFFSET_BITS=64 -DSTDC_HEADERS=1
-DHAVE_INTTYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_JPEGLIB_H=1 -I.   
-I/usr/include/ffmpeg   -g -O2 -MT libffmpegthumbnailer_la-moviedecoder.lo -MD 
-MP
-MF .deps/libffmpegthumbnailer_la-moviedecoder.Tpo -c -o
libffmpegthumbnailer_la-moviedecoder.lo `test -f
'libffmpegthumbnailer/moviedecoder.cpp' || echo
'./'`libffmpegthumbnailer/moviedecoder.cpp
mkdir .libs
 g++ -DPACKAGE_NAME=\"ffmpegthumbnailer\" -DPACKAGE_TARNAME=\"ffmpegthumbnailer\"
-DPACKAGE_VERSION=\"1.5.0\" "-DPACKAGE_STRING=\"ffmpegthumbnailer 1.5.0\""
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"ffmpegthumbnailer\" -DVERSION=\"1.5.0\"
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -D_FILE_OFFSET_BITS=64
-DSTDC_HEADERS=1 -DHAVE_INTTYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_JPEGLIB_H=1 -I.
-I/usr/include/ffmpeg -g -O2 -MT libffmpegthumbnailer_la-moviedecoder.lo -MD 
-MP -MF
.deps/libffmpegthumbnailer_la-moviedecoder.Tpo -c
libffmpegthumbnailer/moviedecoder.cpp  -fPIC -DPIC -o
.libs/libffmpegthumbnailer_la-moviedecoder.o
In file included from libffmpegthumbnailer/moviedecoder.cpp:17:
libffmpegthumbnailer/moviedecoder.h:33:28: error: ffmpeg/avcodec.h: No such 
file or
directory
libffmpegthumbnailer/moviedecoder.h:38:29: error: ffmpeg/avformat.h: No such 
file or
directory
libffmpegthumbnailer/moviedecoder.cpp:28:28: error: ffmpeg/swscale.h: No such 
file or
directory
In file included from libffmpegthumbnailer/moviedecoder.cpp:17:
libffmpegthumbnailer/moviedecoder.h:45: error: ‘AVFormatContext’ has not 
been declared
libffmpegthumbnailer/moviedecoder.h:64: error: ‘PixelFormat’ has not been 
declared
libffmpegthumbnailer/moviedecoder.h:65: error: ‘AVFrame’ has not been 
declared
libffmpegthumbnailer/moviedecoder.h:65: error: ‘PixelFormat’ has not been 
declared
libffmpegthumbnailer/moviedecoder.h:70: error: ISO C++ forbids declaration of
‘AVFormatContext’ with no type
libffmpegthumbnailer/moviedecoder.h:70: error: expected ‘;’ before ‘*’ 
token
libffmpegthumbnailer/moviedecoder.h:71: error: ISO C++ forbids declaration of
‘AVCodecContext’ with no type
libffmpegthumbnailer/moviedecoder.h:71: error: expected ‘;’ before ‘*’ 
token
libffmpegthumbnailer/moviedecoder.h:72: error: ISO C++ forbids declaration of
‘AVCodec’ with no type
libffmpegthumbnailer/moviedecoder.h:72: error: expected ‘;’ before ‘*’ 
token
libffmpegthumbnailer/moviedecoder.h:73: error: ISO C++ forbids declaration of
‘AVStream’ with no type
libffmpegthumbnailer/moviedecoder.h:73: error: expected ‘;’ before ‘*’ 
token
libffmpegthumbnailer/moviedecoder.h:74: error: ISO C++ forbids declaration of
‘AVFrame’ with no type
libffmpegthumbnailer/moviedecoder.h:74: error: expected ‘;’ before ‘*’ 
token
libffmpegthumbnailer/moviedecoder.h:75: error: ISO C++ forbids declaration of
‘AVPacket’ with no type
libffmpegthumbnailer/moviedecoder.h:75: error: expected ‘;’ before ‘*’ 
token
libffmpegthumbnailer/moviedecoder.cpp:34: error: ‘AVFormatContext’ has not 
been declared
libffmpegthumbnailer/moviedecoder.cpp: In constructor
‘MovieDecoder::MovieDecoder(const std::string&, int*)’:
libffmpegthumbnailer/moviedecoder.cpp:36: error: class ‘MovieDecoder’ does 
not have
any field named ‘m_pFormatContext’
libffmpegthumbnailer/moviedecoder.cpp:37: error: class ‘MovieDecoder’ does 
not have
any field named ‘m_pVideoCodecContext’
libffmpegthumbnailer/moviedecoder.cpp:38: error: class ‘MovieDecoder’ does 
not have
any field named ‘m_pVideoCodec’
libffmpegthumbnailer/moviedecoder.cpp:39: error: class ‘MovieDecoder’ does 
not have
any field named ‘m_pVideoStream’
libffmpegthumbnailer/moviedecoder.cpp:40: error: class ‘MovieDecoder’ does 
not have
any field named ‘m_pFrame’
libffmpegthumbnailer/moviedecoder.cpp:41: error: class ‘MovieDecoder’ does 
not have
any field named ‘m_pPacket’
libffmpegthumbnailer/moviedecoder.cpp: In member function ‘void
MovieDecoder::initialize(const std::string&)’:
libffmpegthumbnailer/moviedecoder.cpp:55: error: ‘av_register_all’ was not 
declared
in this scope
libffmpegthumbnailer/moviedecoder.cpp:56: error: ‘avcodec_init’ was not 
declared in
this scope
libffmpegthumbnailer/moviedecoder.cpp:57: error: ‘avcodec_register_all’ was 
not
declared in this scope
libffmpegthumbnailer/moviedecoder.cpp:61: error: ‘m_pFormatContext’ was not 
declared
in this scope
libffmpegthumbnailer/moviedecoder.cpp:61: error: ‘av_open_input_file’ was 
not
declared in this scope
libffmpegthumbnailer/moviedecoder.cpp:66: error: ‘m_pFormatContext’ was not 
declared
in this scope
libffmpegthumbnailer/moviedecoder.cpp:66: error: ‘av_find_stream_info’ was 
not
declared in this scope
libffmpegthumbnailer/moviedecoder.cpp:72: error: ‘m_pFrame’ was not 
declared in this
scope
libffmpegthumbnailer/moviedecoder.cpp:72: error: ‘avcodec_alloc_frame’ was 
not
declared in this scope
libffmpegthumbnailer/moviedecoder.cpp: In member function ‘void 
MovieDecoder::destroy()’:
libffmpegthumbnailer/moviedecoder.cpp:77: error: ‘m_pVideoCodecContext’ was 
not
declared in this scope
libffmpegthumbnailer/moviedecoder.cpp:79: error: ‘avcodec_close’ was not 
declared in
this scope
libffmpegthumbnailer/moviedecoder.cpp:83: error: ‘m_pFormatContext’ was not 
declared
in this scope
libffmpegthumbnailer/moviedecoder.cpp:85: error: ‘av_close_input_file’ was 
not
declared in this scope
libffmpegthumbnailer/moviedecoder.cpp:89: error: ‘m_pPacket’ was not 
declared in this
scope
libffmpegthumbnailer/moviedecoder.cpp:91: error: ‘av_free_packet’ was not 
declared in
this scope
libffmpegthumbnailer/moviedecoder.cpp:92: error: type ‘<type error>’ 
argument given
to ‘delete’, expected pointer
libffmpegthumbnailer/moviedecoder.cpp:96: error: ‘m_pFrame’ was not 
declared in this
scope
libffmpegthumbnailer/moviedecoder.cpp:98: error: ‘av_free’ was not declared 
in this scope
libffmpegthumbnailer/moviedecoder.cpp: In member function ‘std::string
MovieDecoder::getCodec()’:
libffmpegthumbnailer/moviedecoder.cpp:105: error: ‘m_pVideoCodec’ was not 
declared in
this scope
libffmpegthumbnailer/moviedecoder.cpp: In member function ‘void
MovieDecoder::initializeVideo()’:
libffmpegthumbnailer/moviedecoder.cpp:115: error: ‘m_pFormatContext’ was 
not declared
in this scope
libffmpegthumbnailer/moviedecoder.cpp:117: error: ‘CODEC_TYPE_VIDEO’ was 
not declared
in this scope
libffmpegthumbnailer/moviedecoder.cpp:119: error: ‘m_pVideoStream’ was not 
declared
in this scope
libffmpegthumbnailer/moviedecoder.cpp:130: error: ‘m_pVideoCodecContext’ 
was not
declared in this scope
libffmpegthumbnailer/moviedecoder.cpp:130: error: ‘m_pFormatContext’ was 
not declared
in this scope
libffmpegthumbnailer/moviedecoder.cpp:131: error: ‘m_pVideoCodec’ was not 
declared in
this scope
libffmpegthumbnailer/moviedecoder.cpp:131: error: ‘avcodec_find_decoder’ 
was not
declared in this scope
libffmpegthumbnailer/moviedecoder.cpp:141: error: ‘AVFMT_FLAG_GENPTS’ was 
not
declared in this scope
libffmpegthumbnailer/moviedecoder.cpp:143: error: ‘avcodec_open’ was not 
declared in
this scope
libffmpegthumbnailer/moviedecoder.cpp: In member function ‘int 
MovieDecoder::getWidth()’:
libffmpegthumbnailer/moviedecoder.cpp:151: error: ‘m_pVideoCodecContext’ 
was not
declared in this scope
libffmpegthumbnailer/moviedecoder.cpp: In member function ‘int
MovieDecoder::getHeight()’:
libffmpegthumbnailer/moviedecoder.cpp:161: error: ‘m_pVideoCodecContext’ 
was not
declared in this scope
libffmpegthumbnailer/moviedecoder.cpp: In member function ‘int
MovieDecoder::getDuration()’:
libffmpegthumbnailer/moviedecoder.cpp:171: error: ‘m_pFormatContext’ was 
not declared
in this scope
libffmpegthumbnailer/moviedecoder.cpp:173: error: ‘AV_TIME_BASE’ was not 
declared in
this scope
libffmpegthumbnailer/moviedecoder.cpp: In member function ‘void 
MovieDecoder::seek(int)’:
libffmpegthumbnailer/moviedecoder.cpp:186: error: ‘AV_TIME_BASE’ was not 
declared in
this scope
libffmpegthumbnailer/moviedecoder.cpp:193: error: ‘m_pFormatContext’ was 
not declared
in this scope
libffmpegthumbnailer/moviedecoder.cpp:193: error: ‘av_seek_frame’ was not 
declared in
this scope
libffmpegthumbnailer/moviedecoder.cpp:196: error: ‘avcodec_flush_buffers’ 
was not
declared in this scope
libffmpegthumbnailer/moviedecoder.cpp:220: error: ‘m_pFrame’ was not 
declared in this
scope
libffmpegthumbnailer/moviedecoder.cpp: In member function ‘bool
MovieDecoder::decodeVideoPacket()’:
libffmpegthumbnailer/moviedecoder.cpp:242: error: ‘m_pPacket’ was not 
declared in
this scope
libffmpegthumbnailer/moviedecoder.cpp:249: error: ‘m_pVideoCodecContext’ 
was not
declared in this scope
libffmpegthumbnailer/moviedecoder.cpp:249: error: ‘m_pFrame’ was not 
declared in this
scope
libffmpegthumbnailer/moviedecoder.cpp:250: error: ‘m_pPacket’ was not 
declared in
this scope
libffmpegthumbnailer/moviedecoder.cpp:250: error: ‘avcodec_decode_video’ 
was not
declared in this scope
libffmpegthumbnailer/moviedecoder.cpp: In member function ‘bool
MovieDecoder::getVideoPacket()’:
libffmpegthumbnailer/moviedecoder.cpp:266: error: ‘m_pPacket’ was not 
declared in
this scope
libffmpegthumbnailer/moviedecoder.cpp:268: error: ‘av_free_packet’ was not 
declared
in this scope
libffmpegthumbnailer/moviedecoder.cpp:269: error: type ‘<type error>’ 
argument given
to ‘delete’, expected pointer
libffmpegthumbnailer/moviedecoder.cpp:272: error: ‘m_pPacket’ was not 
declared in
this scope
libffmpegthumbnailer/moviedecoder.cpp:272: error: expected type-specifier before
‘AVPacket’
libffmpegthumbnailer/moviedecoder.cpp:272: error: expected `;' before 
‘AVPacket’
libffmpegthumbnailer/moviedecoder.cpp:276: error: ‘m_pFormatContext’ was 
not declared
in this scope
libffmpegthumbnailer/moviedecoder.cpp:276: error: ‘av_read_frame’ was not 
declared in
this scope
libffmpegthumbnailer/moviedecoder.cpp:283: error: ‘av_free_packet’ was not 
declared
in this scope
libffmpegthumbnailer/moviedecoder.cpp: In member function ‘void
MovieDecoder::getScaledVideoFrame(int, bool, VideoFrame&)’:
libffmpegthumbnailer/moviedecoder.cpp:293: error: ‘m_pFrame’ was not 
declared in this
scope
libffmpegthumbnailer/moviedecoder.cpp:295: error: ‘AVPicture’ was not 
declared in
this scope
libffmpegthumbnailer/moviedecoder.cpp:295: error: expected primary-expression 
before
‘)’ token
libffmpegthumbnailer/moviedecoder.cpp:295: error: expected primary-expression 
before
‘)’ token
libffmpegthumbnailer/moviedecoder.cpp:295: error: ‘m_pVideoCodecContext’ 
was not
declared in this scope
libffmpegthumbnailer/moviedecoder.cpp:296: error: ‘avpicture_deinterlace’ 
was not
declared in this scope
libffmpegthumbnailer/moviedecoder.cpp:300: error: ‘PIX_FMT_RGB24’ was not 
declared in
this scope
libffmpegthumbnailer/moviedecoder.cpp:304: error: ‘m_pFrame’ was not 
declared in this
scope
libffmpegthumbnailer/moviedecoder.cpp: At global scope:
libffmpegthumbnailer/moviedecoder.cpp:311: error: variable or field
‘convertAndScaleFrame’ declared void
libffmpegthumbnailer/moviedecoder.cpp:311: error: ‘PixelFormat’ was not 
declared in
this scope
libffmpegthumbnailer/moviedecoder.cpp:311: error: expected primary-expression 
before
‘int’
libffmpegthumbnailer/moviedecoder.cpp:311: error: expected primary-expression 
before
‘bool’
libffmpegthumbnailer/moviedecoder.cpp:311: error: expected primary-expression 
before
‘int’
libffmpegthumbnailer/moviedecoder.cpp:311: error: expected primary-expression 
before
‘int’
make[1]: *** [libffmpegthumbnailer_la-moviedecoder.lo] Error 1
make[1]: Leaving directory `/media/ramdisk/ffmpegthumbnailer-read-only'
make: *** [all-recursive] Error 1

Original comment by aob.phan...@gmail.com on 6 May 2009 at 8:19

GoogleCodeExporter commented 9 years ago
Can you do an svn update and try again?

Thanks

Original comment by dirk.vdb on 6 May 2009 at 8:28

GoogleCodeExporter commented 9 years ago
It compiles :)

Original comment by aob.phan...@gmail.com on 6 May 2009 at 8:55

GoogleCodeExporter commented 9 years ago
\o/

My apologies for ignoring the issue...
It seems fedora is the only distro that has cflags defined for ffmpeg, of 
course I
should have never ignored them.

Original comment by dirk.vdb on 6 May 2009 at 8:58

GoogleCodeExporter commented 9 years ago
Thanks for resolving it ... :)

Original comment by aob.phan...@gmail.com on 6 May 2009 at 9:02

GoogleCodeExporter commented 9 years ago
I am having similar problems again with today's snapshot of ffmpeg. 
(2011-05-05). 

ffmpegthumbnailer-2.0.6 won't compile with : 

/bin/sh ./libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.      
-I/usr/include/libpng12   -D__STDC_CONSTANT_MACROS -MT 
libffmpegthumbnailer_la-moviedecoder.lo -MD -MP -MF 
.deps/libffmpegthumbnailer_la-moviedecoder.Tpo -c -o 
libffmpegthumbnailer_la-moviedecoder.lo `test -f 
'libffmpegthumbnailer/moviedecoder.cpp' || echo 
'./'`libffmpegthumbnailer/moviedecoder.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I/usr/include/libpng12 
-D__STDC_CONSTANT_MACROS -MT libffmpegthumbnailer_la-moviedecoder.lo -MD -MP 
-MF .deps/libffmpegthumbnailer_la-moviedecoder.Tpo -c 
libffmpegthumbnailer/moviedecoder.cpp  -fPIC -DPIC -o 
.libs/libffmpegthumbnailer_la-moviedecoder.o
libffmpegthumbnailer/moviedecoder.cpp: In member function 'void 
ffmpegthumbnailer::MovieDecoder::initializeVideo()':
libffmpegthumbnailer/moviedecoder.cpp:130: error: 'CODEC_TYPE_VIDEO' was not 
declared in this scope
make[2]: *** [libffmpegthumbnailer_la-moviedecoder.lo] Error 1
make[2]: Leaving directory `/root/61/ffmpegthumbnailer-2.0.6'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/61/ffmpegthumbnailer-2.0.6'
make: *** [all] Error 2

The last ffmpeg snapshot I built against was 2011-03-09 and 
ffmpegthumbnailer-2.0.2 and it worked. If I downgrade to ffmpeg-2011-03-09 
again, 2.0.6 builds just fine. 

Upon further investigation I found in ffmpeg-2011-03-09, avcodec.h : 

#if LIBAVCODEC_VERSION_MAJOR < 53
#define CodecType AVMediaType

#define CODEC_TYPE_UNKNOWN    AVMEDIA_TYPE_UNKNOWN
#define CODEC_TYPE_VIDEO      AVMEDIA_TYPE_VIDEO
#define CODEC_TYPE_AUDIO      AVMEDIA_TYPE_AUDIO
#define CODEC_TYPE_DATA       AVMEDIA_TYPE_DATA
#define CODEC_TYPE_SUBTITLE   AVMEDIA_TYPE_SUBTITLE
#define CODEC_TYPE_ATTACHMENT AVMEDIA_TYPE_ATTACHMENT
#define CODEC_TYPE_NB         AVMEDIA_TYPE_NB
#endif 

Which is no longer present in ffmpeg-2011-05-05... 

Original comment by andrixnet on 5 May 2011 at 1:23