After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 336465 - [patch] Streaming support for avidemuxer
[patch] Streaming support for avidemuxer
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
Other Linux
: Normal normal
: 0.10.5
Assigned To: Stefan Sauer (gstreamer, gtkdoc dev)
GStreamer Maintainers
: 369452 404065 (view as bug list)
Depends on:
Reported: 2006-03-29 10:12 UTC by Tommi Myöhänen
Modified: 2007-02-04 11:48 UTC
See Also:
GNOME target: ---
GNOME version: ---

Streaming support for avidemuxer (23.17 KB, patch)
2006-03-29 10:17 UTC, Tommi Myöhänen
none Details | Review
new patch with index memory optimization (58.57 KB, patch)
2006-08-08 11:54 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
reviewed Details | Review
only streaming chages part of the patch (41.85 KB, patch)
2006-08-21 07:57 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review
only streaming chages part of the patch (41.98 KB, patch)
2006-08-21 11:03 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review

Description Tommi Myöhänen 2006-03-29 10:12:43 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.
Comment 1 Tommi Myöhänen 2006-03-29 10:17:40 UTC
Created attachment 62284 [details] [review]
Streaming support for avidemuxer

Please feel free to review the patch and give some comments.
Comment 2 Philip Jägenstedt 2006-07-04 14:17:22 UTC
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).
Comment 3 Edward Hervey 2006-07-09 10:17:09 UTC
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).
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2006-08-08 11:54:11 UTC
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?).
Comment 5 Tim-Philipp Müller 2006-08-08 12:21:19 UTC
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.
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2006-08-21 07:57:44 UTC
Created attachment 71279 [details] [review]
only streaming chages part of the patch
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2006-08-21 11:03:32 UTC
Created attachment 71293 [details] [review]
only streaming chages part of the patch

fixes handling of one chunk type
Comment 8 Stefan Sauer (gstreamer, gtkdoc dev) 2006-08-23 15:36:42 UTC
2006-08-23  Stefan Kost  <>

        * 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_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_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/gstavidemux.h:
          Initial streaming support for avidemux (fixes #336465)
Comment 9 Tim-Philipp Müller 2006-11-02 18:02:17 UTC
*** Bug 369452 has been marked as a duplicate of this bug. ***
Comment 10 Tim-Philipp Müller 2007-02-04 11:48:11 UTC
*** Bug 404065 has been marked as a duplicate of this bug. ***