GNOME Bugzilla – Bug 336465
[patch] Streaming support for avidemuxer
Last modified: 2007-02-04 11:48:11 UTC
Avidemuxer lacks currently streaming support. Attached patch adds push based functionality for non-seekable sources, mostly http sources. The basic idea is to use adapter to gather enough data for chunks, which are then either parsed or skipped.
Created attachment 62284 [details] [review] Streaming support for avidemuxer Please feel free to review the patch and give some comments.
I applied this patch to gst-plugins-good-0.10.3 and took it for a spin. I tried playing a few different files from a few different servers, and it seems to work. Seeking however does not work, but I'm not sure if it's because of avidemux or the http source (gnomevfs).
The patch looks good for me too. The reason why seeking doesn't work in streaming mode is currently because there is no index available to do the TIME<=>BYTES conversion. If the index was generated as chunks were being read through, it could be possible to seek backwards (provided the upstream sources allows seeking). For seeking forwards, there's only way : reading and discarding buffers until you reach the requested time-index (provided it's before the EOS).
Created attachment 70478 [details] [review] new patch with index memory optimization This patch also implements the optimization for the index memory usage (see #define MEMOPT in gstavidemux.h). I'd like to receive feedback how this can be integrated (the #define is ugly) - what about a gobject property. Which mode should be the default (the old?).
Please wait until after the release before you commit this, given that the patch is very intrusive, or at least quite big. Also, please make sure GST_DEBUG/LOG strings do not end in newlines and that there are no debug statements or other statements before any variable declarations (like in the dispose function). If the index optimisation stuff is not required for the streaming patch, it would be good to separate both things into two patches/commits.
Created attachment 71279 [details] [review] only streaming chages part of the patch
Created attachment 71293 [details] [review] only streaming chages part of the patch fixes handling of one chunk type
2006-08-23 Stefan Kost <ensonic@users.sf.net> * gst/avi/gstavidemux.c: (gst_avi_demux_class_init), (gst_avi_demux_init), (gst_avi_demux_dispose), (gst_avi_demux_reset), (gst_avi_demux_index_next), (gst_avi_demux_index_entry_for_time), (gst_avi_demux_src_convert), (gst_avi_demux_handle_src_query), (gst_avi_demux_handle_src_event), (gst_avi_demux_peek_chunk_info), (gst_avi_demux_peek_chunk), (gst_avi_demux_stream_init_push), (gst_avi_demux_stream_init_pull), (gst_avi_demux_parse_subindex), (gst_avi_demux_read_subindexes_push), (gst_avi_demux_read_subindexes_pull), (gst_avi_demux_parse_stream), (sort), (gst_avi_demux_parse_index), (gst_avi_demux_stream_index), (gst_avi_demux_sync), (gst_avi_demux_peek_tag), (gst_avi_demux_massage_index), (gst_avi_demux_stream_header_push), (gst_avi_demux_stream_header_pull), (gst_avi_demux_process_next_entry), (gst_avi_demux_stream_data), (push_tag_lists), (gst_avi_demux_loop), (gst_avi_demux_chain), (gst_avi_demux_sink_activate), (gst_avi_demux_activate_push), (gst_avi_demux_change_state): * gst/avi/gstavidemux.h: Initial streaming support for avidemux (fixes #336465)
*** Bug 369452 has been marked as a duplicate of this bug. ***
*** Bug 404065 has been marked as a duplicate of this bug. ***