You are not logged in.

#1 2010-01-23 23:31:57

egan
Member
From: Mountain View, CA
Registered: 2009-08-17
Posts: 273

Adobe Flash --- How does it work? [SOLVED]

In the spirit of Arch, I would like to educate myself in how the flash plugin works...

I see that the flashplugin package installs a shared object library in /usr/lib/mozilla/plugins. So when Firefox finds a flash element on a web page it calls this library to render it.

I know it takes a hold of /dev/dsp, indeed this is why I want to learn more; I am tired of restarting Firefox to free it and allow mplayer to play.

So my main question is:
What happens to the flashplugin when you are no longer viewing pages with flash elements?

And the functional question is:
If flashplugin is still loaded even when you aren't viewing pages with flash elements, how can you kill it, or at least get it to free its hold of /dev/dsp?

Thanks for any knowledge shared.

Last edited by egan (2010-01-24 16:30:39)

Offline

#2 2010-01-24 00:10:42

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Adobe Flash --- How does it work? [SOLVED]

Flash uses ALSA, it does not in get a hold of /dev/dsp. Your problem is elsewhere. Which audio output do you use with mplayer? Perhaps you have "ao=oss" in one of mplayer's config files, in which case you should remove it.

Offline

#3 2010-01-24 00:18:13

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: Adobe Flash --- How does it work? [SOLVED]

Gusar wrote:

Flash uses ALSA, it does not in get a hold of /dev/dsp. Your problem is elsewhere. Which audio output do you use with mplayer? Perhaps you have "ao=oss" in one of mplayer's config files, in which case you should remove it.

Actually, Flash uses the ALSA OSS emulation, which causes it to tie up the sound system so only Firefox can play sound. To force it to use real ALSA, blacklist snd-pcm-oss in rc.conf (or, if you use a custom kernel, simply deselect it in the config). But before you reboot, I suggest using `rmmod snd_pcm_oss` to see if this changes anything.

Reference: wiki

Last edited by Peasantoid (2010-01-24 00:20:51)

Offline

#4 2010-01-24 00:43:21

egan
Member
From: Mountain View, CA
Registered: 2009-08-17
Posts: 273

Re: Adobe Flash --- How does it work? [SOLVED]

I see. Is there anyway to get it to let go of the /dev/dsp rather than disallowing it to access it?
Mplayer defaults to oss, and when it uses alsa, it seems that the playback quality is diminished (and it is quieter).

Offline

#5 2010-01-24 00:45:08

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: Adobe Flash --- How does it work? [SOLVED]

egan wrote:

Is there anyway to get it to let go of the /dev/dsp rather than disallowing it to access it?

I don't know of one. Sorry, this is where my brain hits EOF.

Offline

#6 2010-01-24 04:02:21

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Adobe Flash --- How does it work? [SOLVED]

Peasantoid wrote:

Flash uses the...

Er, flash uses ALSA. Here's the proof, with firefox playing youtube via flash, simultaneously with audacious playing music:

$ fuser -v /dev/snd/* /dev/dsp*
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  brebs      5396 F.... firefox-bin
                     brebs      5505 F.... audacious
/dev/snd/pcmC0D0p:   brebs      5396 F...m firefox-bin
                     brebs      5505 F...m audacious
/dev/snd/timer:      brebs      5396 f.... firefox-bin
                     brebs      5505 f.... audacious

This is with flash 10.0.42.34 on 32-bit. So the Arch wiki is wrong, or at least incomplete.

Can people please *run* that fuser command, to reduce the amount of incorrect guessing going on.

I suggest you check that libflashsupport has been removed.

Offline

#7 2010-01-24 06:24:44

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: Adobe Flash --- How does it work? [SOLVED]

... Huh. I stand corrected. I suppose someone should go fix that, then.

*edges away*

Offline

#8 2010-01-24 10:52:04

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Adobe Flash --- How does it work? [SOLVED]

Peasantoid wrote:

Actually, Flash uses the ALSA OSS emulation

No, flash uses ALSA proper. It has since version 9. I have no problem with flash in Firefox playing a youtube video and at the same time having mplayer play a video.

@egan: Simple solution: Put ao=alsa in ~/.mplayer/config
But I find it weird that this would degrade audio quality, it's the same driver used either way.

Last edited by Gusar (2010-01-24 11:10:50)

Offline

#9 2010-01-24 12:41:53

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Adobe Flash --- How does it work? [SOLVED]

Gusar wrote:
Peasantoid wrote:

Actually, Flash uses the ALSA OSS emulation

@egan: Simple solution: Put ao=alsa in ~/.mplayer/config
But I find it weird that this would degrade audio quality, it's the same driver used either way.

Only relevant thing I can think of is the sample rate. (as mentioned here)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#10 2010-01-24 16:30:21

egan
Member
From: Mountain View, CA
Registered: 2009-08-17
Posts: 273

Re: Adobe Flash --- How does it work? [SOLVED]

Okay thanks for the information guys. I will do some tests with mplayer audio output. But the underlying problem that flash won't let go of /dev/dsp is still there? I guess I am too OCD.

Offline

#11 2010-05-08 06:42:29

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Adobe Flash --- How does it work? [SOLVED]

Finally, some decent detective work - flash is apparently buggy, and might use OSS even when ALSA is available!

Offline

Board footer

Powered by FluxBB