gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r10648: Test and minor fix to MovieC


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r10648: Test and minor fix to MovieClip.meth (can be used with any object).
Date: Tue, 03 Mar 2009 17:26:50 +0100
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 10648
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Tue 2009-03-03 17:26:50 +0100
message:
  Test and minor fix to MovieClip.meth (can be used with any object).
  
  Drop typo function definition.
  
  Log names of codecs.
modified:
  libcore/MovieClip.cpp
  libmedia/MediaParser.cpp
  libmedia/gst/VideoDecoderGst.cpp
  testsuite/actionscript.all/MovieClip.as
=== modified file 'libcore/MovieClip.cpp'
--- a/libcore/MovieClip.cpp     2009-03-03 10:27:33 +0000
+++ b/libcore/MovieClip.cpp     2009-03-03 16:26:50 +0000
@@ -65,7 +65,6 @@
 
 #include <vector>
 #include <string>
-#include <cmath>
 #include <algorithm> // for std::swap
 #include <boost/algorithm/string/case_conv.hpp>
 #include <boost/lexical_cast.hpp>
@@ -152,7 +151,6 @@
     as_value movieclip_meth(const fn_call& fn);
     as_value movieclip_getSWFVersion(const fn_call& fn);
     as_value movieclip_loadVariables(const fn_call& fn);
-    as_value movieclip_(const fn_call& fn);
 
 }
 
@@ -4036,8 +4034,6 @@
 as_value
 movieclip_meth(const fn_call& fn)
 {
-    boost::intrusive_ptr<MovieClip> movieclip =
-            ensureType<MovieClip>(fn.this_ptr);
 
     if (!fn.nargs) return as_value(MovieClip::METHOD_NONE); 
 

=== modified file 'libmedia/MediaParser.cpp'
--- a/libmedia/MediaParser.cpp  2009-01-25 11:53:43 +0000
+++ b/libmedia/MediaParser.cpp  2009-03-03 16:26:50 +0000
@@ -395,67 +395,67 @@
 std::ostream&
 operator<< (std::ostream& os, const videoCodecType& t)
 {
-        switch (t)
-        {
-                case VIDEO_CODEC_H263:
-                        os << "H263";
-                        break;
-                case VIDEO_CODEC_SCREENVIDEO:
-                        os << "Screenvideo";
-                        break;
-                case VIDEO_CODEC_VP6:
-                        os << "VP6";
-                        break;
-                case VIDEO_CODEC_VP6A:
-                        os << "VP6A";
-                        break;
-                case VIDEO_CODEC_SCREENVIDEO2:
-                        os << "Screenvideo2";
-                        break;
-                case VIDEO_CODEC_H264:
-                        os << "H264";
-                        break;
-                default:
-                        os << "unknown/invalid";
-                        break;
-        }
-        return os;
+    switch (t)
+    {
+        case VIDEO_CODEC_H263:
+            os << "H263";
+            break;
+        case VIDEO_CODEC_SCREENVIDEO:
+            os << "Screenvideo";
+            break;
+        case VIDEO_CODEC_VP6:
+            os << "VP6";
+            break;
+        case VIDEO_CODEC_VP6A:
+            os << "VP6A";
+            break;
+        case VIDEO_CODEC_SCREENVIDEO2:
+            os << "Screenvideo2";
+            break;
+        case VIDEO_CODEC_H264:
+            os << "H264";
+            break;
+        default:
+            os << "unknown/invalid";
+            break;
+    }
+    return os;
 }
 
 std::ostream&
 operator<< (std::ostream& os, const audioCodecType& t)
 {
-        switch (t)
-        {
-                case AUDIO_CODEC_RAW:
-                        os << "Raw";
-                        break;
-                case AUDIO_CODEC_ADPCM:
-                        os << "ADPCM";
-                        break;
-                case AUDIO_CODEC_MP3:
-                        os << "MP3";
-                        break;
-                case AUDIO_CODEC_UNCOMPRESSED:
-                        os << "Uncompressed";
-                        break;
-                case AUDIO_CODEC_NELLYMOSER_8HZ_MONO:
-                        os << "Nellymoser 8Hz mono";
-                        break;
-                case AUDIO_CODEC_NELLYMOSER:
-                        os << "Nellymoser";
-                        break;
-                case AUDIO_CODEC_AAC:
-                        os << "Advanced Audio Coding";
-                        break;
-               case AUDIO_CODEC_SPEEX:
-                       os << "Speex";
-                       break;
-                default:
-                        os << "unknown/invalid";
-                        break;
-        }
-        return os;
+    switch (t)
+    {
+        case AUDIO_CODEC_RAW:
+            os << "Raw";
+            break;
+        case AUDIO_CODEC_ADPCM:
+            os << "ADPCM";
+            break;
+        case AUDIO_CODEC_MP3:
+            os << "MP3";
+            break;
+        case AUDIO_CODEC_UNCOMPRESSED:
+            os << "Uncompressed";
+            break;
+        case AUDIO_CODEC_NELLYMOSER_8HZ_MONO:
+            os << "Nellymoser 8Hz mono";
+            break;
+        case AUDIO_CODEC_NELLYMOSER:
+            os << "Nellymoser";
+            break;
+        case AUDIO_CODEC_AAC:
+            os << "Advanced Audio Coding";
+            break;
+        case AUDIO_CODEC_SPEEX:
+            os << "Speex";
+            break;
+        default:
+            os << "unknown/invalid";
+            break;
+    }
+    return os;
 }
 
 } // end of gnash::media namespace

