After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 746150 - multisocketsink: Map `GstMemory`s individually when sending
multisocketsink: Map `GstMemory`s individually when sending
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other Linux
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-13 12:51 UTC by Will Manley
Modified: 2015-03-13 15:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
multisocketsink: Map `GstMemory`s individually when sending (10.19 KB, patch)
2015-03-13 12:51 UTC, Will Manley
none Details | Review
multisocketsink: Map `GstMemory`s individually when sending (10.18 KB, patch)
2015-03-13 13:00 UTC, Will Manley
none Details | Review

Description Will Manley 2015-03-13 12:51:40 UTC
Created attachment 299312 [details] [review]
multisocketsink: Map `GstMemory`s individually when sending

If a buffer is made up of non-contiguous `GstMemory`s `gst_buffer_map`
has to copy all the data into a new `GstMemory` which is contiguous.  By
mapping all the `GstMemory`s individually and then using scatter-gather
IO we avoid this situation.

This is a preparatory step for adding support to multisocketsink for
sending file descriptors, where a GstBuffer may be made up of several
`GstMemory`s, some of which are backed by a memfd or file, but I think this
patch is valid and useful on its own.

This is a pure re-factoring and shouldn't change any behaviour.
Comment 1 Will Manley 2015-03-13 13:00:12 UTC
Created attachment 299313 [details] [review]
multisocketsink: Map `GstMemory`s individually when sending

Fix small typo in patch.
Comment 2 Wim Taymans 2015-03-13 15:24:27 UTC
commit b8232a74673afae38bc3bff70c7ed0d592209556
Author: William Manley <will@williammanley.net>
Date:   Fri Mar 13 12:49:31 2015 +0000

    multisocketsink: Map `GstMemory`s individually when sending
    
    If a buffer is made up of non-contiguous `GstMemory`s `gst_buffer_map`
    has to copy all the data into a new `GstMemory` which is contiguous.  By
    mapping all the `GstMemory`s individually and then using scatter-gather
    IO we avoid this situation.
    
    This is a preparatory step for adding support to multisocketsink for
    sending file descriptors, where a GstBuffer may be made up of several
    `GstMemory`s, some of which are backed by a memfd or file, but I think this
    patch is valid and useful on its own.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=746150