cornel90 / ffmpegthumbnailer

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

2.0.6 won't compile with recent ffmpeg due to changes in avcodec.h #84

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am having problems 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 issue reported on code.google.com by andrixnet on 5 May 2011 at 1:26

GoogleCodeExporter commented 9 years ago
Here is patch file to compile it without this error

Original comment by heimsasc...@gmail.com on 10 Jun 2011 at 7:17

Attachments:

GoogleCodeExporter commented 9 years ago
Should be included in the next release. 

Thank you. 

Original comment by andrixnet on 27 Jun 2011 at 5:37

GoogleCodeExporter commented 9 years ago
Please verify that the trunk works

Original comment by dirk.vdb on 30 Jun 2011 at 4:59

GoogleCodeExporter commented 9 years ago
I compiled version 2.0.6, applying the attached patch. Worked like charm. 

Original comment by andrixnet on 30 Jun 2011 at 6:00

GoogleCodeExporter commented 9 years ago
The patch above is not correct, it breaks compiling with older versions. I 
implemented a different fix in subversion.

Original comment by dirk.vdb on 30 Jun 2011 at 6:11

GoogleCodeExporter commented 9 years ago
The change made in r234 changes CODEC_TYPE_VIDEO to AVMEDIA_TYPE_AUDIO. That 
does not seem correct.

Original comment by floppymaster@gmail.com on 23 Jul 2011 at 6:41

GoogleCodeExporter commented 9 years ago
You are completely correct, my mistake. I fixed this. Can you verify if it 
works now, than I will create a new release.

Original comment by dirk.vdb on 24 Jul 2011 at 10:03

GoogleCodeExporter commented 9 years ago
r235 works for me with ffmpeg-0.8 (libavcodec 53.7.0).

Original comment by floppymaster@gmail.com on 24 Jul 2011 at 3:58

GoogleCodeExporter commented 9 years ago
Thanks vor verifying, release 2.0.7 has been released

Original comment by dirk.vdb on 24 Jul 2011 at 4:37

GoogleCodeExporter commented 9 years ago

Original comment by dirk.vdb on 24 Jul 2011 at 4:37