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 599266 - Requires restart after installing codecs
Requires restart after installing codecs
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.x
Other Linux
: Normal normal
: 0.10.26
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 601480
 
 
Reported: 2009-10-22 06:24 UTC by Robert Ancell
Modified: 2009-11-11 05:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test program to try and get plugin install to work (2.15 KB, text/x-csrc)
2009-10-22 22:53 UTC, Robert Ancell
Details
Gstreamer log of installing codec required to play (part 1) (943.17 KB, application/x-bzip)
2009-10-29 02:28 UTC, Robert Ancell
Details
Gstreamer log of installing codec required to play (part 2) (920.40 KB, application/x-bzip)
2009-10-29 02:28 UTC, Robert Ancell
Details

Description Robert Ancell 2009-10-22 06:24:30 UTC
To reproduce:
1. Make sure that gstreamer-plugins-bad is not installed
2. Open totem with a MPEG4 audio file, i.e.:
$ totem test.m4a
3. Install gstreamer-plugins-bad

Expected result:
Audio file plays once codec is installed

Observed result:
The following error is displayed and the file does not play:
An error occurred
The playback of this movie requires a MPEG-4 AAC decoder plugin which is not installed.
The file plays if you close totem and start it again.

(tested on Ubuntu 9.10)

Occurs in 2.27 onwards (including git master).  Does not occur in 2.26.4.
Comment 1 Bastien Nocera 2009-10-22 15:28:30 UTC
What's the debug output when installing that file?
Comment 2 Robert Ancell 2009-10-22 22:51:38 UTC
bob@alchemy2:~$ totem --debug /media/sda2/Documents\ and\ Settings/Robert\ Ancell/My\ Documents/My\ Music/iTunes/iTunes\ Music/AIR/Pocket\ Symphony/01\ Space\ Maker.m4a sic/AIR/Pocket\ Symphony/01\ Space\ M** Message: Error: Your GStreamer installation is missing a plug-in.
gstdecodebin2.c(2449): gst_decode_bin_expose (): /GstPlayBin2:play/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20:
no suitable plugins found

** Message: Missing plugin: gstreamer|0.10|totem|MPEG-4 AAC decoder|decoder-audio/mpeg, mpegversion=(int)4, framed=(boolean)true (MPEG-4 AAC decoder)
/usr/lib/python2.6/dist-packages/GnomeCodecInstall/MainWindow.py:300: DeprecationWarning: Accessed deprecated property Package.candidateRecord, please see the Version class for alternatives.
  record = pkg.candidateRecord
/usr/lib/python2.6/dist-packages/GnomeCodecInstall/MainWindow.py:305: DeprecationWarning: Accessed deprecated property Package.candidateRecord, please see the Version class for alternatives.
  major, minor = pkg.candidateRecord["Gstreamer-Version"].split(".")
** Message: Missing plugins installed. Updating plugin registry ...
** Message: Plugin registry updated, trying again.
** Message: Missing plugin: gstreamer|0.10|totem|MPEG-4 AAC decoder|decoder-audio/mpeg, mpegversion=(int)4, framed=(boolean)true (ignoring)
** Message: All missing plugins are blacklisted, doing nothing
** Message: Error: Your GStreamer installation is missing a plug-in.
gstdecodebin2.c(2449): gst_decode_bin_expose (): /GstPlayBin2:play/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin21:
no suitable plugins found

** Message: Missing plugin: gstreamer|0.10|totem|MPEG-4 AAC decoder|decoder-audio/mpeg, mpegversion=(int)4, framed=(boolean)true (ignoring)
** Message: All missing plugins are blacklisted, doing nothing
Comment 3 Robert Ancell 2009-10-22 22:53:43 UTC
Created attachment 146070 [details]
Test program to try and get plugin install to work

This program also fails to play, I was trying to find what is required to continue a stream that requires a codec
Comment 4 Tim-Philipp Müller 2009-10-23 08:30:26 UTC
Could you attach (or make available otherwise if too big) a GST_DEBUG log please, like:

  $ GST_DEBUG=*:5 totem foo.m4a 2>dbg.log
  $ bzip2 dbg.log
Comment 5 Robert Ancell 2009-10-29 02:28:11 UTC
Created attachment 146470 [details]
Gstreamer log of installing codec required to play (part 1)
Comment 6 Robert Ancell 2009-10-29 02:28:48 UTC
Created attachment 146471 [details]
Gstreamer log of installing codec required to play (part 2)
Comment 7 Bastien Nocera 2009-11-10 11:02:24 UTC
Was reported on Fedora as well, with both Rhythmbox and Totem:
https://bugzilla.redhat.com/show_bug.cgi?id=533544
Comment 8 Sebastian Dröge (slomo) 2009-11-10 11:27:07 UTC
The problem here most probably is, that decodebin2 gets the factories from the registry a single time: at instantiation. Instead it should do that everytime when going NULL->READY IMO. Not sure if playbin2 or uridecodebin keeps a list of factories but if they do the same applies ;)

And then totem/RB should set playbin2 to NULL after the plugins were installed and then back to PLAYING.
Comment 9 Sebastian Dröge (slomo) 2009-11-10 11:34:23 UTC
Of course changing decodebin2 to update the factories everytime when going NULL->READY is a performance problem with latest totem because it always goes back to NULL after every track (see bug #599478).

Does anybody have better ideas? Signals in GstRegistry maybe? :)
Comment 10 Sebastian Dröge (slomo) 2009-11-10 11:35:45 UTC
(In reply to comment #9)

> Does anybody have better ideas? Signals in GstRegistry maybe? :)

Which would be "feature-added" then and exists already... not sure if that's better though because it's triggered for every single feature that is added/updated.
Comment 11 Wim Taymans 2009-11-10 11:39:00 UTC
We could add a cookie that is updated when the registry list changes, decodebin/playbin would then rebuild its list when it sees that the cookie changed since the last snapshot.
Comment 12 Sebastian Dröge (slomo) 2009-11-10 11:42:10 UTC
(In reply to comment #11)
> We could add a cookie that is updated when the registry list changes,
> decodebin/playbin would then rebuild its list when it sees that the cookie
> changed since the last snapshot.

This cookie is already in the instance private data, we could simply export it (or emulate it by having our own cookie in decodebin2 that changes everytime feature-added is emitted).

So you would do it always in NULL->READY if that cookie has changed? Or something else?
Comment 13 Wim Taymans 2009-11-10 11:48:37 UTC
I would export it with a simple getter or something, and then always recheck in NULL->READY.
Comment 14 Sebastian Dröge (slomo) 2009-11-10 12:05:46 UTC
(In reply to comment #13)
> I would export it with a simple getter or something, and then always recheck in
> NULL->READY.

Ok, I'll do that later then. Sounds good
Comment 15 Sebastian Dröge (slomo) 2009-11-10 17:17:06 UTC
commit bbb4210738306e0533ee6227e51a489f5dc16d10
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Tue Nov 10 18:13:25 2009 +0100

    playback: When going from NULL->READY check if the registry has new features
    
    This makes it possible to use newly installed plugins after going back
    to NULL instead of requiring a new instance.
    
    Fixes bug #599266.