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 361718 - [basetransform] needs API to force renegotiation
[basetransform] needs API to force renegotiation
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: 0.10.21
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 535035 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-10-12 15:00 UTC by Tim-Philipp Müller
Modified: 2008-08-20 11:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
first attempt, adds gst_base_transform_clear_negotiated_caps() (2.03 KB, patch)
2006-10-12 17:09 UTC, Tim-Philipp Müller
none Details | Review

Description Tim-Philipp Müller 2006-10-12 15:00:55 UTC
Basetransform should have API for sub-classes to force caps renegotiation.

This is necessary if caps depend on properties and those properties are changed while the pipeline is running.

Examples:

  - videocrop / videobox
  - capsfilter
Comment 1 Tim-Philipp Müller 2006-10-12 17:09:49 UTC
Created attachment 74583 [details] [review]
first attempt, adds gst_base_transform_clear_negotiated_caps()

First attempt at a patch, not entirely sure about the locking order though.
Comment 2 Tim-Philipp Müller 2007-01-28 16:44:36 UTC
The patch doesn't really solve the problem though, which is that there's raciness going on between upstream doing pad_alloc_buffer(), doing something with the buffer and pushing the buffer downstream. If in between these things a property is changed (from the main thread), upstream might get a not-negotiated and the pipeline errors out.

So, dunno what to do. I somehow feel the application shouldn't need to worry about things like this.

(removing block on videocrop bug since this has nothing to do with videocrop in particular and applies to videobox and capsfilter as well).
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2007-05-11 12:34:03 UTC
I wonder which flowresult the upstream element is getting in this case and if we could not make it be GST_FLOW_RESEND. This need that gst_pad_push sort of knows about the caps change. RESEND is also not alays easy to do. In my case there are audioconvert elements which could renegotiate and reconvert the current buffer. But its probably easier to drop the buffer and send flag the next DISCONT.
Comment 4 Tim-Philipp Müller 2008-05-27 11:03:34 UTC
*** Bug 535035 has been marked as a duplicate of this bug. ***
Comment 5 Wim Taymans 2008-08-05 11:25:51 UTC
new basetransform has suggest_caps() for triggering an upstream renegotiation.
Comment 6 Wim Taymans 2008-08-20 11:38:53 UTC
Support for both renegotiation methods is added now.

        * docs/libs/gstreamer-libs-sections.txt:
        * libs/gst/base/gstbasetransform.c:
        (gst_base_transform_handle_buffer), (gst_base_transform_getrange),
        (gst_base_transform_chain), (gst_base_transform_suggest),
        (gst_base_transform_reconfigure):
        * libs/gst/base/gstbasetransform.h:
        Implement method for reconfiguring basetransform.
        API: GstBaseTransform::gst_base_transform_reconfigure()