Thanks for this clear information! I just posted something on this topic in Bugzilla. And as you said, according to
http://www.mail-archive.com/pulseaudio- ... 04017.html, libpulse makes no longer use of Xlib in the relevant parts since the latest version, 0.9.22. Ubuntu 10.10 has already 0.9.22 in its repositories. So, another solution could be to compile the mozilla-plugin with ALSA disabled, but PulseAudio enabled. Unfortunately I run into trouble when trying to do so. Here is what I did:
1.) On my test-system, I already have vlc and mozilla-plugin-vlc installed.
2.) I downloaded the VLC source-code and prepared needed packages with build-dep vlc
3.) ./configure --enable-mozilla --enable-pulse --disable-alsa
4.) make, make install
5.) The newly created file in /usr/local/lib/mozilla/plugins/libvlcplugin.so moved to /usr/lib/mozilla/plugins/libvlcplugin.so where I overwrite the existing so-file (from the repositorie's mozilla-plugin-vlc package).
6.) Restarted firefox with some simple test-page:
Code: Select all
<html><head></head><body>
<embed id="vlc" type="application/x-vlc-plugin" width="1024px" height="768px" target="TestFilm.mpg">
<div onclick="document.getElementById('vlc').playlist.togglePause()">Pause</div>
</body></html>
However, when I click on pause and then again to resume, video playback restarts without audio, just as before. Further, when calling
Code: Select all
pkill pulseaudio; sleep 2; pulseaudio -vv
to retrieve lots of internal information, I can see that still ALSA is used instead of PulseAudio.
The alternative ./configure --enable-mozilla --enable-pulse --disable-alsa --disable-sdl --disable-oss [...and all others]
makes also no difference. What am I doing wrong? Am I setting up the plugin in a wrong way, or is the --enable-mozilla flag already forcing ALSA output?
Here is the output I get:
Code: Select all
########## lots of initial information, then opened page with autoplay:
I: sink-input.c: Created input 0 "ALSA Playback" on alsa_output.pci-0000_00_08.0.analog-stereo with sample spec float32le 2ch 48000Hz and channel map front-left,front-right
I: sink-input.c: media.name = "ALSA Playback"
I: sink-input.c: application.name = "ALSA plug-in [firefox-bin]"
I: sink-input.c: native-protocol.peer = "UNIX socket client"
I: sink-input.c: native-protocol.version = "16"
I: sink-input.c: application.process.id = "1679"
I: sink-input.c: application.process.user = "******"
I: sink-input.c: application.process.host = "******"
I: sink-input.c: application.process.binary = "firefox-bin"
I: sink-input.c: window.x11.display = ":0.0"
I: sink-input.c: application.language = "de_DE.UTF-8"
I: sink-input.c: application.process.machine_id = "************************************************"
I: sink-input.c: application.process.session_id = "************************************************"
I: sink-input.c: module-stream-restore.id = "sink-input-by-application-name:ALSA plug-in [firefox-bin]"
I: protocol-native.c: Requested tlength=5461,33 ms, minreq=21,33 ms
D: protocol-native.c: Early requests mode enabled, configuring sink latency to minreq.
D: alsa-sink.c: Cutting sleep time for the initial iterations by half.
D: alsa-sink.c: Cutting sleep time for the initial iterations by half.
D: memblockq.c: memblockq requested: maxlength=4194304, tlength=2097152, base=8, prebuf=2088960, minreq=8192 maxrewind=0
D: memblockq.c: memblockq sanitized: maxlength=4194304, tlength=2097152, base=8, prebuf=2088960, minreq=8192 maxrewind=0
I: protocol-native.c: Final latency 5482,67 ms = 5418,67 ms + 2*21,33 ms + 21,33 ms
D: alsa-sink.c: Cutting sleep time for the initial iterations by half.
D: alsa-sink.c: Latency set to 21,33ms
D: alsa-sink.c: hwbuf_unused=349008
D: alsa-sink.c: setting avail_min=87694
D: alsa-sink.c: Requesting rewind due to latency change.
D: alsa-sink.c: Requested to rewind 352768 bytes.
D: alsa-sink.c: Limited to 352128 bytes.
D: alsa-sink.c: before: 88032
D: alsa-sink.c: after: 88032
D: alsa-sink.c: Rewound 352128 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 352128 bytes on render memblockq.
D: source.c: Processing rewind...
D: core-subscribe.c: Dropped redundant event due to change event.
D: reserve-wrap.c: Device lock status of reserve-monitor-wrapper@Audio0 changed: not busy
D: protocol-native.c: Requesting rewind due to end of underrun.
D: alsa-sink.c: Requested to rewind 352768 bytes.
D: alsa-sink.c: Limited to 2668 bytes.
D: alsa-sink.c: before: 667
D: alsa-sink.c: after: 667
D: alsa-sink.c: Rewound 2668 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 2668 bytes on render memblockq.
D: source.c: Processing rewind...
D: alsa-sink.c: Wakeup from ALSA!
########## Now playback runs. When I press pause:
D: protocol-native.c: Underrun on 'ALSA Playback', 0 bytes in queue.
########## No I press resume, but nothing happens, so I close the window:
D: sink-input.c: Requesting rewind due to corking
D: module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_08.0.analog-stereo becomes idle, timeout in 5 seconds.
D: alsa-sink.c: hwbuf_unused=0
D: alsa-sink.c: setting avail_min=87693
D: alsa-sink.c: Requested to rewind 352768 bytes.
D: alsa-sink.c: Limited to 2716 bytes.
D: alsa-sink.c: before: 679
D: alsa-sink.c: after: 679
D: alsa-sink.c: Rewound 2716 bytes.
D: sink.c: Processing rewind...
D: source.c: Processing rewind...
D: module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_08.0.analog-stereo becomes idle, timeout in 5 seconds.
D: core.c: Hmm, no streams around, trying to vacuum.
I: sink-input.c: Freeing input 0 "ALSA Playback"
I: client.c: Freed 3 "ALSA plug-in [firefox-bin]"
I: protocol-native.c: Connection died.
I: module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_08.0.analog-stereo idle for too long, suspending ...
D: sink.c: Suspend cause of sink alsa_output.pci-0000_00_08.0.analog-stereo is 0x0004, suspending
I: alsa-sink.c: Device suspended...
D: reserve-wrap.c: Device lock status of reserve-monitor-wrapper@Audio0 changed: not busy
D: module-udev-detect.c: /dev/snd/controlC0 is accessible: yes
So, as a single question: How can I compile and install the mozilla-plugin with PulseAudio output forced?