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 757925 - bufferpool config: function to remove an option in the config
bufferpool config: function to remove an option in the config
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-11-11 05:20 UTC by Matthew Waters (ystreet00)
Modified: 2018-11-03 12:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bufferpool: add function to remove an option from a pool config (3.78 KB, patch)
2015-11-11 05:21 UTC, Matthew Waters (ystreet00)
reviewed Details | Review

Description Matthew Waters (ystreet00) 2015-11-11 05:20:34 UTC
The use case I have for this is if an element wants to override/perform the creation of a meta on the buffer.

A simple solution of using gst_buffer_foreach_meta(); gst_buffer_remove_meta() will fail to remove any locked buffers that a bufferpool adds to the buffer.  This makes it optional and possible for the meta to not appear on the buffer in the first place.
Comment 1 Matthew Waters (ystreet00) 2015-11-11 05:21:28 UTC
Created attachment 315224 [details] [review]
bufferpool: add function to remove an option from a pool config
Comment 2 Nicolas Dufresne (ndufresne) 2015-11-11 14:29:50 UTC
Review of attachment 315224 [details] [review]:

In certain scenario, we force certain options by pre-configuring the pool (in propose allocation). This way, we don't have to check if we receive buffers from that pool. Shall be simply ignore the removal of such option during activation of those pool, or shall be add a way to prevent removal ?

p.s. Typo in the commit message, there is no S at the end of the method name
Comment 3 Sebastian Dröge (slomo) 2015-11-11 14:46:08 UTC
Review of attachment 315224 [details] [review]:

::: gst/gstbufferpool.c
@@ +892,3 @@
+ * not contain the specified option, @config is not modified.
+ *
+ * The supported options by @pool can be retrieved with gst_buffer_pool_get_options().

Since: 1.8

@@ +901,3 @@
+  guint i, len;
+
+  g_return_if_fail (config != NULL);

Maybe should also get a g_return_if_fail() to check if the structure is writable, but then we also don't do that elsewhere.
Comment 4 Nicolas Dufresne (ndufresne) 2015-11-11 16:16:40 UTC
(In reply to Nicolas Dufresne (stormer) from comment #2)
> Review of attachment 315224 [details] [review] [review]:
> 
> In certain scenario, we force certain options by pre-configuring the pool
> (in propose allocation). This way, we don't have to check if we receive
> buffers from that pool. Shall be simply ignore the removal of such option
> during activation of those pool, or shall be add a way to prevent removal ?

Hmm, that's a bit non-backward compatible, but the pools maybe review the options, update the config and return false to the set_config call to signal that the configuration was adapted to the pool restrictions.
Comment 5 Tim-Philipp Müller 2018-01-22 17:54:37 UTC
What shall we do with this?
Comment 6 GStreamer system administrator 2018-11-03 12:30:44 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/138.