Merge remote-tracking branch 'origin/master' into 0.11
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 9 Oct 2011 15:08:36 +0000 (16:08 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 9 Oct 2011 15:08:36 +0000 (16:08 +0100)
Conflicts:
tests/check/pipelines/vorbisdec.c
tests/check/pipelines/vorbisenc.c

1  2 
gst-libs/gst/audio/gstaudiodecoder.c
gst-libs/gst/audio/gstaudioencoder.c
tests/check/elements/vorbisdec.c
tests/check/pipelines/vorbisdec.c
tests/check/pipelines/vorbisenc.c

Simple merge
Simple merge
Simple merge
@@@ -54,8 -54,11 +54,11 @@@ GST_START_TEST (test_timestamps
    GstBus *bus;
    GError *error = NULL;
  
+   /* allowing some tolerance permits audiodecoder to come up with
+    * perfect timestamps rather than sticking to upstream ts */
    pipe_str = g_strdup_printf ("audiotestsrc num-buffers=100"
-       " ! audio/x-raw,rate=44100 ! audioconvert ! vorbisenc ! vorbisdec"
 -      " ! audio/x-raw-int,rate=44100 ! audioconvert ! vorbisenc "
++      " ! audio/x-raw,rate=44100 ! audioconvert ! vorbisenc "
+       " ! vorbisdec tolerance=10000000 "
        " ! identity check-imperfect-timestamp=TRUE ! fakesink");
  
    pipeline = gst_parse_launch (pipe_str, &error);
@@@ -261,18 -261,10 +261,18 @@@ GST_START_TEST (test_timestamps
  
  GST_END_TEST;
  
 -static gboolean
 -drop_second_data_buffer (GstPad * droppad, GstBuffer * buffer, gpointer unused)
 +static GstProbeReturn
 +drop_second_data_buffer (GstPad * droppad, GstProbeType type,
 +    GstBuffer * buffer, gpointer unused)
  {
 -  return !(GST_BUFFER_OFFSET (buffer) == 4096);
 +  GstProbeReturn res = GST_PROBE_OK;
 +
-   if (GST_BUFFER_OFFSET (buffer) == 1024)
++  if (GST_BUFFER_OFFSET (buffer) == 4096)
 +    res = GST_PROBE_DROP;
 +
 +  GST_DEBUG ("dropping %d", res);
 +
 +  return res;
  }
  
  GST_START_TEST (test_discontinuity)
    GError *error = NULL;
    guint drop_id;
  
+   /* make audioencoder act sufficiently pedantic */
    pipe_str = g_strdup_printf ("audiotestsrc samplesperbuffer=1024"
-       " ! audio/x-raw,rate=44100" " ! audioconvert ! vorbisenc ! fakesink");
 -      " ! audio/x-raw-int,rate=44100" " ! audioconvert "
++      " ! audio/x-raw,rate=44100" " ! audioconvert "
+       " ! vorbisenc tolerance=10000000 ! fakesink");
  
    bin = gst_parse_launch (pipe_str, &error);
    fail_unless (bin != NULL, "Error parsing pipeline: %s",