<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-2022-jp" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 11.00.9600.16521"></HEAD>
<BODY><FONT face=Arial><FONT color=#008000><FONT color=#008000><FONT
color=#008000>
<DIV><FONT color=#000000 size=2 face=Consolas><SPAN class=001103513-05052014>Hi
</SPAN></FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Consolas><SPAN
class=001103513-05052014></SPAN></FONT> </DIV>
<DIV><FONT color=#000000 size=2 face=Consolas><SPAN class=001103513-05052014>I
have a simple pipeline as below code shows." udpsrc->appsink "
</SPAN></FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Consolas><SPAN
class=001103513-05052014></SPAN></FONT> </DIV>
<DIV><FONT color=#000000 size=2 face=Consolas><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 size=2 face=Consolas><SPAN
class=001103513-05052014></SPAN></FONT> </DIV>
<DIV><FONT color=#000000 size=2 face=Consolas><SPAN
class=001103513-05052014>Thanks</SPAN></FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Consolas><SPAN
class=001103513-05052014>Robin</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Consolas></FONT> </DIV>
<DIV><FONT size=2 face=Consolas></FONT> </DIV>
<DIV><FONT size=2><FONT color=#000000 face=Consolas>typedef</FONT><FONT
color=#000000><FONT face=Consolas> struct</DIV></FONT></FONT></FONT>
<DIV><FONT color=#000000 size=2 face=Consolas>{</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Consolas>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 size=2 face=Consolas>}udpOverlayStruct;</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Consolas></FONT> </DIV><FONT
size=2><FONT size=2><FONT color=#000000 size=2>
<DIV><FONT face=Consolas>udpOverlayStruct rawOverlayData;</FONT></DIV>
<DIV><FONT face=Consolas></FONT> </DIV></FONT></FONT></FONT>
<DIV><FONT color=#000000 size=2 face=Consolas>/* The appsink has received a
buffer */</FONT></DIV></FONT></FONT></FONT><FONT face=Consolas><FONT
face=Consolas><FONT face=Consolas>
<DIV><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></DIV>
<DIV><FONT size=2>GstBuffer *buffer;</FONT></DIV>
<DIV><FONT size=2>udpOverlayStruct *temp =
(udpOverlayStruct*)buffer->offset;</FONT></DIV>
<DIV></FONT></FONT><FONT face=Consolas><FONT face=Consolas><FONT
face=Consolas><FONT size=2>/* Retrieve the buffer
*/</FONT></DIV></FONT></FONT></FONT><FONT face=Consolas><FONT face=Consolas>
<DIV><FONT size=2>g_signal_emit_by_name (app_sink, </FONT></FONT></FONT><FONT
face=Consolas><FONT face=Consolas><FONT size=2
face=Consolas>"pull-buffer"</FONT></FONT></FONT><FONT face=Consolas><FONT
face=Consolas><FONT size=2>, &buffer);</FONT></DIV>
<DIV></FONT></FONT><FONT face=Consolas><FONT face=Consolas><FONT size=2
face=Consolas>if</FONT></FONT></FONT><FONT face=Consolas><FONT
face=Consolas><FONT size=2> (buffer) </FONT></DIV>
<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><FONT size=2 face=Arial></FONT> </DIV>
<DIV><SPAN class=001103513-05052014><FONT size=2 face=Arial>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><FONT size=2></FONT> </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><FONT size=2></FONT> </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><FONT size=2></FONT> </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><FONT
size=2></FONT></SPAN> </DIV></FONT></FONT></FONT><p>**********************************************************************<br>
Relevant company disclaimers are available at the following addresses:<br>
Tellumat (Pty) Ltd e-mail: mailto:disclaimer@tellumat.com?Subject=Tellumat_Disclaimer<br>
Web: http://www.tellumat.com/email.aspx<br>
**********************************************************************</p></BODY></HTML>