Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
redhat 9 machine, pretty much stock. Latest (as of
yesterday) mplayer compiles, installs, runs w/o
problems. My intent is to get the plugin working with
FireFox. So, I D/L source, and...
./configure --enable-gtk1 ((no errors or warnings)
(various things compile, then:)
Source/plugin-support.cpp: In function `int
toolkitOk(NPP_t*, int*, int*)':
Source/plugin-support.cpp:577: `NPNVToolkit' undeclared
(first use this function)
Source/plugin-support.cpp:577: (Each undeclared
identifier is reported only once for each function it
make: *** [plugin-support.o] Error 1
I googled for NPNVToolkit, but got very few results
(seven, in fact) and none of them led me to a resolution.
I looked for binary RPMs, but they're only available
for Fedora, which RH9 definitely isn't. So source seems
to be my only option.
Assistance would be most appreciated.
You need to install mozilla-devel or use the gecko-sdk method of compiling mplayerplug-in.
See this page: http://mplayerplug-in.sourceforge.net/install.php#plugin
Ok. I did "apt-get install mozilla-devel", and (besides an obsolete version of firefox, mozilla, galeon and a bunch of other stuff) I received level 1.4.x of the development kit. Which, according to the docs page you pointed to, isn't going to work. I tried anyway, but got the same error.
So next I went and got gecko, configured with it, and that DID allow the plug-in to compile. I installed it (.so and .xpt) by hand into the firefox plugins directory, and got rid of the old stuff in the process.
The new plugin comes up in the browser (it looks quite different, a lined backdrop) but the controls do not show and there is no video. You just get the download bar. The audio does play. Once the entire clip has been loaded, you can save it using the context menu, and that will play just fine in mplayer, but again, it won't show in the window.
I'm using the sin city small trailers at apple.com's trailers site as testbeds.
Any other ideas?
Hmm. I realized forgot to do the "gtk1" configure option... so I went back and did that, now firefox (1.0) crashes when mplayer has opened on a page -- the movie does not play at all, I just get a white square, then if I press back or clsoe or anything, firefox dumps.
So I went back to just the gecko option, and I'm back to the pretty lined box with progress bar (but no play, pause, stop, etc buttons) and that can download a movie, play the sound but not the video, and allows me to save the downloaded file.
I'm really bollixed here -- this system has GTK1 and GTK2 on it, I have apps compiled for both, though GTK1 is the "native" version that gnome uses and so forth (redhat 9, remember.)
mplayer will play the downloaded video just fine from the command line, so it seems to be entirely a plug-in issue.
More: whatoptions.sh suggests gtk1.
With gtk1, though, I just get the crash (I think there is a little bit of art visible around the white square -- no controls, no movie, no audio, but it looks like the right and bottom edges of the art that shows with the gtk2 compile. Exit or back, and boom.
When I use gecko and forced gtk2, that gave me the same results as gecko and no suggestion about gtk.
ldd shows linked with gtk2 if I build it that way, and with gtk1 if I build it the other way. Nothing shows as unresolved.
Firefox shows gtk2 (two) with ldd, which surprised me, but there you have it.
I've put the .xpt file in both the plugins dir and the
There is an mplayerplugin.conf file in the source directory, but I've not located any directions as to what to do with this -- where to put it, what settings one might want to change.
Sadly, since I did that apt-get to grab the mozilla-devel, which got the useless 1.4 devel package, mozilla no longer starts, firefox starts instead, so I can't test there.
Ok, so if you are using a current version of firefox 1.0 or greater. They all seem to be compiled with GTK2. So couple of things.
1. Make sure you have the RPM gtk2-devel installed.
2. try these steps
a. make clean
b. ./configure --enable-gtk2 --with-gecko-sdk=[path to gecko sdk]
d. make install (this will install it in your User HOME in .mozilla/plugins. Make sure mplayerplug-in.xpt and .so are not anywhere else in the system.
3. Check config.h and make sure GTK2_ENABLED is 1 (near the bottom of the file)
This should get you a working mplayerplug-in. Since the version of GTK is tied to the browser and not to the desktop. Also if your mozilla is GTK1 and your Firefox is GTK2 the plugin will have issues with the browser that does not have the same toolkit.
You also might try the RPM from DAG's RPM repository.
I do have the latest gtk2-devel, according to apt-get. I delete the .so and the .xpt from /root/.mozilla/plugins and where I've been keeping FF, which resolves to:
./configure --enable-gtk2 --with-gecko-sdk=/usr/src/gecko-sdk
(GTK2_ENABLED is 1 at this point)
everything seems to go fine. The results are in...
...and nowhere else.
I've just deleted the .dat that registers plugins, and will save this message and then restart the browser and test. BRB.
Ok. Sigh. Same exact results. I get a blue, lined backdrop with no controls. Some stuff downloads, the bar moves, then the bar stops, the audio begins, and there we sit, no video, no buttons.
On my fedora core 3 system, I get video, and some nice UI widgets - play, stop, etc. So I know what I'm looking for, more or less.
So... faced with more of the same, I removed the .xpt and the .so, and grabbed the RPM you linked to. Was a little bamboozled because the RPM put the .xpt and .so in /usr/lib/mozilla/ instead of in the home dir (/root/.mozilla) but I found them and moved them there so firefox could find them. Until I did that, I had a "click here to download plugin" puzzle piece in the video window, which means there is nothing for it (which means I got it out ok, I guess, so maybe that's a good thing.)
So, now I get a video window, and... same. exact. results.
Assuming that the binary from the RPM is good, then it looks like something in my system isn't.
Now, firefox is pretty much carrying gtk2 internally, isn't it? I mean, it doesn't need those libs, because it runs on an unmodified RH9 system without gtk2, which came after RH9 was put together. So it must have a way to get its libs without RH9 providing them.
mplayer plugin, though, has to be referring to the gtk2 libs that are <i>on</i> the machine. Am I right in these assumptions? That's all I can think of at this point, and I'm afraid I'm feeling more than a little stupid. :-(
In mplayers config make sure you that you don't have gui=yes and you may want to try vo=x11
the gtk2 libs for my RH9 system are:
Tonight, I tried - hard - to get a later gtk installed, but the dependancy thing is a total, utter mess. apt-get claims the "latest version"s are already installed (obviously gtk-2.0 isn't as recent as gtk-2.2!!!) and won't do anything further; compiling from source fails left right and sideways. Installing binary RPM's blows up in a myriad of failed dependancies. gtk requires pango and libtiff, pango requires some type package and gtk, libtiff requires gtk... Sheesh.
Sometimes I just want to strangle the people who set these tail-eating RPM situations up. Bleagh.
So let me ask you this: What version of gtk is required? Is 2.0 too early for some reason? Maybe this is my problem.
I can't upgrade this RH9 system to fedora, because this is a stable, production system which works in a bunch of places where fedora falls flat on its bleeding edge-face. This is the first thing that's really stymied me other than the new GIMP, which is also a total mess to try to install, and which I never succeeded at. Probably also for gtk2 reasons.
If you do require a later gtk, may I ask why? Is there something in there you really need to put up a few buttons? Is there actually some reason this can't be done in gtk1, for that matter? Remember, if I try to use GTK1, the thing blows up when I try to look at a video (because FF uses GTK2?)
I think I'm about to tear my hair out and set it on fire. :/
Another thing you may want to just try to see if it is the GTK version. is this
./configure --enable-x --with-gecko-sdk=[blah]
Those commands will run the plugin in X mode. No buttons and limited GUI, but should tell you if GTK is the problem. I don't believe GTK is the issue, but it has been a long time since I have used RH9. I do all my work on Fedora Core 3.
Yes, the reason mplayerplug-in in GTK1 mode blows up in Firefox is because of Firefox; being built on GTK2. The plugin is supposed to detect this and not do anything, but I have not checked that code in a long time since almost everyone is on GTK2 now.
Oh.. you don't really need to be running as root to get mplayerplug-in installed. The install for mplayerplug-in is a little different than most programs in that make install defaults to the users home. So you don't need to install it as root. If you want to install it system wide you do a "sudo make sysinstall" or "make sysinstall" as root.
mplayerplug-in.conf can go into $HOME/.mplayer $HOME/.mozilla or /etc This is documented on the configuration page.
When you type mplayer does it come up with a GUI by default? If so this is a problem. mplayer should run the command line version and gmplayer should run the GUI if it was installed that way.
gui=yes is NOT present in the mplayer config
vo=x11 wasn't present, but I put it in and it made no difference.
mplayer does not come up with a gui. gmplayer does.
I then tried --enable-x
This produces video and audio, but as you described, no buttons. So if I understand you right, it looks like GTK is the issue.