GNOME Bugzilla – Bug 339142
playable movies can't be played if inside a web page!
Last modified: 2006-04-23 23:00:42 UTC
That bug has been opened on https://launchpad.net/distros/ubuntu/+source/totem/+bug/38584 "hello! I was surfing a web page with a video inside, this is the link http://www.allmusic.tv/video.asp?video=ams/pt01 as you can notice if you try, the place where the video should be visualized is black, and totem controls whick should appear in the bottom, seem to have crashed (see attached pic) Then I decided to visualize the source page and get the link to the video by hands, which is mms://mediaserver.kataweb.it/allmusic/ams/pt01.wmv then I opened my totem-xine and put this link, and I realized it could play the video!!!! so it sould play it from the webpage too... no pic, since this time the bar appeared,but again no video is visualized http://librarian.launchpad.net/1966707/bar-ok.png screenshot, when the page has just been loaded http://librarian.launchpad.net/1966708/Schermata.png totem was crashed also before, becuse bar buttons could not be pressed. but in this screenshot we can see totem really crashed. if I try to make an action on the tab (close, back) firefox hangs for a minute (I think he's trying to close gently totem), then executes the action and comes back to its ordinary status"
Please gather a backtrace from the plugin crash.
that bug was rather about the movie not playing, I'll try getting a backtrace for the crasher
Well, the movie won't play is the plugin backend crashes...
I had a look at this problem, and the UI was hanging with both the xine and gstreamer backends. After setting a number of breakpoints in totem-mozilla-plugin.cpp, it seemed that while the plugin was getting initialized, the nsPluginInstance::Write and nsPluginInstance::WriteReady methods were never being called. This suggested that firefox just wasn't passing any data to totem. After noting that the URI was an mms: URI, I had an idea that maybe firefox couldn't download mms: URIs (it needs a helper application, which is no good for creating an nsIStream stream internally). So I have a patch here which passes the URI to totem if it's an mms: URI, otherwise passes fd://0 (and always returns that no data is needed, to firefox). I know a better way would be to ask firefox what protocols it supports, and only do this for other ones, but I don't know what API call does that. I know that based on http://www.xulplanet.com/references/xpcomref/ifaces/nsIProtocolHandler.html#method_newChannel there is probably no internal support for mms: ... actually, I guess calling nsIIOService::extractScheme, followed by a test of nsIIOService::getProtocolHandler might allow a check for a supported protocol... but I'd like to check if that's the way you'd prefer to go before rewriting it this way. I'd appreciate comments on the patch - it allows my system to view a large number of streams which failed to work before the change.
Created attachment 64025 [details] [review] Allows mms: URIs to be streamed from within firefox This patch does a few things: 1. passes URL on command line to totem instead of fd://0, if it begins with mms: 2. in totem_plugin_write_ready and totem_plugin_write, tells firefox it doesn't want any data, if URL begins with mms: 3. adds video/x-wmv MIME type, otherwise the video format isn't recognised Note: the video/x-wmv type is recognised as having the name "ASF video", where maybe it should have "WMV video"?
example pointed works fine on my box with the patch
I committed a slightly adapted patch, thanks. 2006-04-23 Bastien Nocera <hadess@hadess.net> * src/totem-mozilla-plugin.cpp: Patch from Gary Coady <gary@lyranthe.org> to allow direct playback of stream from protocol schemes not supported by Mozilla (Closes: #339142)