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 339142 - playable movies can't be played if inside a web page!
playable movies can't be played if inside a web page!
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: Browser plugin (obsolete)
1.4.x
Other Linux
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-04-20 09:48 UTC by Sebastien Bacher
Modified: 2006-04-23 23:00 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Allows mms: URIs to be streamed from within firefox (1.71 KB, patch)
2006-04-21 10:09 UTC, Gary Coady
none Details | Review

Description Sebastien Bacher 2006-04-20 09:48:32 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"
Comment 1 Bastien Nocera 2006-04-20 09:54:12 UTC
Please gather a backtrace from the plugin crash.
Comment 2 Sebastien Bacher 2006-04-20 12:27:15 UTC
that bug was rather about the movie not playing, I'll try getting a backtrace for the crasher
Comment 3 Bastien Nocera 2006-04-20 12:29:07 UTC
Well, the movie won't play is the plugin backend crashes...
Comment 4 Gary Coady 2006-04-21 10:07:20 UTC
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.
Comment 5 Gary Coady 2006-04-21 10:09:03 UTC
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"?
Comment 6 Sebastien Bacher 2006-04-21 10:16:16 UTC
example pointed works fine on my box with the patch
Comment 7 Bastien Nocera 2006-04-23 23:00:42 UTC
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)