rtph26x: Use gst_memory_map() instead of gst_buffer_map() in avc mode
authorOgnyan Tonchev <ognyan@axis.com>
Thu, 6 Feb 2020 08:23:24 +0000 (09:23 +0100)
committerSebastian Dröge <slomo@coaxion.net>
Fri, 6 Mar 2020 10:44:16 +0000 (10:44 +0000)
commita78a74bff08564fe8ab33841af8e62fecf090992
tree0d83a0df81ad63dc0f681a877755ef327a1f8c99
parent3e0d5577444b32579bdf5b69d720a322322ff7bc
rtph26x: Use gst_memory_map() instead of gst_buffer_map() in avc mode

gst_buffer_map () results in memcopying when a GstBuffer contains
more than one GstMemory and when AVC (length-prefixed) alignment is used.
This has quite an impact on performance on systems with limited amount of
resources. With this patch the whole GstBuffer will not be mapped at once,
instead each individual GstMemory will be iterated and mapped separately.
gst/rtp/gstbuffermemory.c [new file with mode: 0644]
gst/rtp/gstbuffermemory.h [new file with mode: 0644]
gst/rtp/gstrtph264pay.c
gst/rtp/gstrtph265pay.c
gst/rtp/meson.build
tests/check/elements/rtph264.c