[packages/opal] - fix build with ffmpeg2
baggins
baggins at pld-linux.org
Thu Aug 29 14:31:46 CEST 2013
commit fcc0d4f24120de8aba7e7672057fa36f64fdb366
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Thu Aug 29 14:31:38 2013 +0200
- fix build with ffmpeg2
ffmpeg2.patch | 159 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
opal.spec | 2 +
2 files changed, 161 insertions(+)
---
diff --git a/opal.spec b/opal.spec
index 1ff2fdf..5d3f1de 100644
--- a/opal.spec
+++ b/opal.spec
@@ -42,6 +42,7 @@ Patch3: %{name}-libilbc.patch
Patch4: %{name}-ah.patch
Patch5: %{name}-exceptions.patch
Patch6: %{name}-ruby.patch
+Patch7: ffmpeg2.patch
URL: http://www.opalvoip.org/
BuildRequires: autoconf >= 2.50
BuildRequires: automake
@@ -140,6 +141,7 @@ Biblioteki statyczne OPAL.
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
%build
PWLIBDIR=%{_prefix}; export PWLIBDIR
diff --git a/ffmpeg2.patch b/ffmpeg2.patch
new file mode 100644
index 0000000..4f148e4
--- /dev/null
+++ b/ffmpeg2.patch
@@ -0,0 +1,159 @@
+--- opal-3.10.10/plugins/video/H.263-1998/h263-1998.h~ 2013-02-20 03:18:03.000000000 +0100
++++ opal-3.10.10/plugins/video/H.263-1998/h263-1998.h 2013-08-29 14:28:11.502340861 +0200
+@@ -115,7 +115,7 @@
+ virtual ~H263_Base_EncoderContext();
+
+ virtual bool Init() = 0;
+- virtual bool Init(CodecID codecId);
++ virtual bool Init(AVCodecID codecId);
+
+ virtual bool SetOptions(const char * const * options);
+ virtual void SetOption(const char * option, const char * value);
+--- opal-3.10.10/plugins/video/H.263-1998/h263-1998.cxx~ 2013-08-29 14:21:22.604177100 +0200
++++ opal-3.10.10/plugins/video/H.263-1998/h263-1998.cxx 2013-08-29 14:28:29.062548150 +0200
+@@ -207,7 +207,7 @@
+ PTRACE(4, m_prefix, "Encoder closed");
+ }
+
+-bool H263_Base_EncoderContext::Init(CodecID codecId)
++bool H263_Base_EncoderContext::Init(AVCodecID codecId)
+ {
+ PTRACE(5, m_prefix, "Opening encoder");
+
+--- opal-3.10.10/plugins/video/common/dyna.h~ 2013-02-20 03:18:05.000000000 +0100
++++ opal-3.10.10/plugins/video/common/dyna.h 2013-08-29 14:29:42.440080869 +0200
+@@ -88,13 +88,13 @@
+ class FFMPEGLibrary
+ {
+ public:
+- FFMPEGLibrary(CodecID codec);
++ FFMPEGLibrary(AVCodecID codec);
+ ~FFMPEGLibrary();
+
+ bool Load();
+
+- AVCodec *AvcodecFindEncoder(enum CodecID id);
+- AVCodec *AvcodecFindDecoder(enum CodecID id);
++ AVCodec *AvcodecFindEncoder(enum AVCodecID id);
++ AVCodec *AvcodecFindDecoder(enum AVCodecID id);
+ AVCodecContext *AvcodecAllocContext(void);
+ AVFrame *AvcodecAllocFrame(void);
+ int AvcodecOpen(AVCodecContext *ctx, AVCodec *codec);
+@@ -117,15 +117,15 @@
+ DynaLink m_libAvcodec;
+ DynaLink m_libAvutil;
+
+- CodecID m_codec;
++ AVCodecID m_codec;
+ char m_codecString[32];
+
+ void (*Favcodec_init)(void);
+ void (*Fav_init_packet)(AVPacket *pkt);
+
+ void (*Favcodec_register_all)(void);
+- AVCodec *(*Favcodec_find_encoder)(enum CodecID id);
+- AVCodec *(*Favcodec_find_decoder)(enum CodecID id);
++ AVCodec *(*Favcodec_find_encoder)(enum AVCodecID id);
++ AVCodec *(*Favcodec_find_decoder)(enum AVCodecID id);
+ AVCodecContext *(*Favcodec_alloc_context)(void);
+ AVFrame *(*Favcodec_alloc_frame)(void);
+ int (*Favcodec_open)(AVCodecContext *ctx, AVCodec *codec);
+--- opal-3.10.10/plugins/video/common/dyna.cxx~ 2013-02-20 03:18:05.000000000 +0100
++++ opal-3.10.10/plugins/video/common/dyna.cxx 2013-08-29 14:29:20.729824652 +0200
+@@ -210,7 +210,7 @@
+ #endif
+
+
+-FFMPEGLibrary::FFMPEGLibrary(CodecID codec)
++FFMPEGLibrary::FFMPEGLibrary(AVCodecID codec)
+ {
+ m_codec = codec;
+ if (m_codec==CODEC_ID_H264)
+@@ -348,12 +348,12 @@
+ return true;
+ }
+
+-AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum CodecID id)
++AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum AVCodecID id)
+ {
+ return Favcodec_find_encoder(id);
+ }
+
+-AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum CodecID id)
++AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum AVCodecID id)
+ {
+ WaitAndSignal m(processLock);
+
+--- opal-3.10.10/plugins/video/common/ffmpeg/libavcodec/avcodec.h~ 2013-02-20 03:18:04.000000000 +0100
++++ opal-3.10.10/plugins/video/common/ffmpeg/libavcodec/avcodec.h 2013-08-29 14:30:51.204225613 +0200
+@@ -101,7 +101,7 @@
+ * 1. no value of a existing codec ID changes (that would break ABI),
+ * 2. it is as close as possible to similar codecs.
+ */
+-enum CodecID {
++enum AVCodecID {
+ CODEC_ID_NONE,
+
+ /* video codecs */
+@@ -1390,7 +1390,7 @@
+
+ char codec_name[32];
+ enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */
+- enum CodecID codec_id; /* see CODEC_ID_xxx */
++ enum AVCodecID codec_id; /* see CODEC_ID_xxx */
+
+ /**
+ * fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
+@@ -2843,7 +2843,7 @@
+ */
+ const char *name;
+ enum AVMediaType type;
+- enum CodecID id;
++ enum AVCodecID id;
+ int priv_data_size;
+ int (*init)(AVCodecContext *);
+ int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data);
+@@ -2898,7 +2898,7 @@
+ *
+ * See CODEC_ID_xxx
+ */
+- enum CodecID id;
++ enum AVCodecID id;
+
+ /**
+ * Supported pixel format.
+@@ -3402,10 +3402,10 @@
+ /**
+ * Find a registered encoder with a matching codec ID.
+ *
+- * @param id CodecID of the requested encoder
++ * @param id AVCodecID of the requested encoder
+ * @return An encoder if one was found, NULL otherwise.
+ */
+-AVCodec *avcodec_find_encoder(enum CodecID id);
++AVCodec *avcodec_find_encoder(enum AVCodecID id);
+
+ /**
+ * Find a registered encoder with the specified name.
+@@ -3418,10 +3418,10 @@
+ /**
+ * Find a registered decoder with a matching codec ID.
+ *
+- * @param id CodecID of the requested decoder
++ * @param id AVCodecID of the requested decoder
+ * @return A decoder if one was found, NULL otherwise.
+ */
+-AVCodec *avcodec_find_decoder(enum CodecID id);
++AVCodec *avcodec_find_decoder(enum AVCodecID id);
+
+ /**
+ * Find a registered decoder with the specified name.
+@@ -3822,7 +3822,7 @@
+ * @param[in] codec_id the codec
+ * @return Number of bits per sample or zero if unknown for the given codec.
+ */
+-int av_get_bits_per_sample(enum CodecID codec_id);
++int av_get_bits_per_sample(enum AVCodecID codec_id);
+
+ #if FF_API_OLD_SAMPLE_FMT
+ /**
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/opal.git/commitdiff/fcc0d4f24120de8aba7e7672057fa36f64fdb366
More information about the pld-cvs-commit
mailing list