bugGnash - The GNU Flash player - Bugs: bug #18154, no sound in firefox plugin

 
 

bug #18154: no sound in firefox plugin

Submitter:  Deanna Phillips <deanna>
Submitted:  Mon 30 Oct 2006 01:37:16 PM UTC
   
 
Category:  sound Severity:  5 - Blocker
Release:  None Status:  Fixed
Privacy:  Public Assigned to:  strk
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 09 Nov 2006 07:07:28 PM UTC, comment #22: 

ok, found and fixed last bug, should now be fine (pluginSound on by default, settable to false in rcfile)

Sandro Santilli <strk>
Group Member
Thu 09 Nov 2006 06:49:31 PM UTC, comment #21: 

ok, now we also have soundPlugin off by default.
The problem seems to force it to OFF in the config file (I'm having troubles with that).

Any test is appreciated (current code doesn't build, btw)

I'm assuming you can tell status of sound (enable/disable)
by looking at the menu (disabled sound should mean no toggle-sound menu item)

Sandro Santilli <strk>
Group Member
Thu 09 Nov 2006 04:19:16 PM UTC, comment #20: 

Ok, I'm now a bit happier with rcfile (not completely yet though).
The default is still NO pluginsound, anyway now you can override
the rcfile setting with command-line switch (ie: can have sound default to off and explicitly enable it with command-line).

What would really close this bug IMHO would be having
the GTK menu item be "gray" (ie: unselectable) when sound_handler
was not created. This would make it clear that sound is not
available.

BTW, it would also help to have a menu item show complete version (of the standalone player, not of the plugin, which can be extracted with about:plugins)

Sandro Santilli <strk>
Group Member
Thu 09 Nov 2006 03:38:30 PM UTC, comment #19: 

I committed a patch to make rcfile case-insensitive, so
you can also use 'pluginSound = On'.

About my suggestested solution below, it was all wrong.
The plugin DOES run always in -r3 mode, and it is the
Player.cpp itself that also checks for rcfile...

Player::init_sound()
{
    if (do_sound) {
        if (windowid) {
            do_sound = rcfile.usePluginSound();
        }
        else {
            do_sound = rcfile.useSound();
        }
    }
}

I don't think this is correct... if I do specify -r2 or -r3 I DO want sound, no matter what the rcfile says.

So, the plugin should be changed to completely remove the -r# specification, and control of it's run should be driven by rcfile, not from initSound, but from gnash.cpp

I'll give it a try.

Sandro Santilli <strk>
Group Member
Thu 09 Nov 2006 01:26:31 PM UTC, comment #18: 

Hi, good news.

Thanks, adding "set pluginsound on" solved the problem. I can hear the sound in plugin mode. :-)

Douglas A. Augusto <daaugusto>
Thu 09 Nov 2006 12:19:49 PM UTC, comment #17: 

Ok with me, others ?

Sandro Santilli <strk>
Group Member
Thu 09 Nov 2006 11:54:55 AM UTC, comment #16: 

For a quick fix for the release branch I think we should just set plugin sound to be enabled by default. In cvs-head we should find a better solution, and strk's suggetion seems like the way to go for now.

Tomas Groth <tgc>
Thu 09 Nov 2006 11:33:05 AM UTC, comment #15: 

Brief report: the 'sound' menu is only shows then there's a sound_handler, but the Player class does not create a sound_handler unless invoked with -r2 or -r3.

So I'd say that the bug is in the plugin that should always
run in -r3 mode AND we should add some other way to set
initial state of sound to mute/unmute at creation time, probably
in Player class.

So, the Player class should parse the rcinit file and act
accordingly. If the Player class was given a window-id we
may presume we've been called by the plugin (to distinguish
between soundPlugin and sound rcinit statemtns).

Does it sound an acceptable path ?

Sandro Santilli <strk>
Group Member
Thu 09 Nov 2006 08:35:08 AM UTC, comment #14: 

Rob, we should install a system-wide gnashrc file from 'make install' rule. That would help people to use a template for their own copy. Currently the only copy is under testsuite/ and it's not complete (manual page has it more complete).

Douglas, try to rename your 'gnash' executable to something else
and see if it still works (I can't understand why menu items
should be different from standalone or plugin - which invokes
the standalone anyway)

Sandro Santilli <strk>
Group Member
Thu 09 Nov 2006 04:35:33 AM UTC, comment #13: 

In rc.cpp, the constructor currently sets the plugin sound to be off be default if there is no value in the ~/.gnashrc file. This behaviour was based on comments on the gnash-dev list that people didn't want to have sound with ads while browsing, and that the Toggle sound option would let it be turned on.

