Ok, thanks for the answer!

Sorin.

________________________________
From: live-devel <live-devel-boun...@us.live555.com> on behalf of Ross 
Finlayson <finlay...@live555.com>
Sent: Monday, May 11, 2020 12:41:18 PM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] Is memmove() necessary when using blocking call?



> On May 11, 2020, at 9:19 PM, Avramoni, Sorin <sorin.avram...@intel.com> wrote:
>
> I am wonder since I have a blocking mechanism it is possible to not use 
> memmove() and just use a reference to my buffers?

Generally speaking, no, because the data in your buffer is not the only data 
that gets sent in a RTP packet.  There is also the RTP header, which the 
LIVE555 library puts in each outgoing UDP packet, before your payload data.  
Therefore it would not be possible to send a RTP packet by just passing a 
pointer to your payload data, without copying the data.

Things get even more complicated if your payload data is too large to fit in an 
outgoing UDP packet.  In that case, the LIVE555 library has to construct a RTP 
header (and perhaps an extra ‘fragmentation header’, depending on the RTP 
payload type) for each outgoing packet.  Your payload data will end up being 
split among multiple outgoing RTP packets.

(Yes, it might be possible to avoid some data copying using a ‘scatter-gather’ 
I/O interface (e.g., using “sendmmsg()”), but that would require a major (and 
non-backward-compatible) overhaul of LIVE555’s buffering mechanism - something 
that’s not likely to happen anytime soon.)


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/


_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to