[Sugar-devel] gst-plugins-espeak port to gstreamer 1.0

Daniel Narvaez dwnarvaez at gmail.com
Sun Aug 19 06:48:40 EDT 2012


On 19 August 2012 09:02, Aleksey Lim <alsroot at sugarlabs.org> wrote:
>> I still think returning an arbitrary
>> size buffer is wrong and should be fixed at some point.
>
> The original buffer size should not matter, if I got gst docs right,
> only `offset` and `size` does matter
> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#gst-buffer-new-wrapped-full
>

That's my understanding too. But we are not passing gst_espeak_create
size as size to gst_buffer_new_wrapped_full, because of this

    switch (g_atomic_int_get (&self->track)) {
    case ESPEAK_TRACK_WORD:
    case ESPEAK_TRACK_MARK:
        size_to_play = events (self, spin, size_to_play);
        break;
    default:
        size_to_play = whole (spin, size_to_play);
        break;
    }


>> >> gst-launch-1.0 espeak text="Hello world" ! autoaudiosink
>
> I compiled gst from git and got broken `autoaudiosink` behaviour. For
> example
>
>     gst-launch -v -m audiotestsrc ! audioconvert ! audioresample ! autoaudiosink
>
> fails with the same error as
>
>     gst-launch-1.0 espeak text="Hello world" ! autoaudiosink
>
> So, it seems to gst development code fails.

I have a few days old gstreamer tree where autoaudiosink seems to be
fine. I need to apply the following to make espeak work though (it was
in my patch, http://lists.sugarlabs.org/archive/sugar-devel/2012-August/038891.html).
Can we get this in?

diff --git a/src/gstespeak.c b/src/gstespeak.c
index 4560512..1dd097e 100644
--- a/src/gstespeak.c
+++ b/src/gstespeak.c
@@ -152,7 +152,7 @@ static void gst_espeak_init (GstEspeak * self) {
             "rate", G_TYPE_INT, espeak_get_sample_rate (),
             "channels", G_TYPE_INT, 1, NULL);

-    gst_base_src_set_format (GST_BASE_SRC (self), GST_FORMAT_DEFAULT);
+    gst_base_src_set_format (GST_BASE_SRC (self), GST_FORMAT_TIME);
 }

 static void gst_espeak_finalize (GObject * self_) {


More information about the Sugar-devel mailing list