Detecting that the sender has stopped talking to UDPSRC
Wes Miller
wmiller at sdr.com
Fri Feb 22 11:20:44 PST 2013
>> BTW: where do you get the sender ip address?
// pad probe handler for udpsrc:src
gboolean cbRemoteSenderDetected( GstPad *pad,
GstBuffer *buffer,
gpointer thisptr )
// "this" of receiver object
{
GstNetBuffer* netbuffer ((GstNetBuffer*)buffer);
guint32 intAddress (0);
guint16 port (0);
gchar ipstr[30];
GstReceiver* that ((GstReceiver*)thisptr); // "this"
of receiver object
// get the IP addr (UINT32) and port of the sender as seen by the
receiver
gst_netaddress_get_ip4_address( &(netbuffer->from),
&intAddress,
&port);
// get sender's IP address and port as a string
gst_netaddress_to_string( &(netbuffer->from), ipstr, sizeof( ipstr ));
if ( that->m_lastSenderIP == intAddress // same IP is still
talking
&& that->m_lastSenderPort == port ) // same port
{
return TRUE;
}
..................
return TRUE;
}
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Detecting-that-the-sender-has-stopped-talking-to-UDPSRC-tp4658724p4658732.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list