<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_1_1504246029775_3304" dir="ltr">Solved ! :)<br></div><div id="yui_3_16_0_1_1504246029775_3358" dir="ltr">The type of message to keep track of is not <b>GST_MESSAGE_APPLICATION</b> but <b>GST_MESSAGE_ELEMENT</b>.</div><div id="yui_3_16_0_1_1504246029775_3356" dir="ltr">Regards.</div><div id="yui_3_16_0_1_1504246029775_3359" dir="ltr">Simon<br></div><div id="yui_3_16_0_1_1504246029775_3284"><span></span></div> <div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 13px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font face="Arial" size="2"> El Jueves 31 de agosto de 2017 20:14, simo zz <simon.zz@yahoo.com> escribió:<br></font></div>  <br><br> <div class="y_msg_container"><div id="yiv5519525609"><div><div style="color:#000;background-color:#fff;font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px;"><div id="yiv5519525609yui_3_16_0_1_1504202549369_4598">Hello,</div><div id="yiv5519525609yui_3_16_0_1_1504202549369_4658"><br></div><div dir="ltr" id="yiv5519525609yui_3_16_0_1_1504202549369_4637">After successffuly initializing a <b id="yiv5519525609yui_3_16_0_1_1504202549369_4678">GstElement *multifilesink</b> and enabling the post-messages option:</div><div id="yiv5519525609yui_3_16_0_1_1504202549369_4619"><br></div><div dir="ltr" id="yiv5519525609yui_3_16_0_1_1504202549369_4660"><b id="yiv5519525609yui_3_16_0_1_1504202549369_4669">multifilesink = gst_element_factory_make("multifilesink", NULL);<br></b></div><div dir="ltr" id="yiv5519525609yui_3_16_0_1_1504202549369_4618"><b id="yiv5519525609yui_3_16_0_1_1504202549369_4668">g_object_set(G_OBJECT(gstData->multifilesink), "post-messages", TRUE, NULL);</b></div><div id="yiv5519525609yui_3_16_0_1_1504202549369_4679" dir="ltr"><br></div><div id="yiv5519525609yui_3_16_0_1_1504202549369_4687" dir="ltr">I would like to print its messages.</div><div id="yiv5519525609yui_3_16_0_1_1504202549369_4688" dir="ltr">The <a rel="nofollow" id="yiv5519525609yui_3_16_0_1_1504202549369_4831" class="yiv5519525609edited-link-editor" target="_blank" href="https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/gst-plugins-good-plugins-multifilesink.html#GstMultiFileSink--post-messages">documentation </a>says:</div><div id="yiv5519525609yui_3_16_0_1_1504202549369_4839" dir="ltr"><br></div><div id="yiv5519525609yui_3_16_0_1_1504202549369_4935" dir="ltr"></div><div id="yiv5519525609yui_3_16_0_1_1504202549369_4936">If the <a rel="nofollow" id="yiv5519525609yui_3_16_0_1_1504202549369_4937" target="_blank" href="https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/gst-plugins-good-plugins-multifilesink.html#GstMultiFileSink--post-messages" title="The “post-messages” property"><span id="yiv5519525609yui_3_16_0_1_1504202549369_4938">“post-messages”</span></a> property is <a rel="nofollow" id="yiv5519525609yui_3_16_0_1_1504202549369_4939" target="_blank" href="https://gstreamer.freedesktop.org/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><span id="yiv5519525609yui_3_16_0_1_1504202549369_4940">TRUE</span></a>, it sends an application
message named<code id="yiv5519525609yui_3_16_0_1_1504202549369_4941"> "<b id="yiv5519525609yui_3_16_0_1_1504202549369_4943">GstMultiFileSink</b>"</code> after writing each
</div><div id="yiv5519525609yui_3_16_0_1_1504202549369_4942" dir="ltr">buffer.</div><div dir="ltr" id="yiv5519525609yui_3_16_0_1_1504202549369_4837"></div><div id="yiv5519525609yui_3_16_0_1_1504202549369_4874"><br></div><div id="yiv5519525609yui_3_16_0_1_1504202549369_4944">So I am tryong the following piece of code inside my messages bus handler:</div><div id="yiv5519525609yui_3_16_0_1_1504202549369_4956"><br></div><div dir="ltr" id="yiv5519525609yui_3_16_0_1_1504202549369_4957"><b id="yiv5519525609yui_3_16_0_1_1504202549369_5145">case GST_MESSAGE_APPLICATION:<br id="yiv5519525609yui_3_16_0_1_1504202549369_5127">{<br id="yiv5519525609yui_3_16_0_1_1504202549369_5128">    const GstStructure *s = gst_message_get_structure (message);<br id="yiv5519525609yui_3_16_0_1_1504202549369_5129">    if (gst_structure_has_name(s, "GstMultiFileSink"))<br id="yiv5519525609yui_3_16_0_1_1504202549369_5130">    {<br id="yiv5519525609yui_3_16_0_1_1504202549369_5131">        g_print("File written.");<br id="yiv5519525609yui_3_16_0_1_1504202549369_5132">    }<br id="yiv5519525609yui_3_16_0_1_1504202549369_5133">    break;<br id="yiv5519525609yui_3_16_0_1_1504202549369_5134">}</b></div><div id="yiv5519525609yui_3_16_0_1_1504202549369_5146" dir="ltr"><br></div><div id="yiv5519525609yui_3_16_0_1_1504202549369_5147" dir="ltr">But I cannot see any message even if the files are written.</div><div id="yiv5519525609yui_3_16_0_1_1504202549369_5158" dir="ltr">What is the correct way to print multifilelink messages ?</div><div id="yiv5519525609yui_3_16_0_1_1504202549369_5169" dir="ltr">Thank you.</div><div id="yiv5519525609yui_3_16_0_1_1504202549369_5203" dir="ltr">Regards,<br></div><div id="yiv5519525609yui_3_16_0_1_1504202549369_5171" dir="ltr">Simon<br></div></div></div></div><br><br></div>  </div> </div>  </div></div></body></html>