python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / gstreamer / gst-plugins-base / 0001-tremor.patch
blobfa8785bed41821e6c0a8cc09e5386dee8ff38107
1 From 0088753651350de3060ece22c1be4153b6009515 Mon Sep 17 00:00:00 2001
2 From: Peter Korsgaard <jacmet@sunsite.dk>
3 Date: Wed, 25 Jan 2012 23:53:04 +0100
4 Subject: [PATCH] base: vorbisdeclib: support modern Tremor versions
6 Reported upstream as https://bugzilla.gnome.org/show_bug.cgi?id=668726
8 Tremor changed to use standard libogg rather than its own incompatible
9 copy back in Aug 2010 (r17375), causing gst-plugin-base build to fail.
11 Tremolo so far unfortunately hasn't been updated. Restructure
12 vorbisdeclib.h so the legacy _ogg_packet_wrapper code is only used for
13 Tremolo.
15 Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
16 ---
17 ext/vorbis/gstvorbisdeclib.h | 77 ++++++++++++++++++++++-------------------
18 1 files changed, 41 insertions(+), 36 deletions(-)
20 diff --git a/ext/vorbis/gstvorbisdeclib.h b/ext/vorbis/gstvorbisdeclib.h
21 index ca00af9..e147591 100644
22 --- a/ext/vorbis/gstvorbisdeclib.h
23 +++ b/ext/vorbis/gstvorbisdeclib.h
24 @@ -29,11 +29,6 @@
26 #ifndef TREMOR
28 -#include <vorbis/codec.h>
30 -typedef float vorbis_sample_t;
31 -typedef ogg_packet ogg_packet_wrapper;
33 #define GST_VORBIS_DEC_DESCRIPTION "decode raw vorbis streams to float audio"
35 #define GST_VORBIS_DEC_SRC_CAPS \
36 @@ -47,6 +42,42 @@ typedef ogg_packet ogg_packet_wrapper;
38 #define GST_VORBIS_DEC_GLIB_TYPE_NAME GstVorbisDec
40 +#else /* TREMOR */
42 +#define GST_VORBIS_DEC_DESCRIPTION "decode raw vorbis streams to integer audio"
44 +#define GST_VORBIS_DEC_SRC_CAPS \
45 + GST_STATIC_CAPS ("audio/x-raw-int, " \
46 + "rate = (int) [ 1, MAX ], " \
47 + "channels = (int) [ 1, 6 ], " \
48 + "endianness = (int) BYTE_ORDER, " \
49 + "width = (int) { 16, 32 }, " \
50 + "depth = (int) 16, " \
51 + "signed = (boolean) true")
53 +#define GST_VORBIS_DEC_DEFAULT_SAMPLE_WIDTH (16)
55 +/* we need a different type name here */
56 +#define GST_VORBIS_DEC_GLIB_TYPE_NAME GstIVorbisDec
58 +/* and still have it compile */
59 +typedef struct _GstVorbisDec GstIVorbisDec;
60 +typedef struct _GstVorbisDecClass GstIVorbisDecClass;
62 +#endif /* TREMOR */
64 +#ifndef USE_TREMOLO
66 +#ifdef TREMOR
67 + #include <tremor/ivorbiscodec.h>
68 + typedef ogg_int32_t vorbis_sample_t;
69 +#else
70 + #include <vorbis/codec.h>
71 + typedef float vorbis_sample_t;
72 +#endif
74 +typedef ogg_packet ogg_packet_wrapper;
76 static inline guint8 *
77 gst_ogg_packet_data (ogg_packet * p)
79 @@ -72,17 +103,11 @@ gst_ogg_packet_from_wrapper (ogg_packet_wrapper * packet)
80 return packet;
83 -#else
85 -#ifdef USE_TREMOLO
86 - #include <Tremolo/ivorbiscodec.h>
87 - #include <Tremolo/codec_internal.h>
88 - typedef ogg_int16_t vorbis_sample_t;
89 -#else
90 - #include <tremor/ivorbiscodec.h>
91 - typedef ogg_int32_t vorbis_sample_t;
92 -#endif
93 +#else /* USE_TREMOLO */
95 +#include <Tremolo/ivorbiscodec.h>
96 +#include <Tremolo/codec_internal.h>
97 +typedef ogg_int16_t vorbis_sample_t;
98 typedef struct _ogg_packet_wrapper ogg_packet_wrapper;
100 struct _ogg_packet_wrapper {
101 @@ -91,26 +116,6 @@ struct _ogg_packet_wrapper {
102 ogg_buffer buf;
105 -#define GST_VORBIS_DEC_DESCRIPTION "decode raw vorbis streams to integer audio"
107 -#define GST_VORBIS_DEC_SRC_CAPS \
108 - GST_STATIC_CAPS ("audio/x-raw-int, " \
109 - "rate = (int) [ 1, MAX ], " \
110 - "channels = (int) [ 1, 6 ], " \
111 - "endianness = (int) BYTE_ORDER, " \
112 - "width = (int) { 16, 32 }, " \
113 - "depth = (int) 16, " \
114 - "signed = (boolean) true")
116 -#define GST_VORBIS_DEC_DEFAULT_SAMPLE_WIDTH (16)
118 -/* we need a different type name here */
119 -#define GST_VORBIS_DEC_GLIB_TYPE_NAME GstIVorbisDec
121 -/* and still have it compile */
122 -typedef struct _GstVorbisDec GstIVorbisDec;
123 -typedef struct _GstVorbisDecClass GstIVorbisDecClass;
125 /* compensate minor variation */
126 #define vorbis_synthesis(a, b) vorbis_synthesis (a, b, 1)
128 @@ -154,7 +159,7 @@ gst_ogg_packet_from_wrapper (ogg_packet_wrapper * packet)
129 return &(packet->packet);
132 -#endif
133 +#endif /* USE_TREMOLO */
135 typedef void (*CopySampleFunc)(vorbis_sample_t *out, vorbis_sample_t **in,
136 guint samples, gint channels, gint width);
138 1.7.8.3