[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/asobj/Color.cpp server/a...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/asobj/Color.cpp server/a... |
Date: |
Fri, 16 Feb 2007 11:12:37 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/02/16 11:12:37
Modified files:
. : ChangeLog
server/asobj : Color.cpp Sound.cpp
Log message:
* server/asobj/: Color.cpp, Sound.cpp:
Warn only once about unsupported stuff; don't terminate
log_<whatever> with a newline (will be added); properly
tag ActionScript errors (log_aserror, and protect by
IF_VERBOSE_ASCODING_ERRORS).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2376&r2=1.2377
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Color.cpp?cvsroot=gnash&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Sound.cpp?cvsroot=gnash&r1=1.2&r2=1.3
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2376
retrieving revision 1.2377
diff -u -b -r1.2376 -r1.2377
--- ChangeLog 16 Feb 2007 11:09:41 -0000 1.2376
+++ ChangeLog 16 Feb 2007 11:12:37 -0000 1.2377
@@ -1,5 +1,10 @@
2007-02-16 Sandro Santilli <address@hidden>
+ * server/asobj/: Color.cpp, Sound.cpp:
+ Warn only once about unsupported stuff; don't terminate
+ log_<whatever> with a newline (will be added); properly
+ tag ActionScript errors (log_aserror, and protect by
+ IF_VERBOSE_ASCODING_ERRORS).
* server/sprite_instance.{cpp,h}: Fixed (hopefully)
the action execution order. Implementation is far
from elegant, but gives the idea of how it should work,
Index: server/asobj/Color.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Color.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- server/asobj/Color.cpp 18 Jan 2007 22:53:21 -0000 1.5
+++ server/asobj/Color.cpp 16 Feb 2007 11:12:37 -0000 1.6
@@ -73,17 +73,44 @@
//double get_numeric_value() const { return 0; }
};
-void color_getrgb(const fn_call& /*fn*/) {
- log_warning("%s: unimplemented \n", __FUNCTION__);
+void color_getrgb(const fn_call& /*fn*/)
+{
+ static bool warned = false;
+ if ( ! warned )
+ {
+ log_warning("%s: unimplemented", __FUNCTION__);
+ warned = true;
+ }
}
-void color_gettransform(const fn_call& /*fn*/) {
- log_warning("%s: unimplemented \n", __FUNCTION__);
+
+void color_gettransform(const fn_call& /*fn*/)
+{
+ static bool warned = false;
+ if ( ! warned )
+ {
+ log_warning("%s: unimplemented", __FUNCTION__);
+ warned = true;
+ }
}
-void color_setrgb(const fn_call& /*fn*/) {
- log_warning("%s: unimplemented \n", __FUNCTION__);
+
+void color_setrgb(const fn_call& /*fn*/)
+{
+ static bool warned = false;
+ if ( ! warned )
+ {
+ log_warning("%s: unimplemented", __FUNCTION__);
+ warned = true;
+ }
}
-void color_settransform(const fn_call& /*fn*/) {
- log_warning("%s: unimplemented \n", __FUNCTION__);
+
+void color_settransform(const fn_call& /*fn*/)
+{
+ static bool warned = false;
+ if ( ! warned )
+ {
+ log_warning("%s: unimplemented", __FUNCTION__);
+ warned = true;
+ }
}
void
Index: server/asobj/Sound.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Sound.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- server/asobj/Sound.cpp 14 Feb 2007 20:41:48 -0000 1.2
+++ server/asobj/Sound.cpp 16 Feb 2007 11:12:37 -0000 1.3
@@ -80,25 +80,45 @@
void
Sound::getBytesLoaded()
{
- log_msg("%s:unimplemented \n", __FUNCTION__);
+ static bool warned = false;
+ if ( ! warned )
+ {
+ log_warning("%s: unimplemented", __FUNCTION__);
+ warned = true;
+ }
}
void
Sound::getBytesTotal()
{
- log_msg("%s:unimplemented \n", __FUNCTION__);
+ static bool warned = false;
+ if ( ! warned )
+ {
+ log_warning("%s: unimplemented", __FUNCTION__);
+ warned = true;
+ }
}
void
Sound::getPan()
{
- log_msg("%s:unimplemented \n", __FUNCTION__);
+ static bool warned = false;
+ if ( ! warned )
+ {
+ log_warning("%s: unimplemented", __FUNCTION__);
+ warned = true;
+ }
}
void
Sound::getTransform()
{
- log_msg("%s:unimplemented \n", __FUNCTION__);
+ static bool warned = false;
+ if ( ! warned )
+ {
+ log_warning("%s: unimplemented", __FUNCTION__);
+ warned = true;
+ }
}
int
@@ -116,10 +136,10 @@
void
Sound::loadSound(std::string file, bool /*streaming*/)
{
- log_msg("%s is still testing!! \n", __FUNCTION__);
+ log_msg("%s is still testing!!", __FUNCTION__);
if (connection) {
- log_warning("This sound already has a connection?? (We try to
handle this by deleting the old one...)\n");
+ log_warning("This sound already has a connection?? (We try to
handle this by deleting the old one...)");
delete connection;
}
externalURL = file;
@@ -131,13 +151,23 @@
void
Sound::setPan()
{
- log_msg("%s:unimplemented \n", __FUNCTION__);
+ static bool warned = false;
+ if ( ! warned )
+ {
+ log_warning("%s: unimplemented", __FUNCTION__);
+ warned = true;
+ }
}
void
Sound::setTransform()
{
- log_msg("%s:unimplemented \n", __FUNCTION__);
+ static bool warned = false;
+ if ( ! warned )
+ {
+ log_warning("%s: unimplemented", __FUNCTION__);
+ warned = true;
+ }
}
void
@@ -180,14 +210,24 @@
unsigned int
Sound::getDuration()
{
- log_error("%s: only works when ffmpeg, gstreamer or libmad is
enabled\n", __FUNCTION__);
+ static bool warned = false;
+ if ( ! warned )
+ {
+ log_warning("%s: only works when ffmpeg, gstreamer or libmad is
enabled", __FUNCTION__);
+ warned = true;
+ }
return 0;
}
unsigned int
Sound::getPosition()
{
- log_error("%s: only works when ffmpeg, gstreamer or libmad is
enabled\n", __FUNCTION__);
+ static bool warned = false;
+ if ( ! warned )
+ {
+ log_error("%s: only works when ffmpeg, gstreamer or libmad is
enabled", __FUNCTION__);
+ warned = true;
+ }
return 0;
}
@@ -225,7 +265,7 @@
void
sound_start(const fn_call& fn)
{
- log_action("-- start sound \n");
+ log_action("-- start sound");
Sound* so = ensure_sound(fn.this_ptr);
int loop = 0;
int secondOffset = 0;
@@ -248,7 +288,7 @@
void
sound_stop(const fn_call& fn)
{
- log_action("-- stop sound \n");
+ log_action("-- stop sound ");
Sound* so = ensure_sound(fn.this_ptr);
int si = -1;
@@ -262,10 +302,13 @@
boost::intrusive_ptr<resource> res =
def->get_exported_resource(name);
if (res == NULL)
{
- log_error("import error: resource '%s' is not exported\n",
name);
+ IF_VERBOSE_MALFORMED_SWF(
+ log_swferror("import error: resource '%s' is not exported",
name);
+ );
return;
}
+ // FIXME: shouldn't we use dynamic_cast here (or rely on
sound_sample interface) ?
sound_sample_impl* ss = (sound_sample_impl*)
res->cast_to_sound_sample();
if (ss != NULL)
@@ -274,7 +317,7 @@
}
else
{
- log_error("sound sample is NULL\n");
+ log_error("sound sample is NULL (doesn't cast to
sound_sample_impl)");
return;
}
@@ -286,10 +329,12 @@
void
sound_attachsound(const fn_call& fn)
{
- log_action("-- attach sound \n");
+ log_action("-- attach sound");
if (fn.nargs < 1)
{
- log_error("attach sound needs one argument\n");
+ IF_VERBOSE_ASCODING_ERRORS(
+ log_aserror("attach sound needs one argument");
+ );
return;
}
@@ -297,7 +342,9 @@
const char* name = fn.arg(0).to_string();
if (!name) {
- log_error("attachSound need a non-null argument\n");
+ IF_VERBOSE_ASCODING_ERRORS(
+ log_aserror("attachSound need a non-null argument");
+ );
return;
}
@@ -307,11 +354,14 @@
boost::intrusive_ptr<resource> res =
def->get_exported_resource(so->soundName.c_str());
if (res == NULL)
{
- log_error("import error: resource '%s' is not exported\n",
so->soundName.c_str());
+ IF_VERBOSE_MALFORMED_SWF(
+ log_swferror("import error: resource '%s' is not exported",
so->soundName.c_str());
+ );
return;
}
int si = 0;
+ // FIXME: shouldn't we use dynamic_cast here (or rely on sound_sample
interface) ?
sound_sample_impl* ss = (sound_sample_impl*) res->cast_to_sound_sample();
if (ss != NULL)
@@ -320,7 +370,7 @@
}
else
{
- log_error("sound sample is NULL\n");
+ log_error("sound sample is NULL (doesn't cast to
sound_sample_impl)");
return;
}
@@ -332,25 +382,45 @@
void
sound_getbytesloaded(const fn_call& /*fn*/)
{
- log_msg("%s:unimplemented \n", __FUNCTION__);
+ static bool warned = false;
+ if ( ! warned )
+ {
+ log_warning("%s: unimplemented", __FUNCTION__);
+ warned = true;
+ }
}
void
sound_getbytestotal(const fn_call& /*fn*/)
{
- log_msg("%s:unimplemented \n", __FUNCTION__);
+ static bool warned = false;
+ if ( ! warned )
+ {
+ log_warning("%s: unimplemented", __FUNCTION__);
+ warned = true;
+ }
}
void
sound_getpan(const fn_call& /*fn*/)
{
- log_msg("%s:unimplemented \n", __FUNCTION__);
+ static bool warned = false;
+ if ( ! warned )
+ {
+ log_warning("%s: unimplemented", __FUNCTION__);
+ warned = true;
+ }
}
void
sound_gettransform(const fn_call& /*fn*/)
{
- log_msg("%s:unimplemented \n", __FUNCTION__);
+ static bool warned = false;
+ if ( ! warned )
+ {
+ log_warning("%s: unimplemented", __FUNCTION__);
+ warned = true;
+ }
}
void
@@ -370,7 +440,9 @@
sound_loadsound(const fn_call& fn)
{
if (fn.nargs != 2) {
- log_error("loadSound needs 2 arguments!\n");
+ IF_VERBOSE_ASCODING_ERRORS(
+ log_aserror("loadSound needs 2 arguments!");
+ );
return;
}
@@ -382,13 +454,23 @@
void
sound_setpan(const fn_call& /*fn*/)
{
- log_msg("%s:unimplemented \n", __FUNCTION__);
+ static bool warned = false;
+ if ( ! warned )
+ {
+ log_warning("%s: unimplemented", __FUNCTION__);
+ warned = true;
+ }
}
void
sound_settransform(const fn_call& /*fn*/)
{
- log_msg("%s:unimplemented \n", __FUNCTION__);
+ static bool warned = false;
+ if ( ! warned )
+ {
+ log_warning("%s: unimplemented", __FUNCTION__);
+ warned = true;
+ }
}
void
@@ -396,7 +478,9 @@
{
if (fn.nargs < 1)
{
- log_error("set volume of sound needs one argument\n");
+ IF_VERBOSE_ASCODING_ERRORS(
+ log_aserror("set volume of sound needs one argument");
+ );
return;
}
@@ -422,7 +506,12 @@
void
sound_ID3(const fn_call& /*fn*/)
{
- log_msg("%s:unimplemented \n", __FUNCTION__);
+ static bool warned = false;
+ if ( ! warned )
+ {
+ log_warning("%s: unimplemented", __FUNCTION__);
+ warned = true;
+ }
}
void
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog server/asobj/Color.cpp server/a...,
Sandro Santilli <=