<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.12.1">
</HEAD>
<BODY>
On Sun, 2006-11-26 at 02:22 +0100, René Stadler wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">The element is indeed not documented. Parsing the message like this</FONT>
<FONT COLOR="#000000">should work (completely untested):</FONT>
<FONT COLOR="#000000">{</FONT>
<FONT COLOR="#000000"> const GstStructure *s = gst_message_get_structure (message);</FONT>
<FONT COLOR="#000000"> const gchar *name = gst_structure_get_name (s);</FONT>
<FONT COLOR="#000000"> if (g_str_equal (name, "cutter")) {</FONT>
<FONT COLOR="#000000"> gboolean above;</FONT>
<FONT COLOR="#000000"> GstClockTime timestamp;</FONT>
<FONT COLOR="#000000"> if (gst_structure_get_boolean (s, "above", &above)</FONT>
<FONT COLOR="#000000"> && gst_structure_get_clock_time (s, "timestamp", &timestamp)) {</FONT>
<FONT COLOR="#000000"> do_something (above, timestamp);</FONT>
<FONT COLOR="#000000"> }</FONT>
<FONT COLOR="#000000"> }</FONT>
<FONT COLOR="#000000">}</FONT>
<FONT COLOR="#000000">Where "message" is a GstMessage of type GST_MESSAGE_ELEMENT coming from</FONT>
<FONT COLOR="#000000">the bus. Your application should already interact with the pipeline's</FONT>
<FONT COLOR="#000000">bus to implement error handling. Refer to the application development</FONT>
<FONT COLOR="#000000">manual and the core reference for more information.</FONT>
<FONT COLOR="#000000">Regards,</FONT>
<FONT COLOR="#000000"> René Stadler</FONT>
</PRE>
</BLOCKQUOTE>
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).<BR>
<BR>
On to other aspects of the application.<BR>
<BR>
Thanks for the help,<BR>
John
</BODY>
</HTML>