gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash configure.ac ChangeLog libamf/Makefile.am...


From: Rob Savoye
Subject: [Gnash-commit] gnash configure.ac ChangeLog libamf/Makefile.am...
Date: Sat, 15 Dec 2007 06:58:43 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Rob Savoye <rsavoye>    07/12/15 06:58:43

Modified files:
        .              : configure.ac ChangeLog 
        libamf         : Makefile.am amf.cpp amf.h protocol.h rtmp.cpp 
        testsuite/libamf.all: Makefile.am test_number.cpp 
                              test_object.cpp test_string.cpp 
Added files:
        testsuite/libamf.all: array.sol boolean.sol date.sol null.sol 
                              number.sol object.sol settings.sol 
                              string.sol test.sol undefined.sol xml.sol 
        testsuite/libamf.all/xmlfiles: array.xml boolean.xml date.xml 
                                       null.xml number.xml object.xml 
                                       settings.xml string.xml test.xml 
                                       undefined.xml xml.xml 

Log message:
                * libamf/sol.{cpp,h}: New files for Shared Object file support.
                * libamf/Makefile.am: Build sol into libamf.
                * libamf/amf.{cpp,h}: Use cstdint for data types.
                * libamf/protocol.h: Define an enum for protocols supported.
                * testsuite/libamf.all/Makefile.am: Add test_sol. Build .sol 
files
                from XML.
                * testsuite/libamf.all/test_*.cpp: Use cstdint for data types.
                * testsuite/libamf.all/settings.sol: 
                * testsuite/libamf.all/xmlfiles: Directory for xml files to
                recreate .sol files.
                * testsuite/libamf.all/xmlfiles/array.xml, date.xml, number.xml,
                settings.xml, test.xml, xml.xml, boolean.xml, null.xml,
                object.xml, string.xml, undefined.xml: New XML files to generate
                .sol files using s2x.py.
                * testsuite/libamf.all/solfiles/array.sol, date.sol, number.sol,
                settings.sol, test.sol, sol.sol, boolean.sol, null.sol,
                object.sol, string.sol, undefined.sol: New binary SOL files for
                testcases. 
                * configure.ac: Look for python so we can use it for testing.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.459&r2=1.460
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5181&r2=1.5182
http://cvs.savannah.gnu.org/viewcvs/gnash/libamf/Makefile.am?cvsroot=gnash&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/gnash/libamf/amf.cpp?cvsroot=gnash&r1=1.43&r2=1.44
http://cvs.savannah.gnu.org/viewcvs/gnash/libamf/amf.h?cvsroot=gnash&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/gnash/libamf/protocol.h?cvsroot=gnash&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/gnash/libamf/rtmp.cpp?cvsroot=gnash&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/Makefile.am?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/test_number.cpp?cvsroot=gnash&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/test_object.cpp?cvsroot=gnash&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/test_string.cpp?cvsroot=gnash&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/array.sol?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/boolean.sol?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/date.sol?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/null.sol?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/number.sol?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/object.sol?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/settings.sol?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/string.sol?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/test.sol?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/undefined.sol?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/xml.sol?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/xmlfiles/array.xml?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/xmlfiles/boolean.xml?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/xmlfiles/date.xml?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/xmlfiles/null.xml?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/xmlfiles/number.xml?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/xmlfiles/object.xml?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/xmlfiles/settings.xml?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/xmlfiles/string.xml?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/xmlfiles/test.xml?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/xmlfiles/undefined.xml?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/xmlfiles/xml.xml?cvsroot=gnash&rev=1.1

Patches:
Index: configure.ac
===================================================================
RCS file: /sources/gnash/gnash/configure.ac,v
retrieving revision 1.459
retrieving revision 1.460
diff -u -b -r1.459 -r1.460
--- configure.ac        12 Dec 2007 23:56:28 -0000      1.459
+++ configure.ac        15 Dec 2007 06:58:39 -0000      1.460
@@ -15,7 +15,7 @@
 dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 dnl  
 
-dnl $Id: configure.ac,v 1.459 2007/12/12 23:56:28 rsavoye Exp $
+dnl $Id: configure.ac,v 1.460 2007/12/15 06:58:39 rsavoye Exp $
 
 AC_PREREQ(2.50)
 AC_INIT(gnash, cvs)
@@ -749,6 +749,8 @@
 dnl Check for PKG_CONFIG before any GNASH_PATH call
 PKG_PROG_PKG_CONFIG
 
+AC_PATH_PROG(PYTHON, python, ,[${pathlist}])
+
 dnl Look for scratchbox
 sbox=no
 if test x"${SBOX_REDIRECT_FROM_DIRS}" != x; then
@@ -1662,11 +1664,6 @@
 cygnal/Makefile
 cygnal/testsuite/Makefile
 cygnal/testsuite/cygnal.all/Makefile
-dnl cygnal/ACT/unit_tests/Makefile
-dnl cygnal/IO/Makefile
-dnl cygnal/HTTP/Makefile
-dnl cygnal/Net/Makefile
-dnl cygnal/unit_tests/Makefile
 )
 
 ###
@@ -2368,6 +2365,13 @@
     echo "                 You can install it from http://www.swftools.org/";
   fi
 
+  if test x"$PYTHON" != x; then
+    echo "        PYTHON is $PYTHON"
+  else
+    echo "        WARNING: You need to have python installed"
+    echo "                 to run some of the tests in Gnash testsuite."
+  fi
+
 fi
 
 if test x"$Z_LIBS" != x; then

Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5181
retrieving revision 1.5182
diff -u -b -r1.5181 -r1.5182
--- ChangeLog   14 Dec 2007 23:10:17 -0000      1.5181
+++ ChangeLog   15 Dec 2007 06:58:39 -0000      1.5182
@@ -1,3 +1,25 @@
+2007-12-14  Rob Savoye  <address@hidden>
+
+       * libamf/sol.{cpp,h}: New files for Shared Object file support.
+       * libamf/Makefile.am: Build sol into libamf.
+       * libamf/amf.{cpp,h}: Use cstdint for data types.
+       * libamf/protocol.h: Define an enum for protocols supported.
+       * testsuite/libamf.all/Makefile.am: Add test_sol. Build .sol files
+       from XML.
+       * testsuite/libamf.all/test_*.cpp: Use cstdint for data types.
+       * testsuite/libamf.all/settings.sol: 
+       * testsuite/libamf.all/xmlfiles: Directory for xml files to
+       recreate .sol files.
+       * testsuite/libamf.all/xmlfiles/array.xml, date.xml, number.xml,
+       settings.xml, test.xml, xml.xml, boolean.xml, null.xml,
+       object.xml, string.xml, undefined.xml: New XML files to generate
+       .sol files using s2x.py.
+       * testsuite/libamf.all/solfiles/array.sol, date.sol, number.sol,
+       settings.sol, test.sol, sol.sol, boolean.sol, null.sol,
+       object.sol, string.sol, undefined.sol: New binary SOL files for
+       testcases. 
+       * configure.ac: Look for python so we can use it for testing.
+
 2007-12-14 Sandro Santilli <address@hidden>
 
        * server/swf/tag_loaders.cpp: immediately store bitmap_character_def

