mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 07:28:53 +00:00
update for netaddress change
This commit is contained in:
parent
b1ef7e8a86
commit
75e0c6052f
4 changed files with 7 additions and 7 deletions
|
@ -1699,7 +1699,7 @@ 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;
|
GstNetAddressMeta *meta;
|
||||||
GstRTPBuffer rtpb;
|
GstRTPBuffer rtpb;
|
||||||
|
|
||||||
/* get time of arrival */
|
/* get time of arrival */
|
||||||
|
@ -1719,7 +1719,7 @@ 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 */
|
||||||
meta = gst_buffer_get_meta_net_address (buffer);
|
meta = gst_buffer_get_net_address_meta (buffer);
|
||||||
if (meta) {
|
if (meta) {
|
||||||
arrival->have_address = TRUE;
|
arrival->have_address = TRUE;
|
||||||
memcpy (&arrival->address, &meta->naddr, sizeof (GstNetAddress));
|
memcpy (&arrival->address, &meta->naddr, sizeof (GstNetAddress));
|
||||||
|
|
|
@ -178,14 +178,14 @@ gst_dynudpsink_render (GstBaseSink * bsink, GstBuffer * buffer)
|
||||||
gint ret;
|
gint ret;
|
||||||
gsize size;
|
gsize size;
|
||||||
guint8 *data;
|
guint8 *data;
|
||||||
GstMetaNetAddress *meta;
|
GstNetAddressMeta *meta;
|
||||||
struct sockaddr_in theiraddr;
|
struct sockaddr_in theiraddr;
|
||||||
guint16 destport;
|
guint16 destport;
|
||||||
guint32 destaddr;
|
guint32 destaddr;
|
||||||
|
|
||||||
memset (&theiraddr, 0, sizeof (theiraddr));
|
memset (&theiraddr, 0, sizeof (theiraddr));
|
||||||
|
|
||||||
meta = gst_buffer_get_meta_net_address (buffer);
|
meta = gst_buffer_get_net_address_meta (buffer);
|
||||||
|
|
||||||
if (meta == NULL) {
|
if (meta == NULL) {
|
||||||
GST_DEBUG ("Received buffer is not a GstNetBuffer, skipping");
|
GST_DEBUG ("Received buffer is not a GstNetBuffer, skipping");
|
||||||
|
|
|
@ -39,7 +39,7 @@ plugin_init (GstPlugin * plugin)
|
||||||
/* register info of the netaddress metadata so that we can use it from
|
/* register info of the netaddress metadata so that we can use it from
|
||||||
* multiple threads right away. Note that the plugin loading is always
|
* multiple threads right away. Note that the plugin loading is always
|
||||||
* serialized */
|
* serialized */
|
||||||
gst_meta_net_address_get_info ();
|
gst_net_address_meta_get_info ();
|
||||||
|
|
||||||
if (!gst_element_register (plugin, "udpsink", GST_RANK_NONE,
|
if (!gst_element_register (plugin, "udpsink", GST_RANK_NONE,
|
||||||
GST_TYPE_UDPSINK))
|
GST_TYPE_UDPSINK))
|
||||||
|
|
|
@ -394,7 +394,7 @@ static GstFlowReturn
|
||||||
gst_udpsrc_create (GstPushSrc * psrc, GstBuffer ** buf)
|
gst_udpsrc_create (GstPushSrc * psrc, GstBuffer ** buf)
|
||||||
{
|
{
|
||||||
GstUDPSrc *udpsrc;
|
GstUDPSrc *udpsrc;
|
||||||
GstMetaNetAddress *meta;
|
GstNetAddressMeta *meta;
|
||||||
GstBuffer *outbuf;
|
GstBuffer *outbuf;
|
||||||
union gst_sockaddr
|
union gst_sockaddr
|
||||||
{
|
{
|
||||||
|
@ -529,7 +529,7 @@ no_select:
|
||||||
gst_memory_new_wrapped (0, pktdata, g_free, pktsize, offset, ret));
|
gst_memory_new_wrapped (0, pktdata, g_free, pktsize, offset, ret));
|
||||||
|
|
||||||
/* use buffer metadata so receivers can also track the address */
|
/* use buffer metadata so receivers can also track the address */
|
||||||
meta = gst_buffer_add_meta_net_address (outbuf);
|
meta = gst_buffer_add_net_address_meta (outbuf);
|
||||||
|
|
||||||
switch (sa.sa.sa_family) {
|
switch (sa.sa.sa_family) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
|
|
Loading…
Reference in a new issue