summaryrefslogtreecommitdiff
path: root/recipes/gstreamer/gst-plugins-ugly
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/gstreamer/gst-plugins-ugly
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/gstreamer/gst-plugins-ugly')
-rw-r--r--recipes/gstreamer/gst-plugins-ugly/gstmad_16bit.patch110
-rw-r--r--recipes/gstreamer/gst-plugins-ugly/gstsid_autofoo_HACK.patch20
2 files changed, 130 insertions, 0 deletions
diff --git a/recipes/gstreamer/gst-plugins-ugly/gstmad_16bit.patch b/recipes/gstreamer/gst-plugins-ugly/gstmad_16bit.patch
new file mode 100644
index 0000000000..c766a5b916
--- /dev/null
+++ b/recipes/gstreamer/gst-plugins-ugly/gstmad_16bit.patch
@@ -0,0 +1,110 @@
+diff -urN gst-plugins-ugly-0.10.10.orig/ext/mad/gstmad.c gst-plugins-ugly-0.10.10/ext/mad/gstmad.c
+--- gst-plugins-ugly-0.10.10.orig/ext/mad/gstmad.c 2008-11-08 15:48:46.000000000 +0100
++++ gst-plugins-ugly-0.10.10/ext/mad/gstmad.c 2009-02-20 02:24:20.000000000 +0100
+@@ -65,8 +65,8 @@
+ GST_STATIC_CAPS ("audio/x-raw-int, "
+ "endianness = (int) " G_STRINGIFY (G_BYTE_ORDER) ", "
+ "signed = (boolean) true, "
+- "width = (int) 32, "
+- "depth = (int) 32, "
++ "width = (int) 16, "
++ "depth = (int) 16, "
+ "rate = (int) { 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }, "
+ "channels = (int) [ 1, 2 ]")
+ );
+@@ -407,7 +407,7 @@
+
+ mad = GST_MAD (GST_PAD_PARENT (pad));
+
+- bytes_per_sample = mad->channels * 4;
++ bytes_per_sample = mad->channels << 1;
+
+ switch (src_format) {
+ case GST_FORMAT_BYTES:
+@@ -832,13 +832,11 @@
+ return res;
+ }
+
+-static inline gint32
++static inline gint16
+ scale (mad_fixed_t sample)
+ {
+-#if MAD_F_FRACBITS < 28
+ /* round */
+- sample += (1L << (28 - MAD_F_FRACBITS - 1));
+-#endif
++ sample += (1L << (MAD_F_FRACBITS - 16));
+
+ /* clip */
+ if (sample >= MAD_F_ONE)
+@@ -846,13 +844,8 @@
+ else if (sample < -MAD_F_ONE)
+ sample = -MAD_F_ONE;
+
+-#if MAD_F_FRACBITS < 28
+ /* quantize */
+- sample >>= (28 - MAD_F_FRACBITS);
+-#endif
+-
+- /* convert from 29 bits to 32 bits */
+- return (gint32) (sample << 3);
++ return sample >> (MAD_F_FRACBITS + 1 - 16);
+ }
+
+ /* do we need this function? */
+@@ -1263,8 +1256,8 @@
+ caps = gst_caps_new_simple ("audio/x-raw-int",
+ "endianness", G_TYPE_INT, G_BYTE_ORDER,
+ "signed", G_TYPE_BOOLEAN, TRUE,
+- "width", G_TYPE_INT, 32,
+- "depth", G_TYPE_INT, 32,
++ "width", G_TYPE_INT, 16,
++ "depth", G_TYPE_INT, 16,
+ "rate", G_TYPE_INT, rate, "channels", G_TYPE_INT, nchannels, NULL);
+
+ gst_pad_set_caps (mad->srcpad, caps);
+@@ -1581,7 +1574,7 @@
+ to skip and send the remaining pcm samples */
+
+ GstBuffer *outbuffer = NULL;
+- gint32 *outdata;
++ gint16 *outdata;
+ mad_fixed_t const *left_ch, *right_ch;
+
+ if (mad->need_newsegment) {
+@@ -1612,7 +1605,7 @@
+ /* will attach the caps to the buffer */
+ result =
+ gst_pad_alloc_buffer_and_set_caps (mad->srcpad, 0,
+- nsamples * mad->channels * 4, GST_PAD_CAPS (mad->srcpad),
++ nsamples * mad->channels * 2, GST_PAD_CAPS (mad->srcpad),
+ &outbuffer);
+ if (result != GST_FLOW_OK) {
+ /* Head for the exit, dropping samples as we go */
+@@ -1625,7 +1618,7 @@
+ left_ch = mad->synth.pcm.samples[0];
+ right_ch = mad->synth.pcm.samples[1];
+
+- outdata = (gint32 *) GST_BUFFER_DATA (outbuffer);
++ outdata = (gint16 *) GST_BUFFER_DATA (outbuffer);
+
+ GST_DEBUG ("mad out timestamp %" GST_TIME_FORMAT,
+ GST_TIME_ARGS (time_offset));
+@@ -1640,14 +1633,14 @@
+ gint count = nsamples;
+
+ while (count--) {
+- *outdata++ = scale (*left_ch++) & 0xffffffff;
++ *outdata++ = scale (*left_ch++) & 0xffff;
+ }
+ } else {
+ gint count = nsamples;
+
+ while (count--) {
+- *outdata++ = scale (*left_ch++) & 0xffffffff;
+- *outdata++ = scale (*right_ch++) & 0xffffffff;
++ *outdata++ = scale (*left_ch++) & 0xffff;
++ *outdata++ = scale (*right_ch++) & 0xffff;
+ }
+ }
+
diff --git a/recipes/gstreamer/gst-plugins-ugly/gstsid_autofoo_HACK.patch b/recipes/gstreamer/gst-plugins-ugly/gstsid_autofoo_HACK.patch
new file mode 100644
index 0000000000..79a03741ac
--- /dev/null
+++ b/recipes/gstreamer/gst-plugins-ugly/gstsid_autofoo_HACK.patch
@@ -0,0 +1,20 @@
+Index: gst-plugins-ugly-0.10.6/m4/gst-sid.m4
+===================================================================
+--- gst-plugins-ugly-0.10.6.orig/m4/gst-sid.m4
++++ gst-plugins-ugly-0.10.6/m4/gst-sid.m4
+@@ -16,14 +16,7 @@ if test $HAVE_SIDPLAY = "yes"; then
+
+ LIBS="-lsidplay"
+
+- AC_TRY_RUN([
+- #include <sidplay/player.h>
+- int main()
+- { sidTune tune = sidTune(0); }
+- ],
+- HAVE_SIDPLAY="yes",
+- HAVE_SIDPLAY="no",
+- HAVE_SIDPLAY="no")
++ HAVE_SIDPLAY="yes"
+
+ LIBS="$ac_libs_safe"
+