[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash libbase/rc.cpp libbase/rc.h configure.ac ...
From: |
Rob Savoye |
Subject: |
[Gnash-commit] gnash libbase/rc.cpp libbase/rc.h configure.ac ... |
Date: |
Mon, 16 Oct 2006 16:14:08 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Rob Savoye <rsavoye> 06/10/16 16:14:07
Modified files:
libbase : rc.cpp rc.h
. : configure.ac ChangeLog
gui : Player.cpp gtk.cpp gtksup.h
Log message:
* gui/gtksup.h: Add prototype for menuitem_sound_callback.
* gui/gtk.cpp: Add menuitem_sound_callback, and a "Toggle Sound"
menu item.
* gui/Player.cpp: Enable sound by default, but also check the
$HOME/.gnashrc file.
* libbase/rc.cpp, rc.h: Add support for "sound" and
"pluginsound"
config settings.
* configure.ac: Enable the SDL-ffmpeg sound system by default.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/rc.cpp?cvsroot=gnash&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/rc.h?cvsroot=gnash&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.160&r2=1.161
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1242&r2=1.1243
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.cpp?cvsroot=gnash&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtk.cpp?cvsroot=gnash&r1=1.34&r2=1.35
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtksup.h?cvsroot=gnash&r1=1.22&r2=1.23
Patches:
Index: libbase/rc.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/rc.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- libbase/rc.cpp 29 Aug 2006 22:44:37 -0000 1.10
+++ libbase/rc.cpp 16 Oct 2006 16:14:07 -0000 1.11
@@ -67,7 +67,9 @@
_parserdump(false),
_splash_screen(true),
_localdomain_only(false),
- _localhost_only(false)
+ _localhost_only(false),
+ _sound(true),
+ _plugin_sound(false)
{
// GNASH_REPORT_FUNCTION;
// loadFiles();
@@ -183,6 +185,8 @@
extractSetting(&_actiondump, "actionDump", variable, value);
extractSetting(&_parserdump, "parserDump", variable, value);
extractSetting(&_writelog, "writelog", variable, value);
+ extractSetting(&_sound, "sound", variable, value);
+ extractSetting(&_plugin_sound, "pluginsound", variable, value);
extractNumber(&_delay, "delay", variable, value);
extractNumber(&_verbosity, "verbosity", variable, value);
@@ -301,6 +305,10 @@
<< ((_localhost_only)?"enabled":"disabled") << endl;
cerr << "\tWrite Debug Log To Disk: "
<< ((_writelog)?"enabled":"disabled") << endl;
+ cerr << "\tEnable sound: "
+ << ((_sound)?"enabled":"disabled") << endl;
+ cerr << "\tEnable Pl,ugin sound: "
+ << ((_plugin_sound)?"enabled":"disabled") << endl;
if (_log.size()) {
cerr << "\tDebug Log name is: " << _log << endl;
}
Index: libbase/rc.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/rc.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- libbase/rc.h 14 Sep 2006 23:54:22 -0000 1.6
+++ libbase/rc.h 16 Oct 2006 16:14:07 -0000 1.7
@@ -83,6 +83,12 @@
bool useDebugger() { return _debugger; };
void useDebugger(bool value) { _debugger = value; }
+ bool useSound() { return _sound; };
+ void useSound(bool value) { _sound = value; }
+
+ bool usePluginSound() { return _plugin_sound; };
+ void usePluginSound(bool value) { _plugin_sound = value; }
+
bool useLocalDomain() { return _localdomain_only; };
void useLocalDomain(bool value);
@@ -98,6 +104,9 @@
std::vector<std::string> getWhiteList() { return _whitelist; };
std::vector<std::string> getBlackList() { return _blacklist; };
+ int getRetries() { return _retries; };
+ void setRetries(int x) { _retries = x; };
+
void dump();
private:
@@ -120,6 +129,9 @@
std::string _log; // the name of the debug log
bool _writelog; // enable writing the debug log to disk
std::string _wwwroot; // the root path for the streaming server
+ int _retries; // the number of retries for a thread
+ bool _sound; // whether sound is enable or not
+ bool _plugin_sound; // whether sound is desired for the
plugin
};
extern DSOEXPORT RcInitFile rcfile;
@@ -129,3 +141,9 @@
// __RC_H__
#endif
+
+
+// local Variables:
+// mode: C++
+// indent-tabs-mode: t
+// End:
Index: configure.ac
===================================================================
RCS file: /sources/gnash/gnash/configure.ac,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -b -r1.160 -r1.161
--- configure.ac 16 Oct 2006 15:27:53 -0000 1.160
+++ configure.ac 16 Oct 2006 16:14:07 -0000 1.161
@@ -33,7 +33,7 @@
dnl also makes it possible to release a modified version which carries
dnl forward this exception.
-dnl $Id: configure.ac,v 1.160 2006/10/16 15:27:53 bjacques Exp $
+dnl $Id: configure.ac,v 1.161 2006/10/16 16:14:07 rsavoye Exp $
AC_PREREQ(2.50)
AC_INIT(gnash, 0.7.1-cvs)
@@ -231,9 +231,10 @@
[case "${enableval}" in
GST|gst) sound_handler=gst ;;
sdl|SDL) sound_handler=sdl ;;
- *) sound_handler=none ;;
+ no|NO) sound_handler=none ;;
+ *) sound_handler=SDL ;;
esac],
- [sound_handler=none]
+ [sound_handler=sdl]
)
case "${sound_handler}" in
gst) AC_DEFINE([SOUND_GST], [1], [Use GSTREAMER for sound]) ;;
@@ -257,7 +258,7 @@
no) mp3_decoder=none ;;
*) AC_MSG_ERROR([invalid mp3_decoder ${withval} given (accept:
ffmpeg|mad)]) ;;
esac],
- [mp3_decoder=none]
+ [mp3_decoder=ffmpeg]
)
if test x"$sound_handler" != xsdl -a x"$mp3_decoder" != xnone; then
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1242
retrieving revision 1.1243
diff -u -b -r1.1242 -r1.1243
--- ChangeLog 16 Oct 2006 15:37:27 -0000 1.1242
+++ ChangeLog 16 Oct 2006 16:14:07 -0000 1.1243
@@ -1,3 +1,14 @@
+2006-10-16 Rob Savoye <address@hidden>
+
+ * gui/gtksup.h: Add prototype for menuitem_sound_callback.
+ * gui/gtk.cpp: Add menuitem_sound_callback, and a "Toggle Sound"
+ menu item.
+ * gui/Player.cpp: Enable sound by default, but also check the
+ $HOME/.gnashrc file.
+ * libbase/rc.cpp, rc.h: Add support for "sound" and "pluginsound"
+ config settings.
+ * configure.ac: Enable the SDL-ffmpeg sound system by default.
+
2006-10-16 Udo Giacomozzi <address@hidden>
* gui/gui.h, gui/gui.cpp: Added want_redraw() function
Index: gui/Player.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- gui/Player.cpp 9 Oct 2006 16:05:24 -0000 1.18
+++ gui/Player.cpp 16 Oct 2006 16:14:07 -0000 1.19
@@ -123,7 +123,7 @@
windowid(0),
do_loop(true),
do_render(true),
- do_sound(false),
+ do_sound(true),
exit_timeout(0),
_movie_def(0)
{
@@ -188,8 +188,16 @@
void
Player::init_sound()
{
- if (do_sound)
- {
+ if (do_sound) {
+ if (windowid) {
+ do_sound = rcfile.usePluginSound();
+ }
+ else {
+ do_sound = rcfile.useSound();
+ }
+ }
+
+ if (do_sound) {
#ifdef SOUND_SDL
_sound_handler.reset( gnash::create_sound_handler_sdl() );
#elif defined(SOUND_GST)
Index: gui/gtk.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gtk.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- gui/gtk.cpp 16 Oct 2006 14:36:22 -0000 1.34
+++ gui/gtk.cpp 16 Oct 2006 16:14:07 -0000 1.35
@@ -328,6 +328,11 @@
GTK_MENU_ITEM(gtk_menu_item_new_with_label("Jump Backward 10 Frames"));
gtk_menu_append(_popup_menu, GTK_WIDGET(menuitem_jump_backward));
gtk_widget_show(GTK_WIDGET(menuitem_jump_backward));
+ GtkMenuItem *menuitem_sound =
+ GTK_MENU_ITEM(gtk_menu_item_new_with_label("Toggle Sound"));
+ gtk_menu_append(_popup_menu, GTK_WIDGET(menuitem_sound));
+ gtk_widget_show(GTK_WIDGET(menuitem_sound));
+
GtkMenuItem *menuitem_quit =
GTK_MENU_ITEM(gtk_menu_item_new_with_label("Quit Gnash"));
gtk_menu_append(_popup_menu, GTK_WIDGET(menuitem_quit));
@@ -350,6 +355,8 @@
G_CALLBACK(&menuitem_jump_backward_callback), this);
g_signal_connect(GTK_OBJECT(menuitem_quit), "activate",
G_CALLBACK(&menuitem_quit_callback), this);
+ g_signal_connect(GTK_OBJECT(menuitem_sound), "activate",
+ G_CALLBACK(&menuitem_sound_callback), this);
return true;
}
@@ -417,6 +424,16 @@
return FALSE;
}
+
+/// \brief Toggle the sound on or off
+void
+GtkGui::menuitem_sound_callback(GtkMenuItem* /*menuitem*/, gpointer /*data*/)
+{
+// GNASH_REPORT_FUNCTION;
+ get_sound_handler()->stop_all_sounds();
+}
+
+
/// \brief restart the movie from the beginning
void
GtkGui::menuitem_restart_callback(GtkMenuItem* /*menuitem*/, gpointer /*data*/)
Index: gui/gtksup.h
===================================================================
RCS file: /sources/gnash/gnash/gui/gtksup.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- gui/gtksup.h 16 Oct 2006 14:36:22 -0000 1.22
+++ gui/gtksup.h 16 Oct 2006 16:14:07 -0000 1.23
@@ -85,6 +85,8 @@
// Menu Item callbacks
+ static void menuitem_sound_callback(GtkMenuItem *menuitem,
+ gpointer instance);
static void menuitem_restart_callback(GtkMenuItem *menuitem,
gpointer instance);
static void menuitem_quit_callback(GtkMenuItem *menuitem,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash libbase/rc.cpp libbase/rc.h configure.ac ...,
Rob Savoye <=