GNOME Bugzilla – Bug 654145
tb-sound-player.c reads files twice
Last modified: 2011-07-18 22:44:45 UTC
You're creating 2 separate pipelines reading the same file, one GstDiscoverer pipeline to get the tags, one playbin pipeline to reading. Even though GstDiscoverer is relatively lightweight, it's still a separate pipeline, doing its own reading, parsing, etc. The tags are already available from playbin. Other problems with the current code include: - using "playbin" instead of the better supported, and with less bugs "playbin2" - Absolute horrors like: pipeline_desc = g_strdup_printf("playbin uri=\"%s\"", priv->uri); (Hint, it's a GObject, why would you marshal the uri to a string, only to have GStreamer demarshal it to a separate string) play = gst_element_factory_make ("playbin2", "play"); g_object_set (play, "uri", priv->uri); Given that this code has an exception for proprietary GStreamer plugins (as Totem does), some basic code could be taken from totem-audio-preview.c and the likes.
Thanks for the report. The Board's TbSoundPlayer doesn't use GstDiscoverer at all. I guess this is something Cosimo added specifically for Sushi. As for the other suggestions, I'll try to find some time to fix them today but feel free to send a patch before :-) --lucasr
Ok, removed the hack with the URI and pipeline parsing. TbSoundPlayer and TbSoundRecorder are now URI-based (instead of path-based). Cosimo, I guess you want to apply the tb-sound-player.c specific part of commit 2b2f94858f0740c714e2e47e84adafa4ff39c4f4 to sushi's tree? I'm closing this bug as there's nothing else to do in The Board's code.
Cosimo, I guess you want 54d85f6e8393329a77ac5410ef92d44bc2c5dd2a too :-)