Index: libamf/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/libamf/Makefile.am,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- libamf/Makefile.am  10 Aug 2007 04:36:13 -0000      1.28
+++ libamf/Makefile.am  15 Dec 2007 06:58:40 -0000      1.29
@@ -15,12 +15,15 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-# $Id: Makefile.am,v 1.28 2007/08/10 04:36:13 strk Exp $
+# $Id: Makefile.am,v 1.29 2007/12/15 06:58:40 rsavoye Exp $
 
 AUTOMAKE_OPTIONS = 
 
 pkglib_LTLIBRARIES = libgnashamf.la
-libgnashamf_la_SOURCES = amf.cpp rtmp.cpp
+libgnashamf_la_SOURCES = \
+       amf.cpp \
+       rtmp.cpp \
+       sol.cpp
 
 libgnashamf_la_LIBADD = $(top_builddir)/libbase/libgnashbase.la
 libgnashamf_la_LDFLAGS =  -release $(VERSION) ${AM_LDFLAGS} 
@@ -34,7 +37,12 @@
 
 AM_LDFLAGS = $(BOOST_LIBS)
 
-noinst_HEADERS = amfutf8.h amf.h rtmp.h protocol.h
+noinst_HEADERS = \
+       amfutf8.h \
+       amf.h \
+       rtmp.h \
+       protocol.h \
+       sol.h
 
 # Rebuild with GCC 4.x Mudflap support
 mudflap:

Index: libamf/amf.cpp
===================================================================
RCS file: /sources/gnash/gnash/libamf/amf.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- libamf/amf.cpp      12 Dec 2007 10:06:58 -0000      1.43
+++ libamf/amf.cpp      15 Dec 2007 06:58:40 -0000      1.44
@@ -17,13 +17,10 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: amf.cpp,v 1.43 2007/12/12 10:06:58 zoulunkai Exp $ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-//#include <cstring> //For memcpy(), commented out atm.
 #include <string>
 #include <vector>
 
@@ -36,7 +33,6 @@
 #include "log.h"
 #include "amf.h"
 #include "amfutf8.h"
-
 #include <boost/cstdint.hpp> // for boost::?int??_t 
 
 using namespace std;