Maybe this assumption is incorrect, but if it is, it's an easy fix. :-) or we just have to document that to change the behaviour, one has to add the right setting to ~/.gnashrc.

Rob Savoye <rsavoye>
Group administrator
Thu 09 Nov 2006 04:28:22 AM UTC, comment #12: 

In my case, the following line in ~/.gnashrc is needed to play sound in firefox plugin.

 set pluginsound on

This is case sensitive. At first, I wrote "pluginSound" in ~/.gnashrc
 so that I could't hear any sound. :-)

Hiroyuki Ikezoe <ikezoe>
Wed 08 Nov 2006 10:42:41 PM UTC, comment #11: 


> "That makes me think that the plugin is startin an older gnash executable, do you have any around ?"


No, I don't:

$ whereis gnash
gnash: /usr/local/bin/gnash

$ stat /usr/local/bin/gnash
  File: `/usr/local/bin/gnash'
  Size: 136619          Blocks: 280        IO Block: 4096   regular file
Device: 803h/2051d      Inode: 2753867     Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (   50/   staff)
Access: 2006-11-08 19:54:15.000000000 -0200
Modify: 2006-11-08 18:35:59.000000000 -0200
Change: 2006-11-08 18:52:41.000000000 -0200

> "Also, try setting GNASH_PLAYER environment variable before

starting firefox (from an xterm for instance - be aware that
if another firefox is running it won't use that environment)"

Thanks, I tried but that does not help:

$ ps aux|grep firefox
douglas   5898  0.0  0.0   4140   664 pts/28   S+   19:59   0:00 grep firefox

$ export GNASH_PLAYER="/usr/local/bin/gnash"

$ echo $GNASH_PLAYER
/usr/local/bin/gnash

$ /usr/bin/firefox

... the same behaviour. :(

I also discovered that almost all menu items don't work in plug-in mode. For instance, nothing happens when I press "Stop Movie". Only "Quit Gnash" seems to work.

Douglas A. Augusto <daaugusto>
Wed 08 Nov 2006 09:18:48 PM UTC, comment #10: 

That makes me think that the plugin is startin an older gnash executable, do you have any around ?

Also, try setting GNASH_PLAYER environment variable before
starting firefox (from an xterm for instance - be aware that
if another firefox is running it won't use that environment)

About gnashrc I confirm a default one is not installed
by 'make install' this calls for another bug item.
The only I could find is under testsuite (gnashrc.in)
but it seems incomplete, the most complete example of
it should be the one in the online gnash manual.

Sandro Santilli <strk>
Group Member
Wed 08 Nov 2006 09:10:44 PM UTC, comment #9: 


> "does the 'toggle sound' right-click menu item change anything ?"


Very strange! "Toggle sound" menu item does not appear in plugin mode (only in standalone player). See:

 http://img295.imageshack.us/img295/3821/gnashnosoundmi0.png

> "(the rcfile has two separate entries for plugin and standalone sound)"


Where is rcfile (gnashrc?)?

$ strace gnash elvis.swf

[...]

stat("/etc/gnashrc", 0x7fffb0b0e990)    = -1 ENOENT (No such file or directory)
stat("/usr/local/etc/gnashrc", 0x7fffb0b0e990) = -1 ENOENT (No such file or directory)
stat("/home/douglas/.gnashrc", 0x7fffb0b0e990) = -1 ENOENT (No such file or directory)

[...]

Douglas A. Augusto <daaugusto>
Wed 08 Nov 2006 08:10:15 PM UTC, comment #8: 

does the 'toggle sound' right-click menu item change anything ?
(the rcfile has two separate entries for plugin and standalone sound)

Sandro Santilli <strk>
Group Member
Wed 08 Nov 2006 04:25:54 PM UTC, comment #7: 

I have the same problem here (Gnash cvs-20061108). Confirmed with elvis.swf and others. This doesn't happens in the standalone player.

Configure:

./autogen.sh && ./configure --enable-sound=SDL --enable-mp3 --enable-ogg --with-mp3-decoder=ffmpeg --enable-plugin --with-plugindir=/usr/lib/mozilla/plugins/ && make && make install

$ ps aux|grep gnash    # (plugin in action, no sound!)

/usr/local/bin/gnash -r 3 -v -x 25349636 -j 1096 -k 690 -u http://cvs.savannah.gnu.org/viewcvs/*checkout*/gnash/testsuite/movies.all/elvis.swf?root=gnash -U http://cvs.savannah.gnu.org/viewcvs/*checkout*/gnash/testsuite/movies.all/elvis.swf?root=gnash -P height=100% -P name=plugin -P src=http://cvs.savannah.gnu.org/viewcvs/*checkout*/gnash/testsuite/movies.all/elvis.swf?root=gnash -P type=application/x-shockwave-flash -P width=100% -

This works (standalone):

cat elvis.swf | /usr/local/bin/gnash -r 3 -v -j 1096 -k 690 -u http://cvs.savannah.gnu.org/viewcvs/*checkout*/gnash/testsuite/movies.all/elvis.swf?root=gnash -U http://cvs.savannah.gnu.org/viewcvs/*checkout*/gnash/testsuite/movies.all/elvis.swf?root=gnash -P height=100% -P name=plugin -P src=http://cvs.savannah.gnu.org/viewcvs/*checkout*/gnash/testsuite/movies.all/elvis.swf?root=gnash -P type=application/x-shockwave-flash -P width=100% -

My box:

Debian GNU/Linux (testing)
AMD64
gcc (GCC) 4.1.2 20061028 (prerelease) (Debian 4.1.1-19)
Firefox 1.5.0.7

Douglas A. Augusto <daaugusto>
Sat 04 Nov 2006 08:55:28 PM UTC, comment #6: 

This happens with any movie I try, including elvis.swf

Note that I never had a segfault, just a complete lack of sound.

Deanna Phillips <deanna>
Wed 01 Nov 2006 01:08:07 PM UTC, comment #5: 

It seems this bug items lacks a reference to the movie in question...
I forgot about what I was using too..

Sandro Santilli <strk>
Group Member
Mon 30 Oct 2006 03:20:50 PM UTC, comment #4: 

16:18:04: ERROR: Error while decoding MP3-stream, MAD error: 259
16:18:04: ERROR: Error while decoding MP3-stream, MAD error: 259

Program received signal SIGSEGV, Segmentation fault.
mmm.. I can reproduce a segfault running the standalone with -r3 (no segfault with -r1 or -r2)

[Switching to Thread 1103362992 (LWP 32096)]
0x00000814 in ?? ()
(gdb) bt
#0  0x00000814 in ?? ()
#1  0x40123365 in gnash::stream::get_position (this=0xc7c8ffff)
    at tu_file.h:128
#2  0x401b4297 in gnash::movie_def_impl::read_all_swf (this=0x80d2a38)
    at /home/strk/src/gnash/gnash-0.7.2-branch/server/parser/movie_def_impl.cpp:863
#3  0x401ad473 in gnash::MovieLoader::execute (arg=0xc7c8ffff)
    at /home/strk/src/gnash/gnash-0.7.2-branch/server/parser/movie_def_impl.cpp:106
#4  0x40989b63 in start_thread () from /lib/tls/libpthread.so.0
#5  0x4105218a in clone () from /lib/tls/libc.so.6
(gdb)

Sandro Santilli <strk>
Group Member
Mon 30 Oct 2006 02:46:23 PM UTC, comment #3: 

I only have one gnash executable.  Yes I made install, all the libs, the gnash bin and the plugin have timestamps of about 1 minute apart.

Deanna Phillips <deanna>
Mon 30 Oct 2006 02:38:06 PM UTC, comment #2: 

oh, a quick look at the code revealed me that you can set
the GNASH_PLAYER environment variable to specify which executable
to call...

Sandro Santilli <strk>
Group Member
Mon 30 Oct 2006 02:36:51 PM UTC, comment #1: 

Did you run 'make install' ?
(a common mistake is forgetting that the plugin simply runs 'gnash' as a system call, thus using what's currently installed)

Sandro Santilli <strk>
Group Member
Mon 30 Oct 2006 01:37:16 PM UTC, original submission:  

Sound works fine in the standalone player, but not in the firefox plugin.  This is gtk+agg, SDL+ffmpeg, built from the release branch last night.

from config.log

  $ ./configure --with-plugindir=/usr/local/mozilla-firefox/plugins --enable-sound=SDL --enable-plugin --enable-renderer=agg
--enable-shared --enable-gui=gtk --with-mp3-decoder=ffmpeg --prefix=/usr/local --sysconfdir=/etc --mandir=/usr/local/man --in
fodir=/usr/local/info


Deanna Phillips <deanna>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 9 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-11-09 strk StatusReady For Test Fixed
    Open/ClosedOpen Closed
2006-11-09 strk StatusIn Progress Ready For Test
2006-11-09 strk StatusConfirmed In Progress
    Assigned toNone strk
2006-11-09 tgc Severity3 - Normal 5 - Blocker
    StatusNeed Info Confirmed
2006-11-02 strk StatusNone Need Info
2006-11-01 strk CategoryNone sound

Back to the top

Powered by Savane 3.15-e6e5.
Corresponding source code