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 746544 - basetransform: Add buffer list support
basetransform: Add buffer list support
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-03-20 18:57 UTC by Sebastian Dröge (slomo)
Modified: 2018-11-03 12:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2015-03-20 18:57:59 UTC
Currently basetransform has no buffer list support at all. At least for elements that don't do much, like capsfilter and identity, this would be really useful to have. OTOH for elements that do actual processing, it can reduce latency to split the buffer list into separate buffers and even can make the difference between buffers arriving in time or too late inside the sink.


I would propose to add a transform_list() and transform_list_ip() vfunc to basetransform for this, and let the default do what is happening right now already. And inside identity and capsfilter it just passes through the list.

Thoughts?
Comment 1 Sebastian Dröge (slomo) 2015-10-17 12:05:37 UTC
No thoughts? :)
Comment 2 Tim-Philipp Müller 2015-10-17 13:10:49 UTC
Seems fine to me. Main benefit would be that the streaming lock is only taken once and not N times. Does transform_list_ip make sense though?
Comment 3 Sebastian Dröge (slomo) 2015-10-17 17:41:04 UTC
It depends how it's implemented. I was thinking of

> GstFlowReturn transform_list(trans, in_list, out_list)
> GstFlowReturn transform_list_ip(trans, list)

The former allocates an output list with all buffers, the latter makes sure that the list and all buffers are writable.
Comment 4 Olivier Crête 2015-10-20 18:05:56 UTC
What's the benefit of list specific vfuncs instead of having the baseclass handling lists and just call the subclass for each buffer, then push out the whole list as one item?
Comment 5 Sebastian Dröge (slomo) 2015-10-20 19:08:33 UTC
A subclass might want the option to push individual buffers downstream to decrease latency if processing is expensive. That is, preserve the current behaviour. Or maybe do something in between
Comment 6 Olivier Crête 2015-10-20 22:00:17 UTC
You could have a gst_base_transform_split_lists(gboolean) or something like that, although if they all arrive together, I'm not sure there is much of a usecase for splitting the list.
Comment 7 Sebastian Dröge (slomo) 2015-10-21 11:20:37 UTC
I'm thinking here of e.g. getting a buffer list of raw video frames in videoconvert, and then videoconvert taking a long time to convert them all... making the first buffers of the list too late, but they would have been in time if the buffer list was split.

You think adding vfuncs for buffer list support is too much new API?
Comment 8 Tim-Philipp Müller 2018-02-05 17:38:32 UTC
Do we actually have a real-world use case for this?

If not, perhaps we should just close this bug until someone actually needs this?

It's unusual to use buffer lists for "a list of raw video frames", because framerates are typically just not high enough that the push overhead of individual buffers matters. It's used in some locations to group buffers into a GOP which multifilesink will then write together or not, but that's the only case I can think of right now.
Comment 9 GStreamer system administrator 2018-11-03 12:26:26 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/102.