@@ -97,7 +93,7 @@
 {
     GNASH_REPORT_FUNCTION;
     if (!_amf_data) {
-        _amf_data = new unsigned char(size+1);
+        _amf_data = new uint8_t(size+1);
         memset(_amf_data, 0, size+1);
     }
     _seekptr = _amf_data;
@@ -136,25 +132,25 @@
     // Little-endian machine: byte-swap the word
 
     // A conveniently-typed pointer to the source data
-    unsigned char *x = static_cast<unsigned char *>(word);
+    uint8_t *x = static_cast<uint8_t *>(word);
 
     switch (size) {
     case 2: // 16-bit integer
       {
-       unsigned char c;
+       uint8_t c;
        c=x[0]; x[0]=x[1]; x[1]=c;
        break;
       }
     case 4: // 32-bit integer
       {
-       unsigned char c;
+       uint8_t c;
        c=x[0]; x[0]=x[3]; x[3]=c;
        c=x[1]; x[1]=x[2]; x[2]=c;
        break;
       }
     case 8: // 64-bit integer
       {
-       unsigned char c;
+       uint8_t c;
        c=x[0]; x[0]=x[7]; x[7]=c;
        c=x[1]; x[1]=x[6]; x[6]=c;
        c=x[2]; x[2]=x[5]; x[5]=c;
@@ -168,11 +164,11 @@
 
 
 bool
-AMF::parseAMF(char *in)
+AMF::parseAMF(uint8_t *in)
 {
     GNASH_REPORT_FUNCTION;
 
-    char *x = static_cast<char *>(in);
+    uint8_t *x = in;
 
     while (*x != OBJECT_END) {
         x = readElement(x);
@@ -180,14 +176,12 @@
     return true;
 }
 
-// @@ I don't believe this works, since it only advances x over the
-// @@ object's metafields (length etc), but not over its contents. -martin
-char *
+uint8_t *
 AMF::readElement(void *in)
 {
     GNASH_REPORT_FUNCTION;
 
-    char *x = static_cast<char *>(in);
+    uint8_t *x = static_cast<uint8_t *>(in);
     astype_e type = (astype_e)*x;
     bool boolshift;
     const char *mstr = NULL;
@@ -295,15 +289,15 @@
 /// normal ASCII. It may be that these need to be converted to wide
 /// characters, but for now we just leave them as standard multibyte
 /// characters.
-byte*
+uint8_t *
 AMF::encodeElement(astype_e type, const void *in, int nbytes)
 {
     GNASH_REPORT_FUNCTION;
 
     amfnum_t num;
     int pktsize = 0;
-    byte* out = NULL;
-    byte* x = NULL;
+    uint8_t* out = NULL;
+    uint8_t* x = NULL;
 
     // Packets are of varying length. A few pass in a byte count, but
     // most packets have a hardcoded size.
@@ -373,7 +367,7 @@
     switch (type) {
       case NUMBER:
           // Encode the data as a 64 bit, big-endian, numeric value
-          x = out = new byte[pktsize];
+          x = out = new uint8_t[pktsize];
           memset(x, 0, pktsize);
           *x++ = (char)AMF::NUMBER;
           memcpy(&num, in, AMF_NUMBER_SIZE);
@@ -382,7 +376,7 @@
           break;
       case BOOLEAN:
           // Encode a boolean value. 0 for false, 1 for true
-          out = new byte[pktsize];
+          out = new uint8_t[pktsize];
           x = out;    
           *x++ = (char)AMF::BOOLEAN;
           *x = *static_cast<const char *>(in);
@@ -390,7 +384,7 @@
       case STRING:
           // Encode a string value. The data follows a 2 byte length
           // field. (which must be big-endian)
-          x = out = new byte[pktsize];
+          x = out = new uint8_t[pktsize];
           memset(x, 0, pktsize);
           *x++ = AMF::STRING;
           num = nbytes;
@@ -411,7 +405,7 @@
           log_unimpl("Null AMF encoder");
           break;
       case UNDEFINED:
-          x = out = new byte[pktsize];
+          x = out = new uint8_t[pktsize];
           memset(x, 0, pktsize);
           *x++ = AMF::UNDEFINED;
           num = nbytes;
@@ -434,7 +428,7 @@
           break;
           // Encode the date as a 64 bit, big-endian, numeric value
       case DATE:
-          x = out = new byte[pktsize];
+          x = out = new uint8_t[pktsize];
           memset(x, 0, pktsize);
           *x++ = AMF::DATE;
           num = *static_cast<const amfnum_t*>(in);
@@ -453,7 +447,7 @@
       case XML_OBJECT:
           // Encode an XML object. The data follows a 4 byte length
           // field. (which must be big-endian)
-          x = out = new byte[pktsize];
+          x = out = new uint8_t[pktsize];
           memset(x, 0, pktsize);
           *x++ = AMF::STRING;
           num = nbytes;
@@ -721,12 +715,12 @@
     return 0;
 }
 
-char *
-AMF::extractString(const byte *in)
+int8_t *
+AMF::extractString(const uint8_t *in)
 {
     GNASH_REPORT_FUNCTION;
-    char *buf = NULL;
-    const byte *x = in;
+    int8_t *buf = NULL;
+    uint8_t *x = const_cast<uint8_t *>(in);
     
     if (*x == AMF::STRING) {
         x++;
@@ -734,7 +728,7 @@
         swapBytes(&length, 2);
        log_debug("Encoded length of string: %hd", length);
         x += sizeof(short);
-        buf = new char[length+1];
+        buf = new int8_t[length+1];
         memset(buf, 0, length+1);
         memcpy(buf, x, length); /* x is not long enough */
     } else {
@@ -745,10 +739,10 @@
 }
 
 amfnum_t *
-AMF::extractNumber(const char *in)
+AMF::extractNumber(const uint8_t *in)
 {
     GNASH_REPORT_FUNCTION;    
-    char *x = const_cast<char *>(in);
+    uint8_t *x = const_cast<uint8_t *>(in);
     amfnum_t *num = new amfnum_t;
     memset(num, 0, AMF_NUMBER_SIZE);
     
@@ -763,21 +757,21 @@
     return num;
 }
 
-byte *
+uint8_t *
 AMF::encodeVariable(amf_element_t & /* el */)
 {
     GNASH_REPORT_FUNCTION;
     return NULL;
 }
 
-byte *
+uint8_t *
 AMF::encodeVariable(const char *name, bool flag)
 {
     GNASH_REPORT_FUNCTION;
     
     int outsize = strlen(name) + AMF_NUMBER_SIZE + 5;
-    byte *out = new byte[outsize];
-    byte *tmpptr = out;
+    uint8_t *out = new uint8_t[outsize];
+    uint8_t *tmpptr = out;
 
     size_t length = strlen(name);
     short enclength = length;
@@ -793,13 +787,13 @@
     return out;    
 }
 
-byte *
+uint8_t *
 AMF::encodeVariable(const char *name)
 {
     GNASH_REPORT_FUNCTION;
     size_t outsize = strlen(name) + AMF_NUMBER_SIZE + 5;
-    byte *out = new byte[outsize];
-    byte *tmpptr = out;
+    uint8_t *out = new uint8_t[outsize];
+    uint8_t *tmpptr = out;
 
     size_t length = strlen(name);
     short enclength = length;
@@ -814,13 +808,13 @@
     return out;    
 }
 
-byte *
+uint8_t *
 AMF::encodeVariable(const char *name, amfnum_t bignum)
 {
     GNASH_REPORT_FUNCTION;
     int outsize = strlen(name) + AMF_NUMBER_SIZE + 5;
-    byte *out = new byte[outsize];
-    byte *tmpptr = out;
+    uint8_t *out = new uint8_t[outsize];
+    uint8_t *tmpptr = out;
     amfnum_t newnum = bignum;
     char *numptr = (char *)&newnum;
 
@@ -839,14 +833,14 @@
     return out;    
 }
 
-byte *
+uint8_t *
 AMF::encodeVariable(const char *name, const char *val)
 {
     GNASH_REPORT_FUNCTION;
 
     int outsize = strlen(name) + strlen(val) + 5;
-    byte *out = new byte[outsize];
-    byte *tmpptr = out;
+    uint8_t *out = new uint8_t[outsize];
+    uint8_t *tmpptr = out;
 
     size_t length = strlen(name);
     short enclength = length;
@@ -867,14 +861,14 @@
     return out;
 }
 
-byte *
+uint8_t *
 AMF::encodeVariable(std::string &name, std::string &val)
 {
     GNASH_REPORT_FUNCTION;
 
     int outsize = name.size() + val.size() + 5;
-    byte *out = new unsigned char[outsize];
-    byte *tmpptr = out;
+    uint8_t *out = new uint8_t[outsize];
+    uint8_t *tmpptr = out;
     short length;
 
     length = name.size() && 0xffff;
@@ -895,7 +889,7 @@
 }
 
 int
-AMF::headerSize(char header)
+AMF::headerSize(int8_t header)
 {
 //    GNASH_REPORT_FUNCTION;
     
@@ -925,12 +919,11 @@
 }
 
 int
-AMF::parseHeader(unsigned char *in)
+AMF::parseHeader(uint8_t *in)
 {
     GNASH_REPORT_FUNCTION;
 
-    unsigned char *tmpptr = in;
-    unsigned char hexint[32];
+    uint8_t *tmpptr = in;
     
     log_msg (_("AMF header byte is: 0x%X"), *in);
 
@@ -941,11 +934,13 @@
     log_msg (_("The header size is %d"), _header_size);
 
 #if 1
-    hexify((unsigned char *)hexint, (unsigned char *)in, _header_size, false);
+    uint8_t *hexint;
+    hexint = new uint8_t[(_header_size + 3) *3];
+    hexify((uint8_t *)hexint, (uint8_t *)in, _header_size, false);
     log_msg(_("The packet head is: 0x%s"), hexint);
 #endif
     if (_header_size >= 4) {
-        hexify((unsigned char *)hexint, (unsigned char *)tmpptr, 3, false);
+        hexify((uint8_t *)hexint, (uint8_t *)tmpptr, 3, false);
         _mystery_word = *tmpptr++;
         _mystery_word = (_mystery_word << 12) + *tmpptr++;
         _mystery_word = (_mystery_word << 8) + *tmpptr++;
@@ -953,19 +948,19 @@
     }
 
     if (_header_size >= 8) {
-        hexify((unsigned char *)hexint, (unsigned char *)tmpptr, 3, false);
+        hexify((uint8_t *)hexint, (uint8_t *)tmpptr, 3, false);
         _total_size = *tmpptr++;
         _total_size = (_total_size << 12) + *tmpptr++;
         _total_size = (_total_size << 8) + *tmpptr++;
         _total_size = _total_size & 0xffffff;
         log_msg(_("The body size is: %d, or 0x%s"), _total_size, hexint);
-        _amf_data = new unsigned char(_total_size+1);
+        _amf_data = new uint8_t(_total_size+1);
         _seekptr = _amf_data;
 //        memset(_amf_data, 0, _total_size+1);
     }
 
     if (_header_size >= 8) {
-        hexify((unsigned char *)hexint, (unsigned char *)tmpptr, 1, false);
+        hexify((uint8_t *)hexint, (uint8_t *)tmpptr, 1, false);
         _type = *(content_types_e *)tmpptr;
         tmpptr++;
         log_msg(_("The type is: %d, or 0x%s"), _type, hexint);
@@ -992,7 +987,7 @@
     };
     
     if (_header_size == 12) {
-        hexify((unsigned char *)hexint, (unsigned char *)tmpptr, 3, false);
+        hexify((uint8_t *)hexint, (uint8_t *)tmpptr, 3, false);
         _src_dest = *(reinterpret_cast<amfsource_e *>(tmpptr));
         tmpptr += sizeof(unsigned int);
         log_msg(_("The source/destination is: %d, or 0x%s"), _src_dest, 
hexint);
@@ -1001,8 +996,8 @@
     return _packet_size;
 }
 
-unsigned char *
-AMF::addPacketData(unsigned char *data, int bytes)
+uint8_t *
+AMF::addPacketData(uint8_t *data, int bytes)
 {
     GNASH_REPORT_FUNCTION;
     memcpy(_seekptr, data, bytes);
@@ -1019,14 +1014,14 @@
 }
 
 int
-AMF::parseBody(unsigned char *in, int bytes)
+AMF::parseBody(uint8_t *in, int bytes)
 {
     GNASH_REPORT_FUNCTION;
 
-    unsigned char *tmpptr;
+    uint8_t *tmpptr;
 
-//    unsigned char hexint[(bytes*2)+1];
-    unsigned char* hexint;
+//    uint8_t hexint[(bytes*2)+1];
+    uint8_t* hexint;
 
     char buffer[500];
 //    char *name;
@@ -1042,12 +1037,12 @@
         return -1;
     }
 
-    hexint =  (unsigned char*) malloc((bytes * 3) + 12);
+    hexint =  (uint8_t*) malloc((bytes * 3) + 12);
 
 //     memcpy(_amf_data +_read_size, in, AMF_VIDEO_PACKET_SIZE);
 //     _read_size += bytes;
 #if 1
-    hexify((unsigned char *)hexint, (unsigned char *)in, bytes, true);
+    hexify((uint8_t *)hexint, (uint8_t *)in, bytes, true);
     log_msg(_("The packet body is: 0x%s"), hexint);
 #endif
 
@@ -1060,7 +1055,7 @@
 // After the element name there is a type byte. If it's a Number type, then 8 
bytes are read
 // If it's a String type, then there is a count of characters, then the string 
value    
     
-    while (tmpptr  != (in + bytes)) {
+    while (tmpptr  <= (in + bytes)) {
         memset(buffer, 0, sizeof(buffer));     //FIXME, slow
         // Check the type of the element data
         char type = *(astype_e *)tmpptr;
@@ -1115,14 +1110,18 @@
     return -1;
 }
 
-unsigned char *
-AMF::extractVariable(amf_element_t *el, unsigned char *in)
+uint8_t *
+AMF::extractVariable(AMF::amf_element_t *el, uint8_t *in)
 {
     GNASH_REPORT_FUNCTION;
     
-    unsigned char buffer[AMF_PACKET_SIZE];
-    unsigned char *tmpptr = in;
-    short length;
+    uint8_t buffer[AMF_PACKET_SIZE];
+    uint8_t *tmpptr = in;
+    int16_t length;
+
+    if (el == 0) {
+       return 0;
+    }
 
     el->length = 0;
     el->name.erase();
@@ -1145,12 +1144,13 @@
             tmpptr+=3;
             return tmpptr;
         }
+       return 0;
     }
     
 #if 0
-    unsigned char hexint[AMF_PACKET_SIZE];
-    hexify((unsigned char *)hexint, (unsigned char *)tmpptr, length*3, true);
-    log_msg(_("The element is: 0x%s", hexint);
+    uint8_t hexint[AMF_PACKET_SIZE];
+    hexify((uint8_t *)hexint, (uint8_t *)tmpptr, length*3, true);
+    log_msg(_("The element is: 0x%s"), hexint);
 #endif
     tmpptr += 2;
     // get the name of the element
@@ -1161,7 +1161,7 @@
         tmpptr += length;
     }
     
-//    log_msg(_("AMF element name is: %s", buffer);
+    log_msg(_("AMF element name is: %s"), buffer);
     astype_e type = (astype_e)((*tmpptr++) & 0xff);
 
     if (type <= AMF::TYPED_OBJECT) {
@@ -1169,18 +1169,17 @@
        el->type = type;
     }
 
-    
     switch (type) {
       case NUMBER:
         {
           memcpy(buffer, tmpptr, AMF_NUMBER_SIZE);
           swapBytes(buffer, AMF_NUMBER_SIZE);
-          unsigned char* tmp = new unsigned char[AMF_NUMBER_SIZE+1];
+          uint8_t* tmp = new uint8_t[AMF_NUMBER_SIZE+1];
           memset(tmp, 0, AMF_NUMBER_SIZE+1);
           memcpy(tmp, buffer, AMF_NUMBER_SIZE);
           el->data = tmp;
-          unsigned char hexint[AMF_NUMBER_SIZE*3];
-          hexify((unsigned char *)hexint, (unsigned char *)buffer,
+          uint8_t hexint[AMF_NUMBER_SIZE*3];
+          hexify((uint8_t *)hexint, (uint8_t *)buffer,
                 AMF_NUMBER_SIZE, false);
           log_msg(_("Number \"%s\" is: 0x%s"), el->name.c_str(), hexint);
 //          amfnum_t *num = extractNumber(tmpptr);
@@ -1190,7 +1189,7 @@
       case BOOLEAN:
         {
 //          int value = *tmpptr;
-          unsigned char* tmp = new unsigned char[1];
+          uint8_t* tmp = new uint8_t[1];
           memcpy(tmp, tmpptr, 1); 
           el->data = tmp;
          log_msg((*tmpptr == 0) ? 
@@ -1201,16 +1200,22 @@
         }
       case STRING:
       {
+         // extractString returns a printable char *
          length = ntohs((*(const short *)tmpptr) & 0xffff);
           tmpptr += sizeof(short);
-          el->data = (const unsigned char*)tmpptr; 
-          std::string v((char*)el->data, length);
-          log_msg(_("Variable \"%s\" is: %s"), el->name.c_str(), v.c_str()); 
// el->data);
-          tmpptr += length;
           el->length = length;
+          el->data = tmpptr; 
+//           std::string v(el->data+3, length);
+//           log_msg(_("Variable \"%s\" is: %s"), el->name.c_str(), 
v.c_str()); // el->data);
+          tmpptr += length;
           break;
       }
       case OBJECT:
+         while (*(tmpptr++) != AMF::OBJECT_END) {
+             log_msg("Look for end of object...");
+         }
+         
+         break;
       case MOVIECLIP:
       case NULL_VALUE:
          // Undefined types have a name, but no value
@@ -1218,7 +1223,7 @@
       case UNDEFINED:
       {
           log_msg(_("Undefined type"));
-          el->data = 0; // (const unsigned char*)tmpptr; 
+          el->data = 0; // (const uint8_t*)tmpptr; 
           //log_msg(_("Variable \"%s\" is of undefined type"), 
el->name.c_str());
           el->length = 0;
           el->type = AMF::UNDEFINED;
@@ -1234,15 +1239,15 @@
           el->data = 0;
           el->type = AMF::OBJECT_END;
           break;
+      case TYPED_OBJECT:
       case STRICT_ARRAY:
       case DATE:
       case LONG_STRING:
       case UNSUPPORTED:
       case RECORD_SET:
       case XML_OBJECT:
-      case TYPED_OBJECT:
       default:
-          log_unimpl(_("astype_e of value: %d"), (int)type);
+          log_unimpl(_("astype_e of value: %x"), (int)type);
           break;
     }
     

Index: libamf/amf.h
===================================================================
RCS file: /sources/gnash/gnash/libamf/amf.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- libamf/amf.h        23 Aug 2007 14:10:54 -0000      1.22
+++ libamf/amf.h        15 Dec 2007 06:58:40 -0000      1.23
@@ -28,6 +28,7 @@
 #include <map>
 
 #include "amfutf8.h"
+#include <boost/cstdint.hpp>
 
 namespace amf 
 {
@@ -50,8 +51,6 @@
 typedef int AMF_Long_t;
 typedef double AMF_Double_t;
 
-typedef unsigned char byte;
-
 // FIXME: These are probably bogus, and need to be a UTF-8 type.
 typedef char *AMF_UTF8_t;
 typedef char *AMF_LongUTF8_t;
@@ -175,7 +174,7 @@
         astype_e       type;
         short          length;
         std::string     name;
-        const unsigned char   *data;
+        uint8_t        *data;
 
         amf_element_t()
                 :
@@ -205,13 +204,13 @@
     ///
     /// @return an amf packet (header,data)
     ///
-    byte* encodeElement(astype_e type, const void *in, int nbytes);
+    uint8_t* encodeElement(astype_e type, const void *in, int nbytes);
 
     /// Encode a string
     ///
     /// @return an amf packet (header,data)
     ///
-    byte* encodeString(const char *str)  {
+    uint8_t* encodeString(const char *str)  {
         return encodeElement (STRING, str, strlen(str));
     };
 
@@ -219,7 +218,7 @@
     ///
     /// @return an amf packet (header,data)
     ///
-    byte* encodeNumber(amfnum_t num)  {
+    uint8_t* encodeNumber(amfnum_t num)  {
         return encodeElement (NUMBER, &num, AMF_NUMBER_SIZE);
     };
 
@@ -228,42 +227,42 @@
     /// @return a newly allocated byte array,
     /// to be deleted by caller using delete [] operator, or NULL
     ///
-    byte* encodeVariable(const char *name);
+    uint8_t* encodeVariable(const char *name);
 
     /// Encode a variable. 
     //
     /// @return a newly allocated byte array,
     /// to be deleted by caller using delete [] operator, or NULL
     ///
-    byte* encodeVariable(amf_element_t &el);
+    uint8_t* encodeVariable(amf_element_t &el);
 
     /// Encode a boolean variable. This is a name followed by a boolean value.
     //
     /// @return a newly allocated byte array,
     /// to be deleted by caller using delete [] operator, or NULL
     ///
-    byte* encodeVariable(const char *name, bool flag);
+    uint8_t* encodeVariable(const char *name, bool flag);
 
     /// Encode a variable. 
     //
     /// @return a newly allocated byte array,
     /// to be deleted by caller using delete [] operator, or NULL
     ///
-    byte* encodeVariable(const char *name, amfnum_t num);
+    uint8_t* encodeVariable(const char *name, amfnum_t num);
 
     /// Encode a variable. 
     //
     /// @return a newly allocated byte array,
     /// to be deleted by caller using delete [] operator, or NULL
     ///
-    byte* encodeVariable(std::string &name, std::string &val);
+    uint8_t* encodeVariable(std::string &name, std::string &val);
 
     /// Encode a variable. 
     //
     /// @return a newly allocated byte array,
     /// to be deleted by caller using delete [] operator, or NULL
     ///
-    byte* encodeVariable(const char *name, const char *val);
+    uint8_t* encodeVariable(const char *name, const char *val);
 
     void *encodeRTMPHeader(int amf_index, amf_headersize_e head_size, int 
total_size,
                            content_types_e type, amfsource_e routing);
@@ -271,7 +270,7 @@
 //     amfbody_t *encodeBody(amfutf8_t *target, amfutf8_t *response, int 
nbytes, void *data);
 //    amfpacket_t *encodePacket(std::vector<amfhead_t *> messages);
 
-    char *readElement(void *in);
+    uint8_t *readElement(void *in);
     
     /// Extract the string from a string-type AMF packet
     //
@@ -280,21 +279,20 @@
     ///
     /// Caller is responsible for deletion using delete [] operator.
     ///
-    char *extractString(const byte* in);
-
-    amfnum_t *extractNumber(const char *in);
-    amf_element_t *extractObject(const char *in);
+    int8_t *extractString(const uint8_t* in);
 
+    amfnum_t *extractNumber(const uint8_t *in);
+    amf_element_t *extractObject(const uint8_t *in);
     
-    unsigned char *extractVariable(amf_element_t *el, unsigned char *in);
+    unsigned char *extractVariable(amf_element_t *el, uint8_t *in);
     
-    bool parseAMF(char *in);
-    static int headerSize(char header);
+    bool parseAMF(uint8_t *in);
+    static int headerSize(int8_t header);
     int packetReadAMF(int bytes);
 
-    int parseHeader(unsigned char *in);
+    int parseHeader(uint8_t *in);
     int parseBody();
-    int parseBody(unsigned char *in, int bytes);
+    int parseBody(uint8_t *in, int bytes);
     
     int getHeaderSize()         { return _header_size; }; 
     int getTotalSize()          { return _total_size; }; 
@@ -305,27 +303,24 @@
 
     content_types_e getType()   { return _type; };
     
-    unsigned char *addPacketData(unsigned char *data, int bytes);
+    uint8_t *addPacketData(uint8_t *data, int bytes);
     std::map<std::string, amf_element_t *> *getElements() { return &_elements; 
};
-    unsigned char *appendPtr(unsigned char *data, unsigned char *var, int 
bytes) {
+    uint8_t *appendPtr(uint8_t *data, uint8_t *var, int bytes) {
       memcpy(data, var, bytes);
       return data += bytes;
     }
         
  private:
-
     astype_e extractElementHeader(void *in);
-
     int extractElementLength(void *in);
-
     content_types_e     _type;
     std::map<std::string, amf_element_t *> _elements;
     int                 _amf_index;
     int                 _header_size;
     int                 _total_size;
     int                 _packet_size;
-    unsigned char       *_amf_data;
-    unsigned char       *_seekptr;
+    uint8_t             *_amf_data;
+    uint8_t             *_seekptr;
     int                 _mystery_word;
     amfsource_e         _src_dest;
 };

Index: libamf/protocol.h
===================================================================
RCS file: /sources/gnash/gnash/libamf/protocol.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- libamf/protocol.h   1 Jul 2007 10:54:05 -0000       1.5
+++ libamf/protocol.h   15 Dec 2007 06:58:40 -0000      1.6
@@ -29,6 +29,7 @@
 #include "network.h"
 
 class Protocol : public gnash::Network {
+  typedef enum { RTMP, RTMPT, RTMPS, HTTP, HTTPS } protocol_type_e;  
 public:
     Protocol() { };
     virtual ~Protocol() { };

Index: libamf/rtmp.cpp
===================================================================
RCS file: /sources/gnash/gnash/libamf/rtmp.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- libamf/rtmp.cpp     1 Jul 2007 10:54:05 -0000       1.17
+++ libamf/rtmp.cpp     15 Dec 2007 06:58:40 -0000      1.18
@@ -17,11 +17,9 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: rtmp.cpp,v 1.17 2007/07/01 10:54:05 bjacques Exp $ */
-
-// #ifdef HAVE_CONFIG_H
-// #include "config.h"
-// #endif
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <iostream>
 
@@ -91,7 +89,7 @@
     } else {
         log_error (_("Handshake isn't correct; "
                     "Data read is: 0x%x"), *buffer);
-//        return false;
+        return false;
     }
     
     if (readNet(buffer, RTMP_BODY_SIZE) == RTMP_BODY_SIZE) {        
@@ -250,7 +248,7 @@
     //char *amfdata;
     unsigned int amf_index, headersize;
     AMF *amf=NULL;
-#if 0
+#if 1
     unsigned char hexint[512];
 #endif
     
@@ -288,18 +286,19 @@
     tmpptr += headersize;
     tmpptr = buffer;
     
-    while ((ret = readNet(reinterpret_cast<char *>(buffer), packetsize)) > 0) {
+    while ((ret = readNet(reinterpret_cast<char *>(buffer), packetsize, 1)) > 
0) {
         log_msg (_("Reading AMF packets till we're done..."));
         amf->addPacketData(tmpptr, ret);
-        tmpptr = buffer + 1;
+        tmpptr = buffer + ret;
         _inbytes += ret;
-#if 0
+#if 1
         hexify(hexint, buffer, packetsize, true);
         log_msg (_("The packet data is: 0x%s"), (char *)hexint);
         hexify(hexint, buffer, packetsize, false);
         log_msg (_("The packet data is: 0x%s"), (char *)hexint);
 #endif    
     }
+    
     log_msg (_("Done reading packet"));
     amf->parseBody();
     

Index: testsuite/libamf.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/libamf.all/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- testsuite/libamf.all/Makefile.am    10 Dec 2007 21:50:48 -0000      1.7
+++ testsuite/libamf.all/Makefile.am    15 Dec 2007 06:58:40 -0000      1.8
@@ -15,7 +15,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: Makefile.am,v 1.7 2007/12/10 21:50:48 strk Exp $
+# $Id: Makefile.am,v 1.8 2007/12/15 06:58:40 rsavoye Exp $
 
 AUTOMAKE_OPTIONS = dejagnu
 
@@ -48,16 +48,62 @@
 # AM_LDFLAGS  = $(OPENGL_LIBNS) $(SDL_LIBS)
 
 
-check_PROGRAMS = test_number test_string test_object test_variable
+check_PROGRAMS = \
+       test_number \
+       test_string \
+       test_object \
+       test_sol \
+       test_variable
+
+test_sol_SOURCES = test_sol.cpp
+test_sol_LDADD = $(AM_LDFLAGS)
+test_sol_DEPENDENCIES = $(solfiles)
+
 test_number_SOURCES = test_number.cpp
 test_number_LDADD = $(AM_LDFLAGS)
+
 test_string_SOURCES = test_string.cpp
 test_string_LDADD = $(AM_LDFLAGS)
+
 test_object_SOURCES = test_object.cpp
 test_object_LDADD = $(AM_LDFLAGS)
+
 test_variable_SOURCES = test_variable.cpp
 test_variable_LDADD = $(AM_LDFLAGS)
 
+# These are captured AMF object in binary form.
+AMFS = \
+       connect-object.amf \
+       number-variable.amf \
+       string-variable.amf \
+       connect-string.amf \
+       result-fail.amf \
+       f03f.amf \
+       result-success.amf
+
+SOLS = \
+       array.xml \
+       boolean.xml \
+       date.xml \
+       null.xml \
+       number.xml \
+       object.xml \
+       string.xml \
+       settings.xml \
+       test.xml \
+       undefined.xml \
+       xml.xml
+
+EXTRA_DIST = $(AMFS) $(SOLS)
+
+# solfiles := $(patsubst %.xml,%.sol,$(SOLS))
+
+CLEANFILES = $(solfiles)
+
+# solfiles: $(solfiles) 
+
+# this script converts between SOL Shared Objects and XML files. Very useful 
for testing.
+dist_noinst_SCRIPTS = s2x.py
 
 # Rebuild with GCC 4.x Mudflap support
 mudflap:
@@ -69,6 +115,13 @@
 
 TEST_DRIVERS = ../simple.exp
 
+SUFFIXES = .sol .xml
+
+# .sol.xml:
+#      $(PYTHON) $(srcdir)/s2x.py -x $< $@
+
+.xml.sol:
+       $(PYTHON) $(srcdir)/s2x.py -s $(srcdir)/xmlfiles/$< $@
 
 check-DEJAGNU: site-update $(TEST_CASES)
        @runtest=$(RUNTEST); \

Index: testsuite/libamf.all/test_number.cpp
===================================================================
RCS file: /sources/gnash/gnash/testsuite/libamf.all/test_number.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- testsuite/libamf.all/test_number.cpp        5 Sep 2007 02:15:40 -0000       
1.9
+++ testsuite/libamf.all/test_number.cpp        15 Dec 2007 06:58:41 -0000      
1.10
@@ -24,13 +24,15 @@
 //#include <netinet/in.h>
 #include <string>
 #include <sys/types.h>
+#include <sys/stat.h>
+
 extern "C"{
-        #include <unistd.h>
+#include <unistd.h>
 #ifdef HAVE_GETOPT_H
         #include <getopt.h>
 #endif
 #ifndef __GNUC__
-        extern int optind, getopt(int, char *const *, const char *);
+extern int optind, getopt(int, char *const *, const char *);
 #endif
 }
 #include <sys/types.h>
@@ -42,7 +44,6 @@
 
 #include "dejagnu.h"
 
-
 #include "amf.h"
 
 using namespace amf;
@@ -55,6 +56,9 @@
 
 static TestState runtest;
 
+bool test_amf();
+bool test_sol();
+
 int
 main(int argc, char *argv[])
 {
@@ -76,9 +80,63 @@
         }
     }
     
+    test_amf();
+    test_sol();
+}
+
+// Test SOL files. These are shared Objects which are basically an AMF object 
with
+// a header. These .sol files are used for transferring data, so we want to 
make
+// sure they actually work. All numeric data is stored in big endian format.
+bool
+test_sol()
+{
+    struct stat st;
+
+    string filespec = SRCDIR;
+    filespec += "/number.sol";
+    
+    if (stat(filespec.c_str(), &st) == 0) {
     AMF amf_obj;
     int fd, ret;
-    char buf[AMF_NUMBER_SIZE+1];
+        uint8_t *buf;
+        amfnum_t *num;
+        
+        buf = new uint8_t[st.st_size + 1];
+        
+        memset(buf, 0, st.st_size+1);
+        fd = open(filespec.c_str(), O_RDONLY);
+        ret = read(fd, buf, st.st_size);
+        close(fd);
+        
+        num = amf_obj.extractNumber(buf);
+        
+        if ((((char *)num)[6] == -16) && (((char *)num)[7] == 0x3f)) {
+            runtest.pass("Extracted Number SOL object");
+        } else {
+            runtest.fail("Extracted Number SOL object");
+        }
+        
+        void *out = amf_obj.encodeNumber(*num);
+        
+        if (memcmp(out, buf, 9) == 0) {
+            runtest.pass("Encoded SOL Number");
+        } else {
+            runtest.fail("Encoded SOL Number");
+        }
+        delete num;
+        return true;
+    }
+    
+    runtest.untested("testfile not found");
+    return false;
+}
+
+bool
+test_amf()
+{
+    AMF amf_obj;
+    int fd, ret;
+    uint8_t buf[AMF_NUMBER_SIZE+1];
     amfnum_t *num;
     
     memset(buf, 0, AMF_NUMBER_SIZE+1);
@@ -103,9 +161,9 @@
     } else {
         runtest.fail("Encoded AMF Number");
     }
-
     delete num;
 }
+
 static void
 usage (void)
 {

Index: testsuite/libamf.all/test_object.cpp
===================================================================
RCS file: /sources/gnash/gnash/testsuite/libamf.all/test_object.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- testsuite/libamf.all/test_object.cpp        5 Sep 2007 02:15:41 -0000       
1.9
+++ testsuite/libamf.all/test_object.cpp        15 Dec 2007 06:58:41 -0000      
1.10
@@ -23,12 +23,12 @@
 
 #include <sys/types.h>
 extern "C"{
-        #include <unistd.h>
+#include <unistd.h>
 #ifdef HAVE_GETOPT_H
-        #include <getopt.h>
+#include <getopt.h>
 #endif
 #ifndef __GNUC__
-        extern int optind, getopt(int, char *const *, const char *);
+extern int optind, getopt(int, char *const *, const char *);
 #endif
 }
 #include <sys/types.h>
@@ -154,15 +154,15 @@
     // This extracts a "connect" message from the RTMP data stream. We
     // look for everything ourselves to be the most accurate.
     tmpptr = buf  + amf_obj.getHeaderSize();
-    char *str = amf_obj.extractString(tmpptr);
-    if (strcmp(str, "connect") == 0) {
+    int8_t *str = amf_obj.extractString(tmpptr);
+    if (strcmp(reinterpret_cast<const char *>(str), "connect") == 0) {
         runtest.pass("Extracted \"connect\" string");
     } else {
         runtest.fail("Extracted \"connect\" string");
     }
     
-    tmpptr += strlen(str) + AMF_HEADER_SIZE;    
-    amfnum_t *num = amf_obj.extractNumber((char *)tmpptr);
+    tmpptr += strlen(reinterpret_cast<const char *>(str)) + AMF_HEADER_SIZE;   
 
+    amfnum_t *num = amf_obj.extractNumber(tmpptr);
     char     *numptr = (char *)num;
     if ((numptr[6] == -16)
         && (numptr[7] == 0x3f)) {
@@ -312,7 +312,7 @@
     unsigned char *var;
 
     var = (unsigned char *)rtmp.encodeString("connect");
-    char* c_out = rtmp.extractString(var);
+    int8_t *c_out = rtmp.extractString(var);
     if ( ! c_out )
     {
         runtest.fail("Encoded \"connect\" string could not be extracted");
@@ -320,7 +320,7 @@
     else
     {
         std::string s_in("connect");
-        std::string s_out(c_out);
+        std::string s_out(reinterpret_cast<const char *>(c_out));
 
         if (s_in == s_out) {
             runtest.pass("Encoded \"connect\" string");
@@ -335,7 +335,7 @@
     amfnum_t bignum = 0x3ff0000000000000LL;
     numptr = (char *)&bignum;
     var = (unsigned char *)rtmp.encodeNumber(bignum);
-    if (*rtmp.extractNumber((char *)var) == bignum) {
+    if (*rtmp.extractNumber(var) == bignum) {
         runtest.pass("Encoded \"connect\" number");
     } else {
         runtest.fail("Encoded \"connect\" number");

Index: testsuite/libamf.all/test_string.cpp
===================================================================
RCS file: /sources/gnash/gnash/testsuite/libamf.all/test_string.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- testsuite/libamf.all/test_string.cpp        5 Sep 2007 02:15:41 -0000       
1.10
+++ testsuite/libamf.all/test_string.cpp        15 Dec 2007 06:58:41 -0000      
1.11
@@ -36,10 +36,12 @@
 #include <fcntl.h>
 
 #include "dejagnu.h"
+#include "log.h"
 #include "amf.h"
 
 using namespace amf;
 using namespace std;
+using namespace gnash;
 
 static void usage (void);
 
@@ -47,6 +49,8 @@
 
 static TestState runtest;
 
+LogFile& dbglogfile = LogFile::getDefaultInstance();
+
 int
 main(int argc, char *argv[])
 {
@@ -62,7 +66,7 @@
             break;
             
           case 'v':
-            verbosity++;
+              dbglogfile.setVerbosity();
             break;
             
           default:
@@ -79,7 +83,7 @@
 
     AMF amf_obj;
     int fd, ret;
-    byte buf[AMF_VIDEO_PACKET_SIZE+1];
+    uint8_t buf[AMF_VIDEO_PACKET_SIZE+1];
 
     // First see if we can read strings. This file is produced by
     // using a network packet sniffer, and should be binary correct.
@@ -91,8 +95,8 @@
     close(fd);
 
     char *connect = "connect";
-    char *str = amf_obj.extractString(buf);
-    if (strcmp(str, connect) == 0) {
+    int8_t *str = amf_obj.extractString(buf);
+    if (memcmp(str, connect, strlen(connect)) == 0) {
         runtest.pass("Extracted \"connect\" string");
     } else {
         runtest.fail("Extracted \"connect\" string");

Index: testsuite/libamf.all/array.sol
===================================================================
RCS file: testsuite/libamf.all/array.sol
diff -N testsuite/libamf.all/array.sol
Binary files /dev/null and /tmp/cvsq4mQ2x differ

Index: testsuite/libamf.all/boolean.sol
===================================================================
RCS file: testsuite/libamf.all/boolean.sol
diff -N testsuite/libamf.all/boolean.sol
Binary files /dev/null and /tmp/cvsZb94wy differ

Index: testsuite/libamf.all/date.sol
===================================================================
RCS file: testsuite/libamf.all/date.sol
diff -N testsuite/libamf.all/date.sol
Binary files /dev/null and /tmp/cvsDH7MNy differ

Index: testsuite/libamf.all/null.sol
===================================================================
RCS file: testsuite/libamf.all/null.sol
diff -N testsuite/libamf.all/null.sol
Binary files /dev/null and /tmp/cvsIUZAJw differ

Index: testsuite/libamf.all/number.sol
===================================================================
RCS file: testsuite/libamf.all/number.sol
diff -N testsuite/libamf.all/number.sol
Binary files /dev/null and /tmp/cvs9MDLZw differ

Index: testsuite/libamf.all/object.sol
===================================================================
RCS file: testsuite/libamf.all/object.sol
diff -N testsuite/libamf.all/object.sol
Binary files /dev/null and /tmp/cvscKH7hx differ

Index: testsuite/libamf.all/settings.sol
===================================================================
RCS file: testsuite/libamf.all/settings.sol
diff -N testsuite/libamf.all/settings.sol
Binary files /dev/null and /tmp/cvsJyTocA differ

Index: testsuite/libamf.all/string.sol
===================================================================
RCS file: testsuite/libamf.all/string.sol
diff -N testsuite/libamf.all/string.sol
Binary files /dev/null and /tmp/cvsuM8PsA differ

Index: testsuite/libamf.all/test.sol
===================================================================
RCS file: testsuite/libamf.all/test.sol
diff -N testsuite/libamf.all/test.sol
Binary files /dev/null and /tmp/cvs7PfVJA differ

Index: testsuite/libamf.all/undefined.sol
===================================================================
RCS file: testsuite/libamf.all/undefined.sol
diff -N testsuite/libamf.all/undefined.sol
Binary files /dev/null and /tmp/cvsUA2p0A differ

Index: testsuite/libamf.all/xml.sol
===================================================================
RCS file: testsuite/libamf.all/xml.sol
diff -N testsuite/libamf.all/xml.sol
Binary files /dev/null and /tmp/cvssns97y differ

Index: testsuite/libamf.all/xmlfiles/array.xml
===================================================================
RCS file: testsuite/libamf.all/xmlfiles/array.xml
diff -N testsuite/libamf.all/xmlfiles/array.xml
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/libamf.all/xmlfiles/array.xml     15 Dec 2007 06:58:42 -0000      
1.1
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<solx sol_name="array2" std_author="iceeLyne" std_version="0.75">
+       <data length="2" name="TestArray" type="array">
+               <data name="element-zero" type="number" value="0.0"/>
+               <data name="element-one" type="number" value="1.0"/>
+       </data>
+</solx>

Index: testsuite/libamf.all/xmlfiles/boolean.xml
===================================================================
RCS file: testsuite/libamf.all/xmlfiles/boolean.xml
diff -N testsuite/libamf.all/xmlfiles/boolean.xml
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/libamf.all/xmlfiles/boolean.xml   15 Dec 2007 06:58:42 -0000      
1.1
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<solx sol_name="boolean" std_author="iceeLyne" std_version="0.75">
+       <data name="TestBoolean" type="boolean" value="true"/>
+</solx>

Index: testsuite/libamf.all/xmlfiles/date.xml
===================================================================
RCS file: testsuite/libamf.all/xmlfiles/date.xml
diff -N testsuite/libamf.all/xmlfiles/date.xml
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/libamf.all/xmlfiles/date.xml      15 Dec 2007 06:58:42 -0000      
1.1
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<solx sol_name="date" std_author="iceeLyne" std_version="0.75">
+       <!--DateObject:Milliseconds Count From Dec. 1, 1969; Timezone UTC + 
Offset.-->
+       <data msec="1.197635557e+12" name="TestDate" type="date" 
utcoffset="-7"/>
+</solx>

Index: testsuite/libamf.all/xmlfiles/null.xml
===================================================================
RCS file: testsuite/libamf.all/xmlfiles/null.xml
diff -N testsuite/libamf.all/xmlfiles/null.xml
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/libamf.all/xmlfiles/null.xml      15 Dec 2007 06:58:42 -0000      
1.1
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<solx sol_name="null" std_author="iceeLyne" std_version="0.75">
+       <data name="TestNull" type="null"/>
+</solx>

Index: testsuite/libamf.all/xmlfiles/number.xml
===================================================================
RCS file: testsuite/libamf.all/xmlfiles/number.xml
diff -N testsuite/libamf.all/xmlfiles/number.xml
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/libamf.all/xmlfiles/number.xml    15 Dec 2007 06:58:42 -0000      
1.1
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<solx sol_name="number" std_author="iceeLyne" std_version="0.75">
+       <data name="TestNumber" type="number" value="1234.0"/>
+</solx>

Index: testsuite/libamf.all/xmlfiles/object.xml
===================================================================
RCS file: testsuite/libamf.all/xmlfiles/object.xml
diff -N testsuite/libamf.all/xmlfiles/object.xml
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/libamf.all/xmlfiles/object.xml    15 Dec 2007 06:58:42 -0000      
1.1
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<solx sol_name="object2" std_author="iceeLyne" std_version="0.75">
+       <data name="TestObject" type="object">
+               <!--DateObject:Milliseconds Count From Dec. 1, 1969; Timezone 
UTC + Offset.-->
+               <data msec="1.197635731e+12" name="TestDateObject" type="date" 
utcoffset="-7"/>
+       </data>
+</solx>

Index: testsuite/libamf.all/xmlfiles/settings.xml
===================================================================
RCS file: testsuite/libamf.all/xmlfiles/settings.xml
diff -N testsuite/libamf.all/xmlfiles/settings.xml
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/libamf.all/xmlfiles/settings.xml  15 Dec 2007 06:58:42 -0000      
1.1
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<solx sol_name="settings" std_author="iceeLyne" std_version="0.75">
+       <data name="gain" type="number" value="50.0"/>
+       <data name="echosuppression" type="boolean" value="false"/>
+       <data name="defaultmicrophone" type="string">
+<![CDATA[/dev/input/mic]]>     </data>
+       <data name="defaultcamera" type="string">
+<![CDATA[]]>   </data>
+       <data name="defaultklimit" type="number" value="100.0"/>
+       <data name="defaultalways" type="boolean" value="false"/>
+       <data name="crossdomainAllow" type="boolean" value="true"/>
+       <data name="crossdomainAlways" type="boolean" value="true"/>
+       <data name="allowThirdPartyLSOAccess" type="boolean" value="true"/>
+       <data name="trustedPaths" type="object"/>
+       <data name="localSecPath" type="string">
+<![CDATA[]]>   </data>
+       <data name="localSecPathTime" type="number" value="1.19751160683e+12"/>
+</solx>

Index: testsuite/libamf.all/xmlfiles/string.xml
===================================================================
RCS file: testsuite/libamf.all/xmlfiles/string.xml
diff -N testsuite/libamf.all/xmlfiles/string.xml
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/libamf.all/xmlfiles/string.xml    15 Dec 2007 06:58:42 -0000      
1.1
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<solx sol_name="string" std_author="iceeLyne" std_version="0.75">
+       <data name="TestString" type="string">
+<![CDATA[testing, 1-2-3, testing]]>    </data>
+</solx>

Index: testsuite/libamf.all/xmlfiles/test.xml
===================================================================
RCS file: testsuite/libamf.all/xmlfiles/test.xml
diff -N testsuite/libamf.all/xmlfiles/test.xml
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/libamf.all/xmlfiles/test.xml      15 Dec 2007 06:58:43 -0000      
1.1
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<solx sol_name="test" std_author="iceeLyne" std_version="0.75">
+       <data name="New Item" type="string">
+<![CDATA[test]]>       </data>
+</solx>

Index: testsuite/libamf.all/xmlfiles/undefined.xml
===================================================================
RCS file: testsuite/libamf.all/xmlfiles/undefined.xml
diff -N testsuite/libamf.all/xmlfiles/undefined.xml
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/libamf.all/xmlfiles/undefined.xml 15 Dec 2007 06:58:43 -0000      
1.1
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<solx sol_name="undefined" std_author="iceeLyne" std_version="0.75">
+       <data name="TestUndefined" type="undefined"/>
+</solx>

Index: testsuite/libamf.all/xmlfiles/xml.xml
===================================================================
RCS file: testsuite/libamf.all/xmlfiles/xml.xml
diff -N testsuite/libamf.all/xmlfiles/xml.xml
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/libamf.all/xmlfiles/xml.xml       15 Dec 2007 06:58:43 -0000      
1.1
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<solx sol_name="xml" std_author="iceeLyne" std_version="0.75">
+       <data name="TestXML" type="xml">
+<![CDATA[<foo>test</foo>]]>    </data>
+</solx>




reply via email to

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