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 143222 - [oggdemux] Optimize tag reading
[oggdemux] Optimize tag reading
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: Normal normal
: 0.8.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-05-26 17:14 UTC by Johan (not receiving bugmail) Dahlin
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Johan (not receiving bugmail) Dahlin 2004-05-26 17:14:12 UTC
When using a pipeline like this: filesrc ! oggdemux ! vorbistag ! fakesink
(which is useful for tag reading), oggdemux first reads the whole file and then
seeks back to the beginning before pushing and buffers to vorbistag. This makes
it take approximately 2000 iterations (and 200 ms on my box) before vorbistag
even can see the tags!

It doesn't matter a lot for playing the file, 200 ms is acceptable (but not
optimal) but for something like tag reading when importing your whole database,
this is quite critical for performance.

A solution which was mentioned by Benjamin on irc involves checking the first
page of the stream and save the serial number, then seek to the end without
reading all the pages and find the last page and compare the serial number of
the oggstream and read the length (by calling ogg_page_granulepos) and seek back
to the beginning and push the tags.
Comment 1 Tim-Philipp Müller 2004-06-08 15:31:32 UTC
With bigger .ogg files it matters for playing as well. 
 
I have quite a lot of 70-150 MB .ogg files (whole albums in one file), and 
whenever I play one of those files, it takes around 3-6 seconds before it even 
starts playing (2-3 secs if the file is cached in memory). 
 
Does oggdemux need to know the exact length for anything? Would it be possible 
to add a property that makes it skip the stream length finding process as a 
dirty hack if this can't be solved otherwise? (e.g for music players that have 
already imported the file and know the length) 
 
Cheers 
 -Tim 
 
Comment 2 Benjamin Otte (Company) 2004-07-04 19:30:27 UTC
This should be quite a lot faster after the recent reorganization of the setup
code. It benchmarks at about 0.06 seconds until playback starts for normal ogg
files.

So I'm closing this as fixed.