<html><head></head><body><div class="ydpd08dddb1yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
<div dir="ltr" data-setdir="false">Great! Thank you so much.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"> Joe<br></div><div><br></div>
</div><div id="yahoo_quoted_6180658817" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Wednesday, February 8, 2023, 05:38:53 p.m. EST, Michael Gruner <michael.gruner@ridgerun.com> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="yiv6261669807"><div><div>Hi</div><div><br clear="none"></div><div>Maybe something like the following:</div><div><br clear="none"></div><div><span style="">//Grab the first (and likely only) structure in the caps</span></div><div><font face="Andale Mono"><span style="font-style:normal;">GstStructure *st = gst_caps_get_structure (caps, 0); </span></font></div><div><font face="Andale Mono"><span style="font-style:normal;"><br clear="none"></span></font></div><div><font face="Andale Mono"><span style="font-style:normal;">// Test if it is WAV</span></font></div><div><font face="Andale Mono"><span style="font-style:normal;">gboolean is_wav = gst_structure_has_name (st, “audio/x-wav”);</span></font></div><div><font face="Andale Mono"><span style="font-style:normal;"><br clear="none"></span></font></div><div><font face="Andale Mono"><span style="font-style:normal;">// Test if it is MP3</span></font></div><div><font face="Andale Mono"><span style="font-style:normal;">gboolean is_mpeg = gst_structure_has_name (st, “audio/mpeg”);</span></font></div><div><font face="Andale Mono"><span style="font-style:normal;"><br clear="none"></span></font></div><div><font face="Andale Mono"><span style="font-style:normal;">gint mpeg_layer;</span></font></div><div><font face="Andale Mono"><span style="font-style:normal;">gst_structure_get_int (st, “layer”, &mpeg_layer);</span></font></div><div><font face="Andale Mono"><span style="font-style:normal;"><br clear="none"></span></font></div><div><font face="Andale Mono"><span style="font-style:normal;">gboolean is_mp3 = is_mpeg && mpeg_layer == 3;</span></font></div><div><br clear="none"></div><div><br clear="none"></div><div>Or you could use decodebin which will automatically choose the correct decoder for you.</div><div><br clear="none"></div><div>Michael</div><div><br clear="none"></div><div id="yiv6261669807yqt03775" class="yiv6261669807yqt7670455985"><div><br clear="none"><blockquote type="cite"><div>On 8 Feb 2023, at 14:13, cfd new via gstreamer-devel <gstreamer-devel@lists.freedesktop.org> wrote:</div><br class="yiv6261669807Apple-interchange-newline" clear="none"><div><div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;" class="yiv6261669807yahoo-style-wrap"><div dir="ltr">need to set the right audio decoder for it. <br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr"> Thanks for your help,</div><div dir="ltr"><br clear="none"></div><div dir="ltr"> Joe<br clear="none"></div></div></div></div></blockquote></div></div><br clear="none"></div></div></div>
</div>
</div></body></html>