On Mon Mar 6 07:34:41 2023 +0000, Ziqing Hui wrote:
I think we need to do something that is very similar to wm_reader.c: reader_SetOutputProps(). Here is what reader_SetOutputProps() do:
reader_SetOutputProps() { ... wg_parser_stream_enable(stream->wg_stream); ... wg_parser_stream_seek(reader->streams[0].wg_stream, 1.0, reader->start_time, 0, AM_SEEKING_AbsolutePositioning, AM_SEEKING_NoPositioning); }
See: https://gitlab.winehq.org/wine/wine/-/blob/master/dlls/winegstreamer/wm_read... In wg_parser_stream_enable(), it calls gst_pad_push_event(gst_event_new_reconfigure()) to reconfigure the pipeline. Document of gst_event_new_reconfigure():
gst_event_new_reconfigure:
Create a new reconfigure event. The purpose of the reconfigure event is to travel upstream and make elements renegotiate their caps or reconfigure their buffer pools. This is useful when changing properties on elements or changing the topology of the pipeline.
Returns: (transfer full): a new #GstEvent
If we could do "reconfigure and seek" like reader_SetOutputProps(). Then we don't need to recreate wg_parser. What do you think?
@rbernon @zfigura