[Libav-user] Sending AVpacket data over socket
rhussong at westpond.com
Tue Dec 10 22:26:27 EET 2019
On Mon, Dec 9, 2019 at 12:19 PM Philippe Noël <
philippe_noel at college.harvard.edu> wrote:
> What is the most efficient/fastest way to send AVpacket frame data (stored
> in data) through a socket?
> I understand that since it is a byte array, I think I would need to
> memcpy + serialize it, to avoid the 0x00 error. Is there a faster way/way
> to send the byte array directly? I'm interested in the lowest possible
> latency at all cost and I worry serializing will be too slow.
Sockets do not interpret the data you send through them using send() or
write(), so there is no "0x00 error". You are probably trying to compute
the length of the frame data using strlen(). Just use the "size" field of
the AVPacket instead; it contains the length of the buffer in bytes.
> Thanks for your help!
> Libav-user mailing list
> Libav-user at ffmpeg.org
> To unsubscribe, visit link above, or email
> libav-user-request at ffmpeg.org with subject "unsubscribe".
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user