gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog backend/sound_handler_gst.cpp b...


From: Tomas Groth
Subject: [Gnash-commit] gnash ChangeLog backend/sound_handler_gst.cpp b...
Date: Tue, 15 May 2007 10:47:51 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Tomas Groth <tgc>       07/05/15 10:47:51

Modified files:
        .              : ChangeLog 
        backend        : sound_handler_gst.cpp sound_handler_sdl.cpp 
        libbase        : log.h 
        server/swf     : tag_loaders.cpp 

Log message:
                * backend/sound_handler_{sdl,gst}.cpp: Use the 
                  IF_VERBOSE_MALFORMED_SWF macro.
                * libbase/log.h: Added gnash:: to RcInitFile calls.
                * server/swf/tag_loaders.cpp: Use stream::read() instead of 
loops.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3223&r2=1.3224
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_gst.cpp?cvsroot=gnash&r1=1.40&r2=1.41
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_sdl.cpp?cvsroot=gnash&r1=1.55&r2=1.56
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/log.h?cvsroot=gnash&r1=1.50&r2=1.51
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/tag_loaders.cpp?cvsroot=gnash&r1=1.99&r2=1.100

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3223
retrieving revision 1.3224
diff -u -b -r1.3223 -r1.3224
--- ChangeLog   15 May 2007 10:42:50 -0000      1.3223
+++ ChangeLog   15 May 2007 10:47:50 -0000      1.3224
@@ -1,3 +1,10 @@
+2007-05-15 Tomas Groth Christensen <address@hidden>
+
+       * backend/sound_handler_{sdl,gst}.cpp: Use the 
+         IF_VERBOSE_MALFORMED_SWF macro.
+       * libbase/log.h: Added gnash:: to RcInitFile calls.
+       * server/swf/tag_loaders.cpp: Use stream::read() instead of loops.
+
 2007-05-15 Sandro Santilli <address@hidden>
 
        * libbase/GnashException.h: add missing <string> include.

Index: backend/sound_handler_gst.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler_gst.cpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- backend/sound_handler_gst.cpp       15 May 2007 09:41:54 -0000      1.40
+++ backend/sound_handler_gst.cpp       15 May 2007 10:47:50 -0000      1.41
@@ -20,7 +20,7 @@
 // Based on sound_handler_sdl.cpp by Thatcher Ulrich http://tulrich.com 2003
 // which has been donated to the Public Domain.
 
-/* $Id: sound_handler_gst.cpp,v 1.40 2007/05/15 09:41:54 tgc Exp $ */
+/* $Id: sound_handler_gst.cpp,v 1.41 2007/05/15 10:47:50 tgc Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -282,7 +282,9 @@
 
        // Make sure sound actually got some data
        if (sounddata->data_size < 1) {
-               gnash::log_error(_("Trying to play sound with size 0, malformed 
SWF?"));
+               IF_VERBOSE_MALFORMED_SWF(
+                       gnash::log_swferror(_("Trying to play sound with size 
0"));
+               );
                return;
        }
 

Index: backend/sound_handler_sdl.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler_sdl.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- backend/sound_handler_sdl.cpp       15 May 2007 09:41:54 -0000      1.55
+++ backend/sound_handler_sdl.cpp       15 May 2007 10:47:50 -0000      1.56
@@ -18,7 +18,7 @@
 // Based on sound_handler_sdl.cpp by Thatcher Ulrich http://tulrich.com 2003
 // which has been donated to the Public Domain.
 
-// $Id: sound_handler_sdl.cpp,v 1.55 2007/05/15 09:41:54 tgc Exp $
+// $Id: sound_handler_sdl.cpp,v 1.56 2007/05/15 10:47:50 tgc Exp $
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -261,7 +261,9 @@
 
        // Make sure sound actually got some data
        if (sounddata->data_size < 1) {
-               gnash::log_error(_("Trying to play sound with size 0, malformed 
SWF?"));
+               IF_VERBOSE_MALFORMED_SWF(
+                       gnash::log_swferror(_("Trying to play sound with size 
0"));
+               );
                return;
        }
 

Index: libbase/log.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/log.h,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -b -r1.50 -r1.51
--- libbase/log.h       7 May 2007 10:29:39 -0000       1.50
+++ libbase/log.h       15 May 2007 10:47:51 -0000      1.51
@@ -14,7 +14,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: log.h,v 1.50 2007/05/07 10:29:39 strk Exp $ */
+/* $Id: log.h,v 1.51 2007/05/15 10:47:51 tgc Exp $ */
 
 #ifndef GNASH_LOG_H
 #define GNASH_LOG_H
@@ -302,14 +302,14 @@
 
 #if VERBOSE_ASCODING_ERRORS
 // TODO: check if it's worth to check verbosity level too...
-#define IF_VERBOSE_ASCODING_ERRORS(x) { if ( 
RcInitFile::getDefaultInstance().showASCodingErrors() ) { x; } } while (0);
+#define IF_VERBOSE_ASCODING_ERRORS(x) { if ( 
gnash::RcInitFile::getDefaultInstance().showASCodingErrors() ) { x; } } while 
(0);
 #else
 #define IF_VERBOSE_ASCODING_ERRORS(x)
 #endif
 
 #if VERBOSE_MALFORMED_SWF
 // TODO: check if it's worth to check verbosity level too... 
-#define IF_VERBOSE_MALFORMED_SWF(x) { if ( 
RcInitFile::getDefaultInstance().showMalformedSWFErrors() ) { x; } } while (0);
+#define IF_VERBOSE_MALFORMED_SWF(x) { if ( 
gnash::RcInitFile::getDefaultInstance().showMalformedSWFErrors() ) { x; } } 
while (0);
 #else
 #define IF_VERBOSE_MALFORMED_SWF(x)
 #endif

Index: server/swf/tag_loaders.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/swf/tag_loaders.cpp,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -b -r1.99 -r1.100
--- server/swf/tag_loaders.cpp  15 May 2007 09:41:54 -0000      1.99
+++ server/swf/tag_loaders.cpp  15 May 2007 10:47:51 -0000      1.100
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: tag_loaders.cpp,v 1.99 2007/05/15 09:41:54 tgc Exp $ */
+/* $Id: tag_loaders.cpp,v 1.100 2007/05/15 10:47:51 tgc Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1290,10 +1290,7 @@
                // Decompressed elsewhere
                data_bytes = in->get_tag_end_position() - in->get_position();
                data = new unsigned char[data_bytes];
-               for (int i = 0; i < data_bytes; i++)
-               {
-                   data[i] = in->read_u8();
-               }
+               in->read((char *)data, data_bytes);
                break;
 
            case sound_handler::FORMAT_NELLYMOSER:
@@ -1475,15 +1472,9 @@
     {
        // Raw data
        sample_count =  data_bytes / (stereo ? 4 : 2);
-       for (int i = 0; i < data_bytes; i++)
-       {
-           data[i] = in->read_u8();
-       }
+       in->read((char *)data, data_bytes);
     } else {
-       for (int i = 0; i < data_bytes; i++)
-       {
-           data[i] = in->read_u8();
-       }
+       in->read((char *)data, data_bytes);
 
        // Swap bytes on behalf of the host, to make it easier for the handler.
        // @@ I'm assuming this is a good idea?  Most sound handlers will 
prefer native endianness?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]