=== modified file 'libmedia/gst/VideoDecoderGst.cpp'
--- a/libmedia/gst/VideoDecoderGst.cpp  2009-02-25 22:33:03 +0000
+++ b/libmedia/gst/VideoDecoderGst.cpp  2009-03-03 16:26:50 +0000
@@ -97,7 +97,8 @@
       throw MediaException(_("Video codec is zero.  Streaming video expected 
later."));
       break;
     default:
-      boost::format msg = boost::format(_("No support for video codec %d.")) % 
(int)codec_type;
+      boost::format msg = boost::format(_("No support for video codec %s.")) %
+          codec_type;
       throw MediaException(msg.str());
 
       return;

=== modified file 'testsuite/actionscript.all/MovieClip.as'
--- a/testsuite/actionscript.all/MovieClip.as   2009-03-03 10:27:33 +0000
+++ b/testsuite/actionscript.all/MovieClip.as   2009-03-03 16:26:50 +0000
@@ -111,19 +111,19 @@
 endOfTest = function() 
 {
 #if OUTPUT_VERSION <= 5
-       check_totals(332); // SWF5
+       check_totals(334); // SWF5
 #endif
 
 #if OUTPUT_VERSION == 6
-       check_totals(889); // SWF6
+       check_totals(891); // SWF6
 #endif
 
 #if OUTPUT_VERSION == 7
-       check_totals(906); // SWF7
+       check_totals(908); // SWF7
 #endif
 
 #if OUTPUT_VERSION >= 8
-       check_totals(998); // SWF8+
+       check_totals(1000); // SWF8+
 #endif
 
        play();
@@ -2304,9 +2304,15 @@
 
 // Can't rely on this to call onData!
 
+//------------------------------------------
 // Check MovieClip methods on other objects.
+//------------------------------------------
+
+o = {};
+
+// getSWFVersion()
+
 check_equals(_root.getSWFVersion(), OUTPUT_VERSION);
-o = {};
 o.getSWFVersion = MovieClip.prototype.getSWFVersion;
 xcheck_equals(o.getSWFVersion(), -1);
 createTextField("t1", 3, 0, 100, 100, 100);
@@ -2319,5 +2325,9 @@
 _level0.t1.getSWFVersion = MovieClip.prototype.getSWFVersion;
 xcheck_equals(_level0.t1.getSWFVersion(), OUTPUT_VERSION);
 
+o.meth = MovieClip.prototype.meth;
+check_equals(o.meth("post"), 2);
+check_equals(o.meth(), 0);
+
 
 //endOfTest();


reply via email to

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