GNOME Bugzilla – Bug 498976
regression for loop playback
Last modified: 2011-08-09 09:35:07 UTC
compile the attached source with: gcc -Wall -g `pkg-config gstreamer-0.10 gstreamer-controller-0.10 --cflags --libs` seek2.c -o seek2 and run it as: ./seek2 loop The source has the following lines: // FIXME: it works when using identfy/volume instead 'level' elem = gst_element_factory_make ("level", "level");
That was too quick: The loop play when using identify or volume. But it blocks with level/spectrum (I have not found others so far). After the first loop segment done is handled, the level/spectrum also processes buffer with timestamps restarting a 0, but cpu goes up to 100% and I don't hear anything.
Created attachment 99477 [details] standalone test case
Created attachment 99491 [details] standalone audio test case Shorter version of the testcase. one more observation too: With the version that gets stuck, I get 20 times: basesrc gstbasesrc.c:2038:gst_base_src_loop:<gen_audio> 0:00:06.000000000 >= 0:00:06.000000000 With the version that plays, I get this just once (and I pressed Ctrl-C after it looped succesfully).
Created attachment 99542 [details] standalone video test case Same happens with video. The video example also tries to loop for 6sec. Usualy it gets stuck and does not loop back. Sometimes it does and when it does, the clock goes crazy after some loops. This is also what happens in the audio case, only that it is easier to reproduce there.
It plays once and then complains abot duplicated events. GST_DEBUG="*:2" ./seek2 loop 0:00:00.197221159 14277 0x9650008 WARN basesrc gstbasesrc.c:1233:gst_base_src_perform_seek:<gen_audio> duplicate event found 38 0:00:05.815880729 14277 0x9650008 WARN basesrc gstbasesrc.c:1233:gst_base_src_perform_seek:<gen_audio> duplicate event found 71 0:00:05.960555694 14277 0x9650008 WARN basesrc gstbasesrc.c:1233:gst_base_src_perform_seek:<gen_audio> duplicate event found 79 0:00:06.105172113 14277 0x9650008 WARN basesrc gstbasesrc.c:1233:gst_base_src_perform_seek:<gen_audio> duplicate event found 87 0:00:06.250106388 14277 0x9650008 WARN basesrc gstbasesrc.c:1233:gst_base_src_perform_seek:<gen_audio> duplicate event found 95
Hmm, I see no difference in regard to volume/level/identity here anymore. Instead its not looping anymore and I get gstbasesrc.c:1233:gst_base_src_perform_seek:<gen_audio> duplicate event found when going to playing and each time I get a segment done and seek again. Need to check if the event is sent to all sinks and I get duplicates because of that.
Seems to be a racy condition, while running GST_DEBUG=2,GST_EVENT:5 ./seek2 loop > dump 2>&1 I don't get the problem, when I run without the debug I get it.
seems to work nowadays.