[gstreamer-bugs] [Bug 607945] New: oggdemux: Ogg Index support for seek in push mode

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Jan 24 09:02:47 PST 2010


https://bugzilla.gnome.org/show_bug.cgi?id=607945
  GStreamer | gst-plugins-base | git

           Summary: oggdemux: Ogg Index support for seek in push mode
    Classification: Desktop
           Product: GStreamer
           Version: git
        OS/Version: All
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: jay at jcornwall.me.uk
         QAContact: gstreamer-bugs at lists.sourceforge.net
      GNOME target: ---
     GNOME version: ---


Ogg streams present non-trivial problems to an efficient implementation of
stream seek in a demuxer. In pull mode, oggdemux performs an initial scan of
the entire stream and uses bisection searches to map seek time to stream
position. In push mode, there is no support for seeking at all.

The proposed Ogg Index [1] metadata stream rectifies this situation by
providing stream statistics and a time:offset index of keypoints in all of the
logical streams. This may either be constructed at creation time or appended to
an existing Ogg file with a tool such as OggIndex [2]. The proposal is being
driven by interest in Ogg Theora as an HTML 5 video format and emerged from a
desire to improve its poor seek support, which is currently implemented through
bisection search over HTTP.

In the patch which follows, I have constructed a modification of oggdemux to
parse the proposed Ogg Index metadata stream, if available, and to use it to
implement seeking in push mode. Pull mode is left unchanged. The patch is in an
alpha state and is tracking the Ogg Index specification until the format is
frozen. Until that time, this patch should be considered a proposal and for
testing purposes only.

All comments are welcome. This is my first venture into GStreamer development
an I am unfamiliar with the established structure of a demuxer. There may be
things that are ugly or just plain broken. I will endeavour to fix any problems
in a timely manner.

A test video stream is available at [3]. I have tested the patch in GNOME's
Totem media player and in the Rhythmbox player with audio-over-DAAP. Video
testing is preliminary but appears to work; I have observed occasional
sync-after-seek issues (starting and stopping, as if the audio/video drift is
too large) but I believe these are only exposed by this patch and not caused by
it. I am happy to be proven wrong. :)

Patch follows in next comment.

[1] http://wiki.xiph.org/Ogg_Index
[2] http://github.com/cpearce/OggIndex
(Note: at the time of writing this tool embeds an incorrect stream frequency in
the metadata, causing incorrect playback rates; the author has been notified
and a temporary patch is given below.)
[3] http://www.jcornwall.me.uk/temp/big_buck_bunny_427x240.indexed.ogg

diff --git a/src/Decoder.cpp b/src/Decoder.cpp
index 82dd451..6403c7f 100644
--- a/src/Decoder.cpp
+++ b/src/Decoder.cpp
@@ -507,7 +507,7 @@ public:

   virtual FisboneInfo GetFisboneInfo() {
     FisboneInfo f;
-    f.mGranNumer = mInfo.channels * mInfo.rate;
+    f.mGranNumer = mInfo.rate;
     f.mGranDenom = 1;
     f.mPreroll = 2;
     f.mGranuleShift = 0;

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list