how to get source host/port from udpsink

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to get source host/port from udpsink

Attila RS
Is there anyway to get the source host/port from udpsink? I need to receive data on a udp port process it and send a response back to the original sender. I don't know the source host/port when the pipeline is created, so I can't set the destination host/port on the udpsrc until after I receive the first packet and retrieve the source host/port.

Attila

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: how to get source host/port from udpsink

Donny Viszneki
I would think the source host would be a property of a UDP packet and
not a listening UDP socket :)

On Mon, Apr 19, 2010 at 6:34 PM, Attila RS <[hidden email]> wrote:

> Is there anyway to get the source host/port from udpsink? I need to receive
> data on a udp port process it and send a response back to the original
> sender. I don't know the source host/port when the pipeline is created, so I
> can't set the destination host/port on the udpsrc until after I receive the
> first packet and retrieve the source host/port.
> Attila
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>



--
http://codebad.com/

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: how to get source host/port from udpsink

Attila RS
Well typically when you receive from a socket the host binding or sockaddr is separate from the actual received buffer. It does look like udpsrc is using GstNetBuffer instead of GstBuffer and the source addr/port is is added to the buffer. The down stream element should be able to cast the received buffer as a GstNetBuffer and extract the source addr/port.

On Mon, Apr 19, 2010 at 3:42 PM, Donny Viszneki <[hidden email]> wrote:
I would think the source host would be a property of a UDP packet and
not a listening UDP socket :)

On Mon, Apr 19, 2010 at 6:34 PM, Attila RS <[hidden email]> wrote:
> Is there anyway to get the source host/port from udpsink? I need to receive
> data on a udp port process it and send a response back to the original
> sender. I don't know the source host/port when the pipeline is created, so I
> can't set the destination host/port on the udpsrc until after I receive the
> first packet and retrieve the source host/port.
> Attila
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>



--
http://codebad.com/

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel