GNOME Bugzilla – Bug 352827
re-negotiation issues with dynamic pipelines and level or volume.
Last modified: 2006-11-30 22:21:58 UTC
If you create a composition with two file sources and the following settings: self.audio1.set_property("location", filename) self.audio1.set_property("start", long(0)) self.audio1.set_property("duration", long(2) * gst.SECOND) self.audio1.set_property("media-start", 10 * gst.SECOND) self.audio1.set_property("media-duration", 2 * gst.SECOND) self.audio2.set_property("location", filename) self.audio2.set_property("start", long(4)) self.audio2.set_property("duration", long(2) * gst.SECOND) self.audio2.set_property("media-start", 10 * gst.SECOND) self.audio2.set_property("media-duration", 2 * gst.SECOND) the playback never gets to the second gnlfilesource. Attached is a program that demonstrates the bug.
Created attachment 71583 [details] Sample program to demonstrate the bug
Created attachment 71584 [details] Glade file for use with the bug
Created attachment 71587 [details] Test case for the bug
This is not an issue in gnonlin, it works perfectly fine if you remove the level and volume elements which are outside the gnlcomposition. It seems to be an issue with re-negotation. As in it plays the first source fine (ogg, float audio), then the default source, but when it switches to the second source (which is the same file as the first source) it fails to negotiate. Changing title and category.
have a guess... basetransform is the culprit :(
Created attachment 72410 [details] [review] Fix for bufferalloc
The problem is that base_transform_buffer_alloc() is doing NO checks whatsoever when ->have_same_caps is set to TRUE, it just blindly calls buffer_alloc() on the src pad. The proposed fix will, if ->have_same_caps is TRUE, check the requested caps against the caps of the sink pad. If they are different, base_transform_buffer_alloc() will behave as if have_same_caps() is FALSE.
Commited. We definitely need some unit test in -good/-base for basetransform-based elements in order to make sure these issues don't re-appear later on. 2006-09-16 Edward Hervey <edward@fluendo.com> * libs/gst/base/gstbasetransform.c: (gst_base_transform_buffer_alloc): Check if requested caps are the same as the sinks caps IF ->have_same_caps is TRUE. If they are not, act as if have_same_caps is FALSE. This fixes the renegotiation issues stated in #352827.
I added a high-level test in gnonlin for this behaviour. 2006-09-16 Edward Hervey <edward@fluendo.com> * tests/check/common.h: Added convenience function to create a int/float audiotest gnlsource. * tests/check/complex.c: (GST_START_TEST), (gnonlin_suite): Added test_renegotiation to test re-negotiation error seen in #352827