GNOME Bugzilla – Bug 552118
playbin: decoder fails to activate in push mode != decoder missing
Last modified: 2018-11-03 11:14:42 UTC
While trying to check bug #546695 against gst-plugins-bad 0.10.8, I opened a MIDI file in totem, and got the 'Search for suitable codec?' dialog box. The following messages were printed to the console: --- ** Message: don't know how to handle audio/midi ** Message: Error: A audio/midi decoder plugin is required to play this stream, but not installed. gstdecodebin.c(845): close_pad_link (): /play/decodebin0: No decoder to handle media type 'audio/midi' ** Message: Missing plugin: gstreamer|0.10|totem|audio/midi decoder|decoder-audio/midi (audio/midi decoder) --- However, I can play the file just fine if I run 'gst-launch playbin uri=file:///home/sam/som2rabi.mid'.
Odd. Could you make a debug log and reproduce the error and attach it? $ GST_DEBUG=*:5 totem /home/sam/som2rabi.mid 2>dbg.log $ bzip2 dbg.log
ARGH, now it plays the files fine! I'm sure I wasn't hallucinating! *sobs*
Aha! So totem will play MIDI files from the filesytstem fine, but if I run, for example, 'http://www.vgmusic.com/music/console/nintendo/nes/tetris_bradinsky.mid' then it gives me the error.
Created attachment 118740 [details] debug output from totem
Same here with gst-launch and playbin: $ gst-launch-0.10 playbin uri="http://www.vgmusic.com/music/console/nintendo/nes/tetris_bradinsky.mid" Setting pipeline to PAUSED ... Pipeline is PREROLLING ... ** Message: don't know how to handle audio/midi ERROR: from element /GstPlayBin:playbin0/GstDecodeBin:decodebin0: A audio/midi decoder plugin is required to play this stream, but not installed. Additional debug info: gstdecodebin.c(904): close_pad_link (): /GstPlayBin:playbin0/GstDecodeBin:decodebin0: No decoder to handle media type 'audio/midi' ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... FREEING pipeline ... Most likely the decoder not working in push mode.
Confirmed, I will look into adding support for push mode. I now just wonder why a codec install is triggered. Can't we handle this better. I meant push support will anyway collect the whole mid-file in a GstAdapter and then play from there.
I declare this partially a playbin* bug. Feel free to clone the bug for the midi push mode stuff.
*** Bug 580829 has been marked as a duplicate of this bug. ***
(In reply to comment #7) > I declare this partially a playbin* bug. Feel free to clone the bug for the > midi push mode stuff. Done
Both gst-launch and totem now play the file at the URL given.
Thanks for following up on this. > Both gst-launch and totem now play the file at the URL given. That's because the decoder has been made to work in push mode (afaik). I think this bug is supposed to be about playbin* not differentiating between 'decoder missing' and 'decoder doesn't support push mode' though, so reopening for now.
Yes, decodebin2 only sees that the decoder does not want to go into PLAYING when linking with the input srcpad. Not sure how we can differentiate between broken decoders and decoders that just don't work because they require pull mode.
Shouldn't this be a non-issue we now have queue2 on http uri ?
There's more to push mode than just http, and queue2 is not always used in ring buffer mode.
So what should we do here? Detecting the case where we had decoders but none were working is easy, but what should we do then? The missing plugin message is still valid, but the string in there is not. It should be more like "All available plugins were not possible to use", but we have no control over that with the current API.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/17.