[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog gui/Player.cpp gui/Player.h
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog gui/Player.cpp gui/Player.h |
Date: |
Mon, 02 Oct 2006 13:23:11 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/10/02 13:23:11
Modified files:
. : ChangeLog
gui : Player.cpp Player.h
Log message:
* gui/Player.cpp, gui/Player.h: make sure the sound_handler
is not destroyed before use, initialize sound handling and
gui when run() is invoked, not a construction time.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.987&r2=1.988
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.cpp?cvsroot=gnash&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.h?cvsroot=gnash&r1=1.4&r2=1.5
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.987
retrieving revision 1.988
diff -u -b -r1.987 -r1.988
--- ChangeLog 2 Oct 2006 13:16:21 -0000 1.987
+++ ChangeLog 2 Oct 2006 13:23:10 -0000 1.988
@@ -1,3 +1,9 @@
+2006-10-02 Sandro Santilli <address@hidden>
+
+ * gui/Player.cpp, gui/Player.h: make sure the sound_handler
+ is not destroyed before use, initialize sound handling and
+ gui when run() is invoked, not a construction time.
+
2006-10-02 Bastiaan Jacques <address@hidden>
* plugin/plugin{.cpp, .h}: Pipe the SWF file to Gnash's standard
Index: gui/Player.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- gui/Player.cpp 2 Oct 2006 11:00:07 -0000 1.12
+++ gui/Player.cpp 2 Oct 2006 13:23:10 -0000 1.13
@@ -140,9 +140,6 @@
gnash::register_fscommand_callback(fs_callback);
- init_logfile();
- init_sound();
- init_gui();
}
void
@@ -186,19 +183,18 @@
void
Player::init_sound()
{
- std::auto_ptr<gnash::sound_handler> sound;
-
- if (do_sound) {
+ if (do_sound)
+ {
#ifdef SOUND_SDL
- sound = std::auto_ptr<gnash::sound_handler>
- (gnash::create_sound_handler_sdl());
- gnash::set_sound_handler(sound.get());
-#endif
-#ifdef SOUND_GST
- sound = std::auto_ptr<gnash::sound_handler>
- (gnash::create_sound_handler_gst());
- gnash::set_sound_handler(sound.get());
+ _sound_handler.reset( gnash::create_sound_handler_sdl() );
+#elif defined(SOUND_GST)
+ _sound_handler.reset( gnash::create_sound_handler_gst() );
+#else
+ log_error("Sound requested but no sound support compiled in");
+ return;
#endif
+
+ gnash::set_sound_handler(_sound_handler.get());
}
}
@@ -261,6 +257,13 @@
assert(tu_types_validate());
+ // Call this at run() time, so the caller has
+ // a cache of setting some parameter before calling us...
+ // (example: setDoSound(), setWindowId() etc.. )
+ init_logfile();
+ init_sound();
+ init_gui();
+
// No file name was supplied
assert (infile);
_infile = infile;
Index: gui/Player.h
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- gui/Player.h 2 Oct 2006 10:27:38 -0000 1.4
+++ gui/Player.h 2 Oct 2006 13:23:11 -0000 1.5
@@ -177,6 +177,8 @@
std::auto_ptr<Gui> _gui;
+ std::auto_ptr<sound_handler> _sound_handler;
+
std::string _url;
std::string _infile;