rtpsession: use NetAddress metadata

This commit is contained in:
Wim Taymans 2011-02-28 13:28:29 +01:00
parent 6c4ccb272c
commit 0a56b25882

View file

@ -1600,6 +1600,8 @@ update_arrival_stats (RTPSession * sess, RTPArrivalStats * arrival,
gboolean rtp, GstBuffer * buffer, GstClockTime current_time, gboolean rtp, GstBuffer * buffer, GstClockTime current_time,
GstClockTime running_time, guint64 ntpnstime) GstClockTime running_time, guint64 ntpnstime)
{ {
GstMetaNetAddress *meta;
/* get time of arrival */ /* get time of arrival */
arrival->current_time = current_time; arrival->current_time = current_time;
arrival->running_time = running_time; arrival->running_time = running_time;
@ -1615,16 +1617,13 @@ update_arrival_stats (RTPSession * sess, RTPArrivalStats * arrival,
} }
/* for netbuffer we can store the IP address to check for collisions */ /* for netbuffer we can store the IP address to check for collisions */
#if 0 meta = gst_buffer_get_meta_net_address (buffer);
arrival->have_address = GST_IS_NETBUFFER (buffer); if (meta) {
if (arrival->have_address) { arrival->have_address = TRUE;
GstNetBuffer *netbuf = (GstNetBuffer *) buffer; memcpy (&arrival->address, &meta->naddr, sizeof (GstNetAddress));
} else {
memcpy (&arrival->address, &netbuf->from, sizeof (GstNetAddress)); arrival->have_address = FALSE;
} }
#else
arrival->have_address = FALSE;
#endif
} }
/** /**