[Bug 750033] basetransform - allow collation/separation of buffers

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sun May 31 22:56:16 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=750033

--- Comment #6 from Jan Schmidt <thaytan at noraisin.net> ---
(In reply to Sebastian Dröge (slomo) from comment #4)
> Review of attachment 304157 [details] [review]:
> 
> The submit_input_buffer() (you could maybe call the queue_input_buffer()?)
> and generate_output_buffer() API also seems a bit suboptimal to me.

My primary intent is to ensure that all existing elements see exactly the same
sequence of operations if they don't explicitly override either the
submit_input_buffer() or generate_output() vfuncs. Since we have a few
different variants of GstBaseTransform I want to be very careful to retain
backwards-compatibility.

That said, it might be possible to achieve what you suggested too.

> It seems more optimal to the default submit_input_buffer() queue one buffer,
> and then call generate_output_buffer() until that is done, and call some
> kind of finish_buffer() with the result(s). Instead of having the call to
> generate_output_buffer() directly in the chain/getrange functions, and
> magically forward the results.
> 
> That way you could have subclasses that override submit_input_buffer() to
> take control over the complete data flow (e.g. queue things up, have some
> other thread generate output and call finish()), or subclasses that have the
> default submit_input_buffer() and override just generate_output_buffer() to
> produce 0, 1 or many output buffers from one single input buffer. It seems
> like a more generic data flow model that can be customized more.

All those are possible with what I've generated, but moving the buffer pushing
into a _finish() function could work. I'll try it out.

> 
> ::: libs/gst/base/gstbasetransform.h
> @@ +93,3 @@
> +  /* Default submit_input_buffer places the buffer here,
> +   * for consumption by the generate_output method: */
> +  GstBuffer      *queued_buf;
> 
> Or what about buffer lists :)

Are a problem for the person that implements buffer list support in
GstBaseTransform :-P

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list