gst-plugins-ugly: use opencore-amr
[opendreambox.git] / meta-opendreambox / recipes-multimedia / gstreamer / gst-plugins-ugly-0.10.19 / fix-opencore-amr-2.patch
1 Upstream-Status: Backport
2
3 From 425e6e395f6bcaff77d0393126e1253066ddcd8a Mon Sep 17 00:00:00 2001
4 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim.muller@collabora.co.uk>
5 Date: Sat, 3 Mar 2012 17:17:31 +0000
6 Subject: [PATCH 2/2] amrnb, amrwbdec: fix build with opencore-amr >= 0.1.3
7
8 In previous versions, the opencore-amr include sub-directory
9 would be specified in the include path in the CFLAGS, but this
10 is no longer the case in newer versions, so we need to add those
11 to our include directives.
12
13 Based on patch by: Christian Morales Vega
14
15 https://bugzilla.gnome.org/show_bug.cgi?id=671123
16 ---
17  configure.ac            |    6 ++++++
18  ext/amrnb/amrnbdec.h    |    5 +++++
19  ext/amrnb/amrnbenc.h    |    7 ++++++-
20  ext/amrwbdec/amrwbdec.h |    6 ++++++
21  4 files changed, 23 insertions(+), 1 deletion(-)
22
23 diff --git a/configure.ac b/configure.ac
24 index 3c2e341..18f2904 100644
25 --- a/configure.ac
26 +++ b/configure.ac
27 @@ -251,6 +251,9 @@ dnl *** amr-nb ***
28  translit(dnm, m, l) AM_CONDITIONAL(USE_AMRNB, true)
29  AG_GST_CHECK_FEATURE(AMRNB, [amrnb library], amrnb, [
30    PKG_CHECK_MODULES(AMRNB, opencore-amrnb, [
31 +    if $PKG_CONFIG --atleast-version=0.1.3 opencore-amrnb; then
32 +      AC_DEFINE(HAVE_OPENCORE_AMRNB_0_1_3_OR_LATER, 1, [Defined for newer opencore-amrnb])
33 +    fi
34      HAVE_AMRNB="yes"
35    ], [
36      HAVE_AMRNB="no"
37 @@ -263,6 +266,9 @@ dnl *** amr-wb dec ***
38  translit(dnm, m, l) AM_CONDITIONAL(USE_AMRWB, true)
39  AG_GST_CHECK_FEATURE(AMRWB, [amrwb library], amrwbdec, [
40    PKG_CHECK_MODULES(AMRWB, opencore-amrwb, [
41 +    if $PKG_CONFIG --atleast-version=0.1.3 opencore-amrwb; then
42 +      AC_DEFINE(HAVE_OPENCORE_AMRWB_0_1_3_OR_LATER, 1, [Defined for newer opencore-amrwb])
43 +    fi
44      HAVE_AMRWB="yes"
45    ], [
46      HAVE_AMRWB="no"
47 diff --git a/ext/amrnb/amrnbdec.h b/ext/amrnb/amrnbdec.h
48 index 1e81839..5fe6982 100644
49 --- a/ext/amrnb/amrnbdec.h
50 +++ b/ext/amrnb/amrnbdec.h
51 @@ -22,7 +22,12 @@
52  
53  #include <gst/gst.h>
54  #include <gst/audio/gstaudiodecoder.h>
55 +
56 +#ifdef HAVE_OPENCORE_AMRNB_0_1_3_OR_LATER
57 +#include <opencore-amrnb/interf_dec.h>
58 +#else
59  #include <interf_dec.h>
60 +#endif
61  
62  G_BEGIN_DECLS
63  
64 diff --git a/ext/amrnb/amrnbenc.h b/ext/amrnb/amrnbenc.h
65 index 7f673ac..48a8fe8 100644
66 --- a/ext/amrnb/amrnbenc.h
67 +++ b/ext/amrnb/amrnbenc.h
68 @@ -21,9 +21,14 @@
69  #define __GST_AMRNBENC_H__
70  
71  #include <gst/gst.h>
72 -#include <interf_enc.h>
73  #include <gst/audio/gstaudioencoder.h>
74  
75 +#ifdef HAVE_OPENCORE_AMRNB_0_1_3_OR_LATER
76 +#include <opencore-amrnb/interf_enc.h>
77 +#else
78 +#include <interf_enc.h>
79 +#endif
80 +
81  G_BEGIN_DECLS
82  
83  #define GST_TYPE_AMRNBENC \
84 diff --git a/ext/amrwbdec/amrwbdec.h b/ext/amrwbdec/amrwbdec.h
85 index c3528fc..6b82ae9 100644
86 --- a/ext/amrwbdec/amrwbdec.h
87 +++ b/ext/amrwbdec/amrwbdec.h
88 @@ -22,8 +22,14 @@
89  
90  #include <gst/gst.h>
91  #include <gst/audio/gstaudiodecoder.h>
92 +
93 +#ifdef HAVE_OPENCORE_AMRWB_0_1_3_OR_LATER
94 +#include <opencore-amrwb/dec_if.h>
95 +#include <opencore-amrwb/if_rom.h>
96 +#else
97  #include <dec_if.h>
98  #include <if_rom.h>
99 +#endif
100  
101  G_BEGIN_DECLS
102  
103 -- 
104 1.7.9.5
105