<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Robin, <br>
      <br>
      Signals won't work unless there is a main loop running (or a
      similar listener mechanism). In your app, when you wait for errors
      or EOS, are you waiting on a GMainLoop? If for some reason you
      can't do so, you might want to try registering callbacks to the
      appsink instead of using signals.<br>
      <br>
      Michael<br>
      <br>
      On 05/05/2014 07:51 AM, Robin Aproskie wrote:<br>
    </div>
    <blockquote
cite="mid:B9F9505C77148F4B9CA1064B8C28F31502497A7D7879@TELCPTEXM2.tellumat.co.za"
      type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <meta name="GENERATOR" content="MSHTML 11.00.9600.16521">
      <font face="Arial"><font color="#008000"><font color="#008000"><font
              color="#008000">
              <div><font color="#000000" face="Consolas" size="2"><span
                    class="001103513-05052014">Hi </span></font></div>
              <div><font color="#000000" face="Consolas" size="2"><span
                    class="001103513-05052014"></span></font> </div>
              <div><font color="#000000" face="Consolas" size="2"><span
                    class="001103513-05052014">I have a simple pipeline
                    as below code shows." udpsrc->appsink " </span></font></div>
              <div><font color="#000000" face="Consolas" size="2"><span
                    class="001103513-05052014"></span></font> </div>
              <div><font color="#000000" face="Consolas" size="2"><span
                    class="001103513-05052014">I am sending a datagram
                    to the localhost UDP port with the below struct; I
                    am receiving the data as per wireshark; but I do not
                    get the appsink callback to trigger to tell me there
                    is data, do I need another element of do I need to
                    format the datagram with cap. How do I do this? at
                    the moment I just need raw 54 byte struct data.</span></font></div>
              <div><font color="#000000" face="Consolas" size="2"><span
                    class="001103513-05052014"></span></font> </div>
              <div><font color="#000000" face="Consolas" size="2"><span
                    class="001103513-05052014">Thanks</span></font></div>
              <div><font color="#000000" face="Consolas" size="2"><span
                    class="001103513-05052014">Robin</span></font></div>
              <div> </div>
              <div> </div>
              <div><font size="2"><font color="#000000" face="Consolas">typedef</font><font
                    color="#000000"><font face="Consolas"> struct</font></font></font></div>
              <div><font color="#000000" face="Consolas" size="2">{</font></div>
              <div><font color="#000000" face="Consolas" size="2">float <span
                    class="001103513-05052014">term</span>;</font></div>
              <div><font size="2"><font color="#000000" face="Consolas">float</font><font
                    color="#000000" face="Consolas"> lonUav;</font></font></div>
              <div><font size="2"><font color="#000000" face="Consolas">float</font><font
                    color="#000000" face="Consolas"> groundTrack;</font></font></div>
              <div><font size="2"><font color="#000000" face="Consolas">float</font><font
                    color="#000000" face="Consolas"> altitude;</font></font></div>
              <div><font size="2"><font color="#000000" face="Consolas">float</font><font
                    color="#000000" face="Consolas"> latTgt;</font></font></div>
              <div><font size="2"><font color="#000000" face="Consolas">float</font><font
                    color="#000000" face="Consolas"> lonTgt;</font></font></div>
              <div><font size="2"><font color="#000000" face="Consolas">float</font><font
                    color="#000000" face="Consolas"> tgtDistance;</font></font></div>
              <div><font size="2"><font color="#000000" face="Consolas">float</font><font
                    color="#000000" face="Consolas"> scale;</font></font></div>
              <div><font size="2"><font color="#000000" face="Consolas">float</font><font
                    color="#000000" face="Consolas"> payAzimuth;</font></font></div>
              <div><font size="2"><font color="#000000" face="Consolas">float</font><font
                    color="#000000" face="Consolas"> payDepression;</font></font></div>
              <div><font size="2"><font color="#000000" face="Consolas">float</font><font
                    color="#000000" face="Consolas"> payLoadFov;</font></font></div>
              <div><font size="2"><font color="#000000" face="Consolas">float</font><font
                    color="#000000" face="Consolas"> trueNorth;</font></font></div>
              <div><font size="2"><font color="#000000" face="Consolas">short</font><font
                    color="#000000" face="Consolas"> display;</font></font></div>
              <div><font size="2"><font color="#000000" face="Consolas">short</font><font
                    color="#000000" face="Consolas"> resolution;</font></font></div>
              <div><font size="2"><font color="#000000" face="Consolas">short</font><font
                    color="#000000" face="Consolas"> endStream;</font></font></div>
              <div><font color="#000000" face="Consolas" size="2">}udpOverlayStruct;</font></div>
              <div> </div>
              <font size="2"><font size="2"><font color="#000000"
                    size="2">
                    <div><font face="Consolas">udpOverlayStruct
                        rawOverlayData;</font></div>
                    <div> </div>
                  </font></font></font>
              <div><font color="#000000" face="Consolas" size="2">/* The
                  appsink has received a buffer */</font></div>
            </font></font></font><font face="Consolas"><font
            face="Consolas"><font face="Consolas">
            </font></font></font>
        <div><font face="Consolas"><font face="Consolas"><font
                face="Consolas"><font size="2">void</font></font></font></font><font
            face="Consolas"><font face="Consolas"><font size="2">
                new_buffer (GstElement *app_sink, udpOverlayStruct*
                data) {</font></font></font></div>
        <font face="Consolas"><font face="Consolas">
            <div><font size="2">GstBuffer *buffer;</font></div>
            <div><font size="2">udpOverlayStruct *temp =
                (udpOverlayStruct*)buffer->offset;</font></div>
          </font></font>
        <div><font face="Consolas"><font face="Consolas"><font
                face="Consolas"><font size="2">/* Retrieve the buffer */</font></font></font></font></div>
        <font face="Consolas"><font face="Consolas">
          </font></font>
        <div><font face="Consolas"><font face="Consolas"><font size="2">g_signal_emit_by_name
                (app_sink, </font></font></font><font face="Consolas"><font
              face="Consolas"><font face="Consolas" size="2">"pull-buffer"</font></font></font><font
            face="Consolas"><font face="Consolas"><font size="2">,
                &buffer);</font></font></font></div>
        <font face="Consolas"><font face="Consolas">
          </font></font>
        <div><font face="Consolas"><font face="Consolas"><font
                face="Consolas" size="2">if</font></font></font><font
            face="Consolas"><font face="Consolas"><font size="2">
                (buffer) </font></font></font></div>
        <font face="Consolas"><font face="Consolas">
            <div><font size="2">{</font></div>
            <div><font size="2">data->altitude = temp->altitude;</font></div>
            <div><font size="2">gst_buffer_unref (buffer);</font></div>
            <div><font size="2">}</font></div>
            <div><font size="2">}</font></div>
            <div> </div>
            <div><span class="001103513-05052014"><font face="Arial"
                  size="2">void main{</font></span></div>
            <div><span class="001103513-05052014">
                <p><font size="2">gst_init <span
                      class="001103513-05052014">(</span><span
                      class="001103513-05052014">NULL,NULL</span>);</font></p>
              </span></div>
            <div><font size="2">app_pipeline = gst_pipeline_new (</font><font
                size="2">"UDP-pipeline"</font><font size="2">);</font></div>
            <div><font size="2">app_sink = gst_element_factory_make (</font><font
                size="2">"appsink", "app_sink"</font><font size="2">);</font></div>
            <div><font size="2">rawCaps = gst_caps_from_string(NULL);</font></div>
            <div><font size="2">g_object_set (app_sink, </font><font
                size="2">"emit-signals",
                TRUE,"blocksize",54,"max-buffers"</font><font size="2">,1,
                NULL);</font></div>
            <div><font size="2">g_signal_connect (app_sink, </font><font
                size="2">"new-buffer"</font><font size="2">, G_CALLBACK
                (new_buffer), &rawOverlayData);</font></div>
            <div><font size="2">app_udpsrc = gst_element_factory_make (</font><font
                size="2">"udpsrc"</font><font size="2">, NULL);</font></div>
            <div> </div>
            <div><font size="2">g_object_set (G_OBJECT (app_udpsrc), </font><font
                size="2">"address", "127.0.0.1"</font><font size="2">,
                NULL);</font></div>
            <div><font size="2">g_object_set (G_OBJECT (app_udpsrc), </font><font
                size="2">"port"</font><font size="2">, 2010, NULL);</font></div>
            <div><font size="2"> </font></div>
            <div><font size="2">gst_bin_add_many (GST_BIN
                (app_pipeline),app_udpsrc, app_sink,NULL);</font></div>
            <div><font size="2">error *= gst_element_link (app_udpsrc,
                app_sink);</font></div>
            <div> </div>
            <div><font size="2">ret = gst_element_set_state
                (app_pipeline, GST_STATE_PLAYING);</font></div>
            <div><font size="2">if</font><font size="2"> (ret ==
                GST_STATE_CHANGE_FAILURE) </font></div>
            <div><font size="2">{</font></div>
            <div><font size="2">g_printerr (</font><font size="2">"Unable
                to set the pipeline to the playing state.\n"</font><font
                size="2">);</font></div>
            <div><font size="2">gst_object_unref (pipeline);</font></div>
            <div><font size="2">}</font></div>
            <div> </div>
            <div><span class="001103513-05052014"><font size="2">}</font></span></div>
            <div><font size="2">/* Wait until error or EOS */</font></div>
            <div><span class="001103513-05052014"></span> </div>
          </font></font></font>
      <p>**********************************************************************<br>
        Relevant company disclaimers are available at the following
        addresses:<br>
          Tellumat (Pty) Ltd e-mail: 
        <a class="moz-txt-link-freetext" href="mailto:disclaimer@tellumat.com?Subject=Tellumat_Disclaimer">mailto:disclaimer@tellumat.com?Subject=Tellumat_Disclaimer</a><br>
          Web:  <a class="moz-txt-link-freetext" href="http://www.tellumat.com/email.aspx">http://www.tellumat.com/email.aspx</a><br>
**********************************************************************</p>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>