summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-libs/opal/files/30644-updated-to-yet-another-ffmpeg-libav-api-change.patch58
-rw-r--r--net-libs/opal/files/30645-fixed-use-with-older-ffmpeg-after-upgrading-to-later-ffmpeg-isnt-this-fun.patch18
-rw-r--r--net-libs/opal/opal-3.12.4.ebuild2
3 files changed, 78 insertions, 0 deletions
diff --git a/net-libs/opal/files/30644-updated-to-yet-another-ffmpeg-libav-api-change.patch b/net-libs/opal/files/30644-updated-to-yet-another-ffmpeg-libav-api-change.patch
new file mode 100644
index 00000000..cfe5a8e5
--- /dev/null
+++ b/net-libs/opal/files/30644-updated-to-yet-another-ffmpeg-libav-api-change.patch
@@ -0,0 +1,58 @@
+http://sourceforge.net/p/opalvoip/code/30644/
+
+Index: opal/trunk/plugins/video/H.264/h264-x264.cxx
+===================================================================
+--- opal/trunk/plugins/video/H.264/h264-x264.cxx (revision 30643)
++++ opal/trunk/plugins/video/H.264/h264-x264.cxx (revision 30644)
+@@ -789,9 +789,13 @@
+ if (!InitDecoder(CODEC_ID_H264))
+ return false;
+
++#ifdef FF_IDCT_H264
+ m_context->idct_algo = FF_IDCT_H264;
++#else
++ m_context->idct_algo = FF_IDCT_AUTO;
++#endif
+ m_context->flags = CODEC_FLAG_INPUT_PRESERVED | CODEC_FLAG_EMU_EDGE;
+- m_context->flags2 = CODEC_FLAG2_SKIP_RD |
++ m_context->flags2 =
+ #ifdef CODEC_FLAG2_DROP_FRAME_TIMECODE
+ CODEC_FLAG2_DROP_FRAME_TIMECODE |
+ #endif
+Index: opal/trunk/plugins/video/common/ffmpeg.cxx
+===================================================================
+--- opal/trunk/plugins/video/common/ffmpeg.cxx (revision 30643)
++++ opal/trunk/plugins/video/common/ffmpeg.cxx (revision 30644)
+@@ -179,7 +179,7 @@
+ static_cast<FFMPEGCodec *>(ctx->opaque)->GetEncodedFrame()->RTPCallBack(data, size, numMB);
+ }
+
+-bool FFMPEGCodec::InitEncoder(CodecID codecId)
++bool FFMPEGCodec::InitEncoder(AVCodecID codecId)
+ {
+ PTRACE(5, m_prefix, "Opening encoder");
+
+@@ -214,7 +214,7 @@
+ }
+
+
+-bool FFMPEGCodec::InitDecoder(CodecID codecId)
++bool FFMPEGCodec::InitDecoder(AVCodecID codecId)
+ {
+ if ((m_codec = avcodec_find_decoder(codecId)) == NULL) {
+ PTRACE(1, m_prefix, "Codec not found for decoder");
+Index: opal/trunk/plugins/video/common/ffmpeg.h
+===================================================================
+--- opal/trunk/plugins/video/common/ffmpeg.h (revision 30643)
++++ opal/trunk/plugins/video/common/ffmpeg.h (revision 30644)
+@@ -120,8 +120,8 @@
+ FFMPEGCodec(const char * prefix, EncodedFrame * fullFrame);
+ ~FFMPEGCodec();
+
+- virtual bool InitEncoder(CodecID codecId);
+- virtual bool InitDecoder(CodecID codecId);
++ virtual bool InitEncoder(AVCodecID codecId);
++ virtual bool InitDecoder(AVCodecID codecId);
+
+ bool SetResolution(unsigned width, unsigned height);
+ void SetEncoderOptions(
diff --git a/net-libs/opal/files/30645-fixed-use-with-older-ffmpeg-after-upgrading-to-later-ffmpeg-isnt-this-fun.patch b/net-libs/opal/files/30645-fixed-use-with-older-ffmpeg-after-upgrading-to-later-ffmpeg-isnt-this-fun.patch
new file mode 100644
index 00000000..a53ca92c
--- /dev/null
+++ b/net-libs/opal/files/30645-fixed-use-with-older-ffmpeg-after-upgrading-to-later-ffmpeg-isnt-this-fun.patch
@@ -0,0 +1,18 @@
+http://sourceforge.net/p/opalvoip/code/30645/
+
+Index: opal/trunk/plugins/video/common/ffmpeg.h
+===================================================================
+--- opal/trunk/plugins/video/common/ffmpeg.h (revision 30644)
++++ opal/trunk/plugins/video/common/ffmpeg.h (revision 30645)
+@@ -65,7 +65,11 @@
+ #include "libavformat/avformat.h"
+ #endif
+
++#if LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(52, 123, 0)
++ typedef CodecID AVCodecID;
++#endif
+
++
+ /////////////////////////////////////////////////////////////////
+
+ class FFMPEGCodec
diff --git a/net-libs/opal/opal-3.12.4.ebuild b/net-libs/opal/opal-3.12.4.ebuild
index c1496fb6..b91d3511 100644
--- a/net-libs/opal/opal-3.12.4.ebuild
+++ b/net-libs/opal/opal-3.12.4.ebuild
@@ -85,6 +85,8 @@ src_prepare() {
fi
epatch "${FILESDIR}/${PN}-3.12.4-java-ruby-swig-fix.patch"
+ epatch "${FILESDIR}/30644-updated-to-yet-another-ffmpeg-libav-api-change.patch"
+ epatch "${FILESDIR}/30645-fixed-use-with-older-ffmpeg-after-upgrading-to-later-ffmpeg-isnt-this-fun.patch"
sed -i -e "s:\(.*HAS_H224.*\), \[OPAL_H323\]:\1:" configure.ac \
|| die "sed failed"