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 746164 - meta: Add GstNetControlMessageMeta
meta: Add GstNetControlMessageMeta
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-13 15:38 UTC by Will Manley
Modified: 2015-03-14 19:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
meta: Add `GstNetControlMessageMeta` (9.16 KB, patch)
2015-03-13 15:38 UTC, Will Manley
none Details | Review
meta: Add `GstNetControlMessageMeta` (9.16 KB, patch)
2015-03-14 09:16 UTC, Will Manley
none Details | Review
multisocketsink: Add support for GstNetControlMessageMeta (3.37 KB, patch)
2015-03-14 09:16 UTC, Will Manley
committed Details | Review
socketsrc: Add support for GstNetControlMessageMeta (2.13 KB, patch)
2015-03-14 09:17 UTC, Will Manley
committed Details | Review
Add test_that_multisocketsink_and_socketsrc_preserve_meta (6.90 KB, patch)
2015-03-14 09:17 UTC, Will Manley
committed Details | Review
meta: Add `GstNetControlMessageMeta` (9.16 KB, patch)
2015-03-14 15:12 UTC, Will Manley
committed Details | Review
tests: Add tests for `GstNetAddressMeta` (5.30 KB, patch)
2015-03-14 15:12 UTC, Will Manley
committed Details | Review
tests: Add unit tests for GstNetControlMessageMeta (5.73 KB, patch)
2015-03-14 15:13 UTC, Will Manley
committed Details | Review

Description Will Manley 2015-03-13 15:38:17 UTC
Created attachment 299332 [details] [review]
meta: Add `GstNetControlMessageMeta`

meta: Add `GstNetControlMessageMeta`

`GstNetAddress` can be used to store ancillary data which was received with
or is to be sent alongside the buffer data.  When used with socket sinks
and sources which understand this meta it allows sending and receiving
ancillary data such as unix credentials (See `GUnixCredentialsMessage`)
and Unix file descriptions (See `GUnixFDMessage`).

This will be useful for implementing protocols which use file-descriptor
passing in payloaders/depayloaders without having to re-implement all the
socket handling code already present in elements such as multisocketsink,
etc.  This, in turn, will be useful for implementing zero-copy video IPC.

This meta uses the platform independent `GSocketControlMessage` API
provided by GLib as a part of GIO.  As a result this new meta does not
require any new dependencies or any conditional compliation for
portablility, although it is unlikely to do anything useful on non-UNIX
platforms.

Also add support for this meta to multisocketsink and the new socketsrc.
Comment 1 Will Manley 2015-03-14 09:16:06 UTC
Created attachment 299384 [details] [review]
meta: Add `GstNetControlMessageMeta`
Comment 2 Will Manley 2015-03-14 09:16:47 UTC
Created attachment 299385 [details] [review]
multisocketsink: Add support for GstNetControlMessageMeta
Comment 3 Will Manley 2015-03-14 09:17:07 UTC
Created attachment 299386 [details] [review]
socketsrc: Add support for GstNetControlMessageMeta
Comment 4 Will Manley 2015-03-14 09:17:25 UTC
Created attachment 299387 [details] [review]
Add test_that_multisocketsink_and_socketsrc_preserve_meta
Comment 5 Will Manley 2015-03-14 09:18:03 UTC
The first patch applies to gstreamer, the rest to gst-plugins-base.
Comment 6 Will Manley 2015-03-14 11:57:59 UTC
Just spoke to @wtay.  TODO:

* Add caps-features to negotiate that the multisocketsink
* Add a unit test to gstreamer testing adding the GstNetControlMessageMeta to a buffer and removing it again.
Comment 7 Will Manley 2015-03-14 15:12:34 UTC
Created attachment 299405 [details] [review]
meta: Add `GstNetControlMessageMeta`
Comment 8 Will Manley 2015-03-14 15:12:58 UTC
Created attachment 299406 [details] [review]
tests: Add tests for `GstNetAddressMeta`
Comment 9 Will Manley 2015-03-14 15:13:29 UTC
Created attachment 299407 [details] [review]
tests: Add unit tests for GstNetControlMessageMeta
Comment 10 Will Manley 2015-03-14 17:28:03 UTC
> * Add caps-features to negotiate that the multisocketsink

Can't use caps features as it's not possible to have ANY caps with features attached.
Comment 11 Wim Taymans 2015-03-14 19:54:48 UTC
commit bbd0336988698eae4368a6743316f72f74eaebe7
Author: William Manley <will@williammanley.net>
Date:   Sat Mar 14 15:09:35 2015 +0000

    tests: Add unit tests for GstNetControlMessageMeta

commit 05163d7e1b7d5cd7a2e2c4ac3196b9d72ccafa9c
Author: William Manley <will@williammanley.net>
Date:   Sat Mar 14 13:20:50 2015 +0000

    tests: Add tests for `GstNetAddressMeta`
    
    This is a prepatory step for adding tests for `GstNetControlMessageMeta`.
    `GstNetControlMessageMeta` is likely to be harder to test than
    `GstNetAddressMeta`, so this commit helps by focusing on the aspects of
    GstMeta that need to be tested.