[gst-devel] dynamic pipeline questions
John Stritch
johnstritch at earthlink.net
Mon Nov 27 01:43:46 CET 2006
On Sun, 2006-11-26 at 02:22 +0100, René Stadler wrote:
> The element is indeed not documented. Parsing the message like this
> should work (completely untested):
>
> {
> const GstStructure *s = gst_message_get_structure (message);
> const gchar *name = gst_structure_get_name (s);
>
> if (g_str_equal (name, "cutter")) {
> gboolean above;
> GstClockTime timestamp;
>
> if (gst_structure_get_boolean (s, "above", &above)
> && gst_structure_get_clock_time (s, "timestamp", ×tamp)) {
>
> do_something (above, timestamp);
> }
> }
> }
>
> Where "message" is a GstMessage of type GST_MESSAGE_ELEMENT coming from
> the bus. Your application should already interact with the pipeline's
> bus to implement error handling. Refer to the application development
> manual and the core reference for more information.
>
> Regards,
> René Stadler
That was the ticket! I now have a single file that grows when there is
sound above the threshold I specify (0.01 (-40dB) seems good right now).
On to other aspects of the application.
Thanks for the help,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20061126/e25557e6/attachment.htm>
More information about the gstreamer-devel
mailing list