GNOME Bugzilla – Bug 327658
"Seek in ready" support for wavparse plugin
Last modified: 2006-03-13 18:28:23 UTC
A patch that enables wavparse plugin to seek in ready state. The patch is based on this one: http://bugzilla.gnome.org/show_bug.cgi?id=323880
Created attachment 57626 [details] [review] "seek in ready" support for wavparse I've made the patch against 10.0 (I didn't want to upgrade the entire gst stack just to create the diff), but it's a small one and should work on cvs head without problems. If required, I can produce an updated patch based on cvs head source. I've tested the patch with a sample app and Diva nunit tests, and it seems to work for me.
commited an alternative patch to CVS can you check it passes your unit tests? * gst/wavparse/gstwavparse.c: (gst_wavparse_class_init), (gst_wavparse_reset), (gst_wavparse_init), (gst_wavparse_create_sourcepad), (gst_wavparse_parse_file_header), (gst_wavparse_stream_init), (gst_wavparse_perform_seek), (gst_wavparse_stream_headers), (gst_wavparse_send_event), (gst_wavparse_stream_data), (gst_wavparse_loop), (gst_wavparse_srcpad_event), (gst_wavparse_sink_activate_pull), (gst_wavparse_change_state): * gst/wavparse/gstwavparse.h: Implement seek in READY (fixes #327658) Added docs and did some cleanups.
It doesn't work since the element calls gst_wavparse_reset when going from READY -> PAUSED, which effectively nullifies the previously kept event. Works after an obvious fix.
Also, sending the event via send_element AFTER the element has gone READY (PAUSED -> READY) doesn't work as the wav->state == GST_WAVPARSE_DATA but there are no pads to push to. Can be fixed by reseting on PAUSED -> READY. Not sure if it's clean.
* gst/wavparse/gstwavparse.c: (gst_wavparse_reset), (gst_wavparse_change_state): Implement seek in READY (re-fixes #327658)