GNOME Bugzilla – Bug 746544
basetransform: Add buffer list support
Last modified: 2018-11-03 12:26:26 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?
No thoughts? :)
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?
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.
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?
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
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.
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?
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.
-- 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.