GNOME Bugzilla – Bug 351495
[wavpackparse] add support for push-based mode
Last modified: 2006-08-15 20:29:44 UTC
Hi, the attached patch adds support for push-based mode to wavpackparse and implements the SEEKING query and adds a query_types function. Bye
Created attachment 70958 [details] [review] wavpackparse-push.diff
Cool, thanks for the patch. Some comments: - EOS/FLUSH_STOP events will arrive on the _sink_ pad, not the source pad. - in push-mode we will receive a NEWSEGMENT event on the sink pad, most likely in BYTES format. We should just drop that, knowing that we will send our own TIME-based newsegment event later. If we don't, then downstream will receive two newsegment events in different formats and things will go haywire (this will get more tricky when we add seeking in push-mode, but for now just dropping the event should do). - about the SEEKING query: it should return TRUE even if it knows that it's not seekable, that's information. It should return FALSE if it does not have the information to answer the query. Rewrote this a bit and shortened it by using gst_pad_query_duration(), also adding support for GST_FORMAT_DEFAULT. - in the chain function, we should ideally check for the wavpack marker in the header and re-sync (look for a new marker) if it's not there, especially after receiving a buffer with DISCONT flag. Something for the future, not absolutely required. committed with above fixes: 2006-08-15 Tim-Philipp Müller <tim at centricular dot net> Patch by: Sebastian Dröge <slomo at circular-chaos.org> * ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_class_init), (gst_wavpack_parse_reset), (gst_wavpack_parse_get_src_query_types), (gst_wavpack_parse_src_query), (gst_wavpack_parse_handle_seek_event), (gst_wavpack_parse_sink_event), (gst_wavpack_parse_init), (gst_wavpack_parse_create_src_pad), (gst_wavpack_parse_push_buffer), (gst_wavpack_parse_loop), (gst_wavpack_parse_chain), (gst_wavpack_parse_sink_activate), (gst_wavpack_parse_sink_activate_pull): * ext/wavpack/gstwavpackparse.h: Make wavpackparse also work in push-mode (not seekable yet though); some small clean-ups along the way; add support for SEEKING query and query types function. (#351495).