Text test source element

Josh Doe josh at joshdoe.com
Thu Jun 14 08:19:28 PDT 2012


On Thu, Jun 14, 2012 at 10:44 AM, iron_guitarist1987
<jtrinidadperez at gmail.com> wrote:
> I'm trying to create the simplest text source element that outputs the same
> string over and over again. I tried doing something with the audiotestsrc,
> but I know is wrong. Below is what I have so far. Any ideas?

I recommend you go through the plugin writers guide first:
http://gstreamer.freedesktop.org/data/doc/gstreamer/0.10.36/pwg/html/index.html

The first problem I see is in _create, you can't just assign a static
string to the *buffer pointer. After going through the tutorials look
at the docs such as:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html
http://gstreamer.freedesktop.org/data/doc/gstreamer/0.10.36/gstreamer-libs/html/GstBaseSrc.html
http://developer.gnome.org/glib/2.32/glib-String-Utility-Functions.html#g-strdup

You need to allocate a new buffer, set the data (see g_strdup), size,
etc using GST_BUFFER_*.

-Josh


More information about the gstreamer-devel mailing list