Subject: | Can't compile against FFmpeg API |
Checking if your kit is complete...
Looks good
Writing Makefile for Video::FFmpeg
Writing MYMETA.yml
cp lib/Video/FFmpeg/AVStream/Audio.pm
blib/lib/Video/FFmpeg/AVStream/Audio.pm
cp lib/Video/FFmpeg/AVStream/Subtitle.pm
blib/lib/Video/FFmpeg/AVStream/Subtitle.pm
cp lib/Video/FFmpeg/AVStream/Video.pm
blib/lib/Video/FFmpeg/AVStream/Video.pm
cp lib/Video/FFmpeg.pm blib/lib/Video/FFmpeg.pm
cp lib/Video/FFmpeg/AVFormat.pm blib/lib/Video/FFmpeg/AVFormat.pm
cp lib/Video/FFmpeg/AVStream.pm blib/lib/Video/FFmpeg/AVStream.pm
/usr/bin/perl5.14.0 /usr/share/perl5/ExtUtils/xsubpp -typemap
/usr/share/perl5/ExtUtils/typemap -typemap typemap FFmpeg.xs >
FFmpeg.xsc && mv FFmpeg.xsc FFmpeg.c
Please specify prototyping behavior for FFmpeg.xs (see perlxs manual)
cc -c -I. -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -
fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -
D_FILE_OFFSET_BITS=64 -O2 -fPIC -DVERSION=\"0.47\" -
DXS_VERSION=\"0.47\" -fPIC "-I/usr/lib64/perl5/CORE" FFmpeg.c
FFmpeg.xs:7:22: fatal error: avformat.h: No such file or directory
compilation terminated.
make: *** [FFmpeg.o] Error 1
-----
Apply this patch and it will compile. I'm still getting SEGFAULTS,
though.
Subject: | Video-FFmpeg-0.47_ffmpeg_new_api.patch |
diff -ru Video-FFmpeg-0.47.orig/FFmpeg.xs Video-FFmpeg-0.47/FFmpeg.xs
--- Video-FFmpeg-0.47.orig/FFmpeg.xs 2010-10-27 21:33:15.000000000 -0500
+++ Video-FFmpeg-0.47/FFmpeg.xs 2011-07-23 17:58:07.000000000 -0500
@@ -4,7 +4,7 @@
#include "ppport.h"
-#include <avformat.h>
+#include <libavformat/avformat.h>
#include <pthread.h>
pthread_mutex_t AVFormatCtxMP;
@@ -88,7 +88,7 @@
Video_FFmpeg_AVStream_Video *
get_video_stream(Video_FFmpeg_AVFormat *self, int id)
CODE:
- if(CODEC_TYPE_VIDEO == self->streams[id]->codec->codec_type)
+ if(AVMEDIA_TYPE_VIDEO == self->streams[id]->codec->codec_type)
RETVAL = self->streams[id];
else
RETVAL = NULL;
@@ -97,7 +97,7 @@
Video_FFmpeg_AVStream_Audio *
get_audio_stream(Video_FFmpeg_AVFormat *self, int id)
CODE:
- if(CODEC_TYPE_AUDIO == self->streams[id]->codec->codec_type)
+ if(AVMEDIA_TYPE_AUDIO == self->streams[id]->codec->codec_type)
RETVAL = self->streams[id];
else
RETVAL = NULL;
@@ -175,19 +175,19 @@
codec_type(Video_FFmpeg_AVStream *st);
CODE:
switch(st->codec->codec_type){
- case CODEC_TYPE_VIDEO:
+ case AVMEDIA_TYPE_VIDEO:
RETVAL = "video";
break;
- case CODEC_TYPE_AUDIO:
+ case AVMEDIA_TYPE_AUDIO:
RETVAL = "audio";
break;
- case CODEC_TYPE_SUBTITLE:
+ case AVMEDIA_TYPE_SUBTITLE:
RETVAL = "subtitle";
break;
- case CODEC_TYPE_DATA:
+ case AVMEDIA_TYPE_DATA:
RETVAL = "data";
break;
- case CODEC_TYPE_ATTACHMENT:
+ case AVMEDIA_TYPE_ATTACHMENT:
RETVAL = "attachment";
break;
default: