flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject [08/13] git commit: Added advanced-telemetry as a valid option
Date Fri, 12 Apr 2013 08:29:23 GMT
Added advanced-telemetry as a valid option


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/4385498f
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/4385498f
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/4385498f

Branch: refs/heads/develop
Commit: 4385498f0d549cefbac1cfa6e311b5d43a7b3cd8
Parents: 822b3b2
Author: Justin Mclean <jmclean@apache.org>
Authored: Fri Apr 12 18:17:28 2013 +1000
Committer: Justin Mclean <jmclean@apache.org>
Committed: Fri Apr 12 18:17:28 2013 +1000

----------------------------------------------------------------------
 modules/swfutils/src/java/flash/swf/Movie.java     |    6 ++++++
 .../swfutils/src/java/flash/swf/MovieDecoder.java  |    9 +++++++++
 .../swfutils/src/java/flash/swf/MovieEncoder.java  |    5 +++++
 .../swfutils/src/java/flash/swf/TagDecoder.java    |   12 ++++++++++++
 .../swfutils/src/java/flash/swf/TagEncoder.java    |    8 ++++++++
 .../src/java/flash/swf/TagEncoderReporter.java     |    7 +++++++
 .../swfutils/src/java/flash/swf/TagHandler.java    |    4 ++++
 modules/swfutils/src/java/flash/swf/TagValues.java |    5 +++++
 8 files changed, 56 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4385498f/modules/swfutils/src/java/flash/swf/Movie.java
----------------------------------------------------------------------
diff --git a/modules/swfutils/src/java/flash/swf/Movie.java b/modules/swfutils/src/java/flash/swf/Movie.java
index 5c75bf8..0eb25df 100644
--- a/modules/swfutils/src/java/flash/swf/Movie.java
+++ b/modules/swfutils/src/java/flash/swf/Movie.java
@@ -24,6 +24,7 @@ import flash.swf.tags.GenericTag;
 import flash.swf.tags.ScriptLimits;
 import flash.swf.tags.SetBackgroundColor;
 import flash.swf.tags.FileAttributes;
+import flash.swf.tags.EnableTelemetry;
 import flash.swf.tags.ProductInfo;
 import flash.swf.tags.Metadata;
 import flash.swf.tags.DefineSceneAndFrameLabelData;
@@ -86,6 +87,11 @@ public class Movie
 	 * FileAttributes defines whole-SWF attributes (SWF 8 or later)
 	 */
 	public FileAttributes fileAttributes;
+	
+	/**
+	 * EnableTelemetry defines if advanced telemetry is on or off
+	 */
+	public EnableTelemetry enableTelemetry;
 
 	/**
 	 * if present, player will attach to a debugger

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4385498f/modules/swfutils/src/java/flash/swf/MovieDecoder.java
----------------------------------------------------------------------
diff --git a/modules/swfutils/src/java/flash/swf/MovieDecoder.java b/modules/swfutils/src/java/flash/swf/MovieDecoder.java
index 93c6f32..f28ae19 100644
--- a/modules/swfutils/src/java/flash/swf/MovieDecoder.java
+++ b/modules/swfutils/src/java/flash/swf/MovieDecoder.java
@@ -264,6 +264,15 @@ public class MovieDecoder extends TagHandler
 		}
 		m.fileAttributes = tag;
 	}
+    
+    public void enableTelemetry(EnableTelemetry tag)
+	{
+		if (m.enableTelemetry != null)
+		{
+			error("duplicate EnableTelemetry");
+		}
+		m.enableTelemetry = tag;
+	}
 
 	public void defineButtonCxform(DefineButtonCxform tag)
 	{

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4385498f/modules/swfutils/src/java/flash/swf/MovieEncoder.java
----------------------------------------------------------------------
diff --git a/modules/swfutils/src/java/flash/swf/MovieEncoder.java b/modules/swfutils/src/java/flash/swf/MovieEncoder.java
index 344035b..77ec414 100644
--- a/modules/swfutils/src/java/flash/swf/MovieEncoder.java
+++ b/modules/swfutils/src/java/flash/swf/MovieEncoder.java
@@ -79,6 +79,11 @@ public class MovieEncoder
 
             m.fileAttributes.visit(handler); // FileAttributes MUST be first tag after header!
 		}
+        
+		if (m.enableTelemetry != null)
+		{
+            m.enableTelemetry.visit(handler);
+		}
         if (m.metadata != null)
         {
             m.metadata.visit(handler);

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4385498f/modules/swfutils/src/java/flash/swf/TagDecoder.java
----------------------------------------------------------------------
diff --git a/modules/swfutils/src/java/flash/swf/TagDecoder.java b/modules/swfutils/src/java/flash/swf/TagDecoder.java
index 05e6a0e..ceb6dd2 100644
--- a/modules/swfutils/src/java/flash/swf/TagDecoder.java
+++ b/modules/swfutils/src/java/flash/swf/TagDecoder.java
@@ -381,6 +381,9 @@ public final class TagDecoder
         case stagFileAttributes:
             t = decodeFileAttributes();
             break;
+        case stagEnableTelemetry:
+            t = decodeEnableTelemetry();
+            break;
         case stagDefineFontAlignZones:
             t = decodeDefineFontAlignZones();
             break;
@@ -2798,6 +2801,15 @@ public final class TagDecoder
         r.readUBits(24); //reserved
         return tag;
     }
+    
+    public Tag decodeEnableTelemetry() throws IOException
+    {
+    	EnableTelemetry tag = new EnableTelemetry();
+        r.syncBits();
+        r.readUBits(16); //reserved
+        tag.enabled = true;
+        return tag;
+    }
 
     public Tag decodeDefineFontAlignZones() throws IOException
     {

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4385498f/modules/swfutils/src/java/flash/swf/TagEncoder.java
----------------------------------------------------------------------
diff --git a/modules/swfutils/src/java/flash/swf/TagEncoder.java b/modules/swfutils/src/java/flash/swf/TagEncoder.java
index 9abebee..4652ed1 100644
--- a/modules/swfutils/src/java/flash/swf/TagEncoder.java
+++ b/modules/swfutils/src/java/flash/swf/TagEncoder.java
@@ -117,6 +117,14 @@ public class TagEncoder extends TagHandler
         tagw.writeUBits(0, 24);
         encodeTag(tag);
     }
+    
+    public void enableTelemetry(EnableTelemetry tag)
+    {
+    	if (tag.enabled) {
+	        tagw.writeUBits(0, 16); //reserved
+	        encodeTag(tag);
+    	}
+    }
 
     public void metadata(Metadata tag)
     {

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4385498f/modules/swfutils/src/java/flash/swf/TagEncoderReporter.java
----------------------------------------------------------------------
diff --git a/modules/swfutils/src/java/flash/swf/TagEncoderReporter.java b/modules/swfutils/src/java/flash/swf/TagEncoderReporter.java
index 1625f80..d3a8641 100644
--- a/modules/swfutils/src/java/flash/swf/TagEncoderReporter.java
+++ b/modules/swfutils/src/java/flash/swf/TagEncoderReporter.java
@@ -67,6 +67,13 @@ public class TagEncoderReporter extends TagEncoder
         report.endEntry(SizeReport.HEADER_DATA, writer.getPos());
     }
     
+    public void enableTelemetry(EnableTelemetry tag)
+    {
+        report.startEntry(SizeReport.HEADER_DATA, writer.getPos(), -1, "enableTelemetry");
+        super.enableTelemetry(tag);
+        report.endEntry(SizeReport.HEADER_DATA, writer.getPos());
+    }
+    
     public void enableDebugger(EnableDebugger tag)
     {
         report.startEntry(SizeReport.HEADER_DATA, writer.getPos(), -1, "enableDebugger");

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4385498f/modules/swfutils/src/java/flash/swf/TagHandler.java
----------------------------------------------------------------------
diff --git a/modules/swfutils/src/java/flash/swf/TagHandler.java b/modules/swfutils/src/java/flash/swf/TagHandler.java
index bcc9225..1074666 100644
--- a/modules/swfutils/src/java/flash/swf/TagHandler.java
+++ b/modules/swfutils/src/java/flash/swf/TagHandler.java
@@ -44,6 +44,10 @@ public class TagHandler
     {
     }
 
+    public void enableTelemetry(EnableTelemetry tag)
+    {
+    }
+    
     public void metadata(Metadata tag)
     {
     }

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4385498f/modules/swfutils/src/java/flash/swf/TagValues.java
----------------------------------------------------------------------
diff --git a/modules/swfutils/src/java/flash/swf/TagValues.java b/modules/swfutils/src/java/flash/swf/TagValues.java
index 1f4aad7..c6f4054 100644
--- a/modules/swfutils/src/java/flash/swf/TagValues.java
+++ b/modules/swfutils/src/java/flash/swf/TagValues.java
@@ -132,6 +132,7 @@ public interface TagValues
 	int stagFileAttributes			= 69;	// FileAttributes defines whole-SWF attributes
 											// (must be the FIRST tag after the SWF header)
 
+	
 	int stagPlaceObject3			= 70;	// includes optional surface filter list for object
 	int stagImportAssets2			= 71;   // import assets into this swf file using the SHA-1 digest
to
 											// enable cached cross domain RSL downloads.
@@ -158,6 +159,8 @@ public interface TagValues
 	int stagDefineFont4             = 91;   // new in 10, embedded cff fonts
     // NOTE: If tag values exceed 255 we need to expand SCharacter::tagCode from a BYTE to
a WORD
 
+	int stagEnableTelemetry			= 93;	// advanced telemetry
+	
 	String[] names = {
 		"End",					// 00
 		"ShowFrame",			// 01
@@ -275,6 +278,8 @@ public interface TagValues
         "89 (unknown)  ",       // 89
         "90 (unknown)  ",       // 90
         "DefineFont4",          // 91
+        "92 (unknown)",         // 92
+        "EnableTelemetry",      // 93
         "(invalid)"             // end 
     };
 }


Mime
View raw message