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 326875 - [0.11] Define meaning of GST_FLOW_RESEND or drop it
[0.11] Define meaning of GST_FLOW_RESEND or drop it
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.0
Other Linux
: Normal normal
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-01-13 17:10 UTC by Tommi Myöhänen
Modified: 2011-12-06 13:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for gstqueue element where GST_FLOW_RESEND is handled. (2.79 KB, patch)
2006-01-13 17:12 UTC, Tommi Myöhänen
rejected Details | Review

Description Tommi Myöhänen 2006-01-13 17:10:07 UTC
This new functionality has not yet been implemented to Gstqueue element, but it might be useful in some cases.
I'm attaching patch that adds the functionality for resending the buffer if next element requests that.
Comment 1 Tommi Myöhänen 2006-01-13 17:12:19 UTC
Created attachment 57291 [details] [review]
Patch for gstqueue element where GST_FLOW_RESEND is handled.
Comment 2 Jan Schmidt 2006-02-09 22:32:36 UTC
There's 2 problems with this patch:
1) Copying the buffer is completely wrong - that will copy the data too, which is a huge unecessary overhead especially (for example) for HD video frames, each of which is several megabytes.

2) Noone except Wim seems to know what he intended GST_FLOW_RESEND for, and I'm not sure it means Queue should just push it again.

CC'ing wim for comment.
Comment 3 Tommi Myöhänen 2006-02-13 12:47:15 UTC
> 1) Copying the buffer is completely wrong - that will copy the data too, which
> is a huge unecessary overhead especially (for example) for HD video frames,
> each of which is several megabytes.

The copy operation is done, because in case the next element alters the data that buffer contains. If it then requests same buffer again, it gets the original data.
Are there any specific rule in this case, can element alter the buffer data and then request resending the buffer? If not, then it's quite small change to drop the copy operation from the queue patch.

> 2) Noone except Wim seems to know what he intended GST_FLOW_RESEND for, and
> I'm not sure it means Queue should just push it again.

For our understanding, this is the case. But let's hear Wim's comments.
Comment 4 Jan Schmidt 2006-02-13 12:59:13 UTC
It's sufficient to hold a reference to a buffer to ensure that noone else modifies it - before an element modifies any buffer that it didn't create, the element needs to check gst_buffer_is_writable, or call gst_buffer_make_writable.

gst_buffer_is_writable is FALSE whenever the refcount is > 1 (or when the data pointer is read-only), ie when the caller isn't the sole owner of the buffer data.

So, either way, the unconditional buffer copy can and should be avoided.
Comment 5 Wim Taymans 2007-07-03 16:44:45 UTC
I originally envisioned _RESEND in the case where you have a PAUSED videoscale ! videosink and you resize the video window. The prerolled frame would be returned to the videoscale with a _RESEND return value, videoscale would resend the buffer after resizing it to the new size (which it then gets from alloc_buffer).
Comment 6 Sebastian Dröge (slomo) 2008-05-05 08:50:25 UTC
Is this bug still valid then? Should queue handle _RESEND somehow?
Comment 7 Christian Fredrik Kalager Schaller 2011-05-27 08:31:05 UTC
Change target milestone to 0.11.x
Comment 8 Wim Taymans 2011-12-06 13:26:40 UTC
Dropped in 0.11