[Swfdec] 7 commits - libswfdec/Makefile.am libswfdec/swfdec_as_string.c libswfdec/swfdec_as_string.h libswfdec/swfdec_as_strings.c libswfdec/swfdec.h libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_system_as.c libswfdec/swfdec_system.c libswfdec/swfdec_system.h

Benjamin Otte company at kemper.freedesktop.org
Mon Aug 27 05:43:03 PDT 2007


 libswfdec/Makefile.am              |    3 
 libswfdec/swfdec.h                 |    1 
 libswfdec/swfdec_as_string.c       |   30 ++-
 libswfdec/swfdec_as_string.h       |    5 
 libswfdec/swfdec_as_strings.c      |   28 +++
 libswfdec/swfdec_initialize.as     |    8 +
 libswfdec/swfdec_initialize.h      |  201 +++++++++++++------------
 libswfdec/swfdec_player.c          |   22 ++
 libswfdec/swfdec_player_internal.h |    2 
 libswfdec/swfdec_system.c          |  290 +++++++++++++++++++++++++++++++++++++
 libswfdec/swfdec_system.h          |   72 +++++++++
 libswfdec/swfdec_system_as.c       |  289 ++++++++++++++++++++++++++++++++++++
 12 files changed, 844 insertions(+), 107 deletions(-)

New commits:
diff-tree d95752f198414d2bab969c5e02c0338d1b87570c (from c5ea16abb5020e7d1a55719a1847ad047a066cdb)
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Aug 27 14:36:48 2007 +0200

    implement System.capabilities.Query()

diff --git a/libswfdec/swfdec_as_strings.c b/libswfdec/swfdec_as_strings.c
index 04b0790..661cfd0 100644
--- a/libswfdec/swfdec_as_strings.c
+++ b/libswfdec/swfdec_as_strings.c
@@ -254,6 +254,34 @@ const char swfdec_as_strings[] = 
   SWFDEC_AS_CONSTANT_STRING ("_bytesTotal")
   SWFDEC_AS_CONSTANT_STRING ("loaded")
   SWFDEC_AS_CONSTANT_STRING ("lastIndexOf")
+  SWFDEC_AS_CONSTANT_STRING ("hasAudio")
+  SWFDEC_AS_CONSTANT_STRING ("hasStreamingAudio")
+  SWFDEC_AS_CONSTANT_STRING ("hasStreamingVideo")
+  SWFDEC_AS_CONSTANT_STRING ("hasEmbeddedVideo")
+  SWFDEC_AS_CONSTANT_STRING ("hasMP3")
+  SWFDEC_AS_CONSTANT_STRING ("hasAudioEncoder")
+  SWFDEC_AS_CONSTANT_STRING ("hasVideoEncoder")
+  SWFDEC_AS_CONSTANT_STRING ("hasAccessibility")
+  SWFDEC_AS_CONSTANT_STRING ("hasPrinting")
+  SWFDEC_AS_CONSTANT_STRING ("hasScreenPlayback")
+  SWFDEC_AS_CONSTANT_STRING ("hasScreenBroadcast")
+  SWFDEC_AS_CONSTANT_STRING ("isDebugger")
+  SWFDEC_AS_CONSTANT_STRING ("version")
+  SWFDEC_AS_CONSTANT_STRING ("manufacturer")
+  SWFDEC_AS_CONSTANT_STRING ("screenResolutionX")
+  SWFDEC_AS_CONSTANT_STRING ("screenResolutionY")
+  SWFDEC_AS_CONSTANT_STRING ("screenDPI")
+  SWFDEC_AS_CONSTANT_STRING ("screenColor")
+  SWFDEC_AS_CONSTANT_STRING ("pixelAspectRatio")
+  SWFDEC_AS_CONSTANT_STRING ("os")
+  SWFDEC_AS_CONSTANT_STRING ("language")
+  SWFDEC_AS_CONSTANT_STRING ("hasIME")
+  SWFDEC_AS_CONSTANT_STRING ("playerType")
+  SWFDEC_AS_CONSTANT_STRING ("avHardwareDisable")
+  SWFDEC_AS_CONSTANT_STRING ("localFileReadDisable")
+  SWFDEC_AS_CONSTANT_STRING ("windowlessDisable")
+  SWFDEC_AS_CONSTANT_STRING ("hasTLS")
+  SWFDEC_AS_CONSTANT_STRING ("serverString")
   /* add more here */
 ;
 
diff --git a/libswfdec/swfdec_system_as.c b/libswfdec/swfdec_system_as.c
index b921f89..f9e4e5b 100644
--- a/libswfdec/swfdec_system_as.c
+++ b/libswfdec/swfdec_system_as.c
@@ -22,13 +22,268 @@
 #endif
 
 #include "swfdec.h"
+#include "swfdec_as_string.h"
 #include "swfdec_as_strings.h"
+#include "swfdec_codec_audio.h"
+#include "swfdec_debug.h"
 #include "swfdec_player_internal.h"
 
+static void
+swfdec_system_has_audio (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  /* FIXME: allow setting this? */
+  SWFDEC_AS_VALUE_SET_BOOLEAN (ret, TRUE);
+}
+
+static void
+swfdec_system_has_streaming_audio (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_BOOLEAN (ret, TRUE);
+}
+
+static void
+swfdec_system_has_streaming_video (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  /* FIXME: check if video decoders got compiled in? */
+  SWFDEC_AS_VALUE_SET_BOOLEAN (ret, TRUE);
+}
+
+static void
+swfdec_system_has_embedded_video (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  /* FIXME: what's this? */
+  SWFDEC_AS_VALUE_SET_BOOLEAN (ret, TRUE);
+}
+
+static void
+swfdec_system_has_mp3 (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SwfdecAudioDecoder *dec = swfdec_audio_decoder_new (SWFDEC_AUDIO_FORMAT_MP3, TRUE, SWFDEC_AUDIO_OUT_STEREO_44100);
+
+  if (dec) {
+    SWFDEC_AS_VALUE_SET_BOOLEAN (ret, TRUE);
+    swfdec_audio_decoder_free (dec);
+  } else {
+    SWFDEC_AS_VALUE_SET_BOOLEAN (ret, FALSE);
+  }
+}
+
+static void
+swfdec_system_has_audio_encoder (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_BOOLEAN (ret, FALSE);
+}
+
+static void
+swfdec_system_has_video_encoder (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_BOOLEAN (ret, FALSE);
+}
+
+static void
+swfdec_system_has_accessibility (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_BOOLEAN (ret, FALSE);
+}
+
+static void
+swfdec_system_has_printing (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_BOOLEAN (ret, FALSE);
+}
+
+static void
+swfdec_system_has_screen_broadcast (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_BOOLEAN (ret, FALSE);
+}
+
+static void
+swfdec_system_has_screen_playback (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_BOOLEAN (ret, FALSE);
+}
+
+static void
+swfdec_system_is_debugger (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_BOOLEAN (ret, player->system->debugger);
+}
+
+static void
+swfdec_system_version (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_get_string (
+	SWFDEC_AS_CONTEXT (player), player->system->version));
+}
+
+static void
+swfdec_system_manufacturer (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_get_string (
+	SWFDEC_AS_CONTEXT (player), player->system->manufacturer));
+}
+
+static void
+swfdec_system_screen_width (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_INT (ret, player->system->screen_width);
+}
+
+static void
+swfdec_system_screen_height (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_INT (ret, player->system->screen_height);
+}
+
+static void
+swfdec_system_screen_dpi (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_INT (ret, player->system->dpi);
+}
+
+static void
+swfdec_system_screen_color (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_get_string (
+	SWFDEC_AS_CONTEXT (player), player->system->color_mode));
+}
+
+static void
+swfdec_system_screen_par (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_NUMBER (ret, player->system->par);
+}
+
+static void
+swfdec_system_os (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_get_string (
+	SWFDEC_AS_CONTEXT (player), player->system->os));
+}
+
+static void
+swfdec_system_language (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_get_string (
+	SWFDEC_AS_CONTEXT (player), player->system->language));
+}
+
+static void
+swfdec_system_has_ime (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_BOOLEAN (ret, FALSE);
+}
+
+static void
+swfdec_system_player_type (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_get_string (
+	SWFDEC_AS_CONTEXT (player), player->system->player_type));
+}
+
+static void
+swfdec_system_av_disabled (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_BOOLEAN (ret, FALSE);
+}
+
+static void
+swfdec_system_local_file_disabled (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_BOOLEAN (ret, FALSE);
+}
+
+static void
+swfdec_system_windowless_disabled (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_BOOLEAN (ret, FALSE);
+}
+
+static void
+swfdec_system_has_tls (SwfdecPlayer *player, SwfdecAsValue *ret)
+{
+  SWFDEC_AS_VALUE_SET_BOOLEAN (ret, FALSE);
+}
+
+/* NB: ordered for the query string order */
+const struct {
+  const char *	name;
+  const char *	server_string;
+  void		(* get)		(SwfdecPlayer *player, SwfdecAsValue *ret);
+} queries[] = {
+  { SWFDEC_AS_STR_hasAudio,		"A",	swfdec_system_has_audio },
+  { SWFDEC_AS_STR_hasStreamingAudio,	"SA",	swfdec_system_has_streaming_audio },
+  { SWFDEC_AS_STR_hasStreamingVideo,	"SV",	swfdec_system_has_streaming_video },
+  { SWFDEC_AS_STR_hasEmbeddedVideo,	"SV",	swfdec_system_has_embedded_video },
+  { SWFDEC_AS_STR_hasMP3,		"MP3",	swfdec_system_has_mp3 },
+  { SWFDEC_AS_STR_hasAudioEncoder,    	"AE",	swfdec_system_has_audio_encoder },
+  { SWFDEC_AS_STR_hasVideoEncoder,    	"VE",	swfdec_system_has_video_encoder },
+  { SWFDEC_AS_STR_hasAccessibility,    	"ACC",	swfdec_system_has_accessibility },
+  { SWFDEC_AS_STR_hasPrinting,    	"PR",	swfdec_system_has_printing },
+  { SWFDEC_AS_STR_hasScreenPlayback,	"SP",	swfdec_system_has_screen_playback },
+  { SWFDEC_AS_STR_hasScreenBroadcast,  	"SB",	swfdec_system_has_screen_broadcast },
+  { SWFDEC_AS_STR_isDebugger,   	"DEB",	swfdec_system_is_debugger },
+  { SWFDEC_AS_STR_version,       	"V",	swfdec_system_version },
+  { SWFDEC_AS_STR_manufacturer,       	"M",	swfdec_system_manufacturer },
+  { SWFDEC_AS_STR_screenResolutionX,   	"R",	swfdec_system_screen_width },
+  { SWFDEC_AS_STR_screenResolutionY,   	NULL,	swfdec_system_screen_height },
+  { SWFDEC_AS_STR_screenDPI,	   	"DP",	swfdec_system_screen_dpi },
+  { SWFDEC_AS_STR_screenColor,	   	"COL",	swfdec_system_screen_color },
+  { SWFDEC_AS_STR_pixelAspectRatio,    	NULL,	swfdec_system_screen_par },
+  { SWFDEC_AS_STR_os,			"OS",	swfdec_system_os },
+  { SWFDEC_AS_STR_language,		"L",	swfdec_system_language },
+  { SWFDEC_AS_STR_hasIME,		"IME",	swfdec_system_has_ime },
+  { SWFDEC_AS_STR_playerType,		"PT",	swfdec_system_player_type },
+  { SWFDEC_AS_STR_avHardwareDisable,	"AVD",	swfdec_system_av_disabled },
+  { SWFDEC_AS_STR_localFileReadDisable,	"LFD",	swfdec_system_local_file_disabled },
+  { SWFDEC_AS_STR_windowlessDisable,	"WD",	swfdec_system_windowless_disabled },
+  { SWFDEC_AS_STR_hasTLS,		"TLS",	swfdec_system_has_tls },
+};
+
 SWFDEC_AS_NATIVE (11, 0, swfdec_system_query)
 void
 swfdec_system_query (SwfdecAsContext *cx, SwfdecAsObject *object,
     guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval)
 {
+  SwfdecPlayer *player = SWFDEC_PLAYER (cx);
+  SwfdecAsValue val;
+  guint i;
+  GString *server;
+
+  if (object == NULL) {
+    SWFDEC_WARNING ("no this object in Query()");
+    return;
+  }
+
+  server = g_string_new ("");
+  for (i = 0; i < G_N_ELEMENTS (queries); i++) {
+    queries[i].get (player, &val);
+    swfdec_as_object_set_variable (object, queries[i].name, &val);
+    if (queries[i].name == SWFDEC_AS_STR_screenResolutionY) {
+      g_string_append_printf (server, "x%d", (int) SWFDEC_AS_VALUE_GET_NUMBER (&val));
+    } else if (queries[i].name == SWFDEC_AS_STR_pixelAspectRatio) {
+      g_string_append_printf (server, "&AR=%.1g", SWFDEC_AS_VALUE_GET_NUMBER (&val));
+    } else {
+      g_assert (queries[i].server_string);
+      if (i > 0)
+	g_string_append_c (server, '&');
+      g_string_append (server, queries[i].server_string);
+      g_string_append_c (server, '=');
+      if (SWFDEC_AS_VALUE_IS_BOOLEAN (&val)) {
+	g_string_append_c (server, SWFDEC_AS_VALUE_GET_BOOLEAN (&val) ? 't' : 'f');
+      } else if (SWFDEC_AS_VALUE_IS_NUMBER (&val)) {
+	g_string_append_printf (server, "%d", (int) SWFDEC_AS_VALUE_GET_NUMBER (&val));
+      } else if (SWFDEC_AS_VALUE_IS_STRING (&val)) {
+	char *s = swfdec_as_string_escape (cx, SWFDEC_AS_VALUE_GET_STRING (&val));
+	g_string_append (server, s);
+	g_free (s);
+      } else {
+	g_assert_not_reached ();
+      }
+    }
+  }
+  SWFDEC_AS_VALUE_SET_STRING (&val, swfdec_as_context_give_string (cx, g_string_free (server, FALSE)));
+  swfdec_as_object_set_variable (object, SWFDEC_AS_STR_serverString, &val);
 }
 
diff-tree c5ea16abb5020e7d1a55719a1847ad047a066cdb (from ff1160b0d27e96e7a54d132d20e6ad7154248d47)
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Aug 27 14:35:33 2007 +0200

    add swfdec_as_string_escape() function

diff --git a/libswfdec/swfdec_as_string.c b/libswfdec/swfdec_as_string.c
index c05156f..5988369 100644
--- a/libswfdec/swfdec_as_string.c
+++ b/libswfdec/swfdec_as_string.c
@@ -599,21 +599,18 @@ swfdec_as_string_unescape_5 (SwfdecAsCon
 #undef APPEND
 }
 
-static void
-swfdec_as_string_escape (SwfdecAsContext *cx, SwfdecAsObject *object,
-    guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret)
+char *
+swfdec_as_string_escape (SwfdecAsContext *cx, const char *s)
 {
   GByteArray *array;
-  const char *s;
   char *in = NULL;
 
   array = g_byte_array_new ();
-  s = swfdec_as_value_to_string (cx, &argv[0]);
   if (cx->version <= 5) {
     in = g_convert (s, -1, "LATIN1", "UTF-8", NULL, NULL, NULL);
     if (s == NULL) {
       SWFDEC_FIXME ("%s can not be converted to utf8 - is this Flash 5 or what?", s);
-      return;
+      return NULL;
     } else {
       s = in;
     }
@@ -634,9 +631,24 @@ swfdec_as_string_escape (SwfdecAsContext
     s++;
   }
   g_byte_array_append (array, (guchar *) s, 1);
-  SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_get_string (cx, (char *) array->data));
-  g_byte_array_free (array, TRUE);
   g_free (in);
+  return (char *) g_byte_array_free (array, FALSE);
+}
+
+static void
+swfdec_as_string_escape_internal (SwfdecAsContext *cx, SwfdecAsObject *object,
+    guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret)
+{
+  char *result;
+
+  result =
+    swfdec_as_string_escape (cx, swfdec_as_value_to_string (cx, &argv[0]));
+  if (result != NULL) {
+    SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_get_string (cx, result));
+    g_free (result);
+  } else {
+    SWFDEC_AS_VALUE_SET_UNDEFINED (ret);
+  }
 }
 
 static char *
@@ -800,7 +812,7 @@ swfdec_as_string_init_context (SwfdecAsC
       SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
 
   /* add properties to global object */
-  swfdec_as_object_add_function (context->global, SWFDEC_AS_STR_escape, 0, swfdec_as_string_escape, 1);
+  swfdec_as_object_add_function (context->global, SWFDEC_AS_STR_escape, 0, swfdec_as_string_escape_internal, 1);
   swfdec_as_object_add_function (context->global, SWFDEC_AS_STR_unescape, 0, swfdec_as_string_unescape_internal, 1);
 }
 
diff --git a/libswfdec/swfdec_as_string.h b/libswfdec/swfdec_as_string.h
index 94d796e..d2ff8d8 100644
--- a/libswfdec/swfdec_as_string.h
+++ b/libswfdec/swfdec_as_string.h
@@ -49,7 +49,10 @@ GType		swfdec_as_string_get_type	(void);
 
 void		swfdec_as_string_init_context	(SwfdecAsContext *	context,
 						 guint			version);
-char		*swfdec_as_string_unescape	(SwfdecAsContext *	context,						 const char *		string);
+char *		swfdec_as_string_escape		(SwfdecAsContext *	context,
+						 const char *		string);
+char *		swfdec_as_string_unescape	(SwfdecAsContext *	context,
+						 const char *		string);
 
 
 G_END_DECLS
diff-tree ff1160b0d27e96e7a54d132d20e6ad7154248d47 (from 796327ee3016688145a7b607746fb6f0af3a0924)
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Aug 27 12:39:54 2007 +0200

    add infrastructure for System.capabilities.Query

diff --git a/libswfdec/Makefile.am b/libswfdec/Makefile.am
index c9ff277..0ad870d 100644
--- a/libswfdec/Makefile.am
+++ b/libswfdec/Makefile.am
@@ -104,6 +104,7 @@ libswfdec_ at SWFDEC_MAJORMINOR@_la_SOURCES
 	swfdec_swf_decoder.c \
 	swfdec_swf_instance.c \
 	swfdec_system.c \
+	swfdec_system_as.c \
 	swfdec_tag.c \
 	swfdec_text.c \
 	swfdec_url.c \
diff --git a/libswfdec/swfdec_initialize.as b/libswfdec/swfdec_initialize.as
index f347a5f..a6e33bd 100644
--- a/libswfdec/swfdec_initialize.as
+++ b/libswfdec/swfdec_initialize.as
@@ -127,6 +127,14 @@ ASSetPropFlags(LoadVars.prototype, null,
 
 XML.prototype.load = ASnative (301, 0);
 
+/*** System ***/
+
+System = {};
+System.capabilities = {};
+System.capabilities.Query = ASnative(11, 0);
+System.capabilities.Query();
+delete System.capabilities.Query;
+
 /*** OH THE HUMANITY ***/
 
 o = null;
diff --git a/libswfdec/swfdec_initialize.h b/libswfdec/swfdec_initialize.h
index 8b74657..715e81e 100644
--- a/libswfdec/swfdec_initialize.h
+++ b/libswfdec/swfdec_initialize.h
@@ -2,7 +2,7 @@
 
 /* compiled from swfdec_initialize.as */
 const unsigned char swfdec_initialize[] = {
-  0x88, 0x68, 0x02, 0x43,  0x00, 0x41, 0x53, 0x53,  0x65, 0x74, 0x4E, 0x61,  0x74, 0x69, 0x76, 0x65,
+  0x88, 0x82, 0x02, 0x46,  0x00, 0x41, 0x53, 0x53,  0x65, 0x74, 0x4E, 0x61,  0x74, 0x69, 0x76, 0x65,
   0x00, 0x41, 0x53, 0x6E,  0x61, 0x74, 0x69, 0x76,  0x65, 0x00, 0x41, 0x53,  0x53, 0x65, 0x74, 0x4E,
   0x61, 0x74, 0x69, 0x76,  0x65, 0x41, 0x63, 0x63,  0x65, 0x73, 0x73, 0x6F,  0x72, 0x00, 0x41, 0x73,
   0x42, 0x72, 0x6F, 0x61,  0x64, 0x63, 0x61, 0x73,  0x74, 0x65, 0x72, 0x00,  0x62, 0x72, 0x6F, 0x61,
@@ -40,102 +40,111 @@ const unsigned char swfdec_initialize[] 
   0x00, 0x67, 0x65, 0x74,  0x42, 0x79, 0x74, 0x65,  0x73, 0x4C, 0x6F, 0x61,  0x64, 0x65, 0x64, 0x00,
   0x5F, 0x62, 0x79, 0x74,  0x65, 0x73, 0x4C, 0x6F,  0x61, 0x64, 0x65, 0x64,  0x00, 0x67, 0x65, 0x74,
   0x42, 0x79, 0x74, 0x65,  0x73, 0x54, 0x6F, 0x74,  0x61, 0x6C, 0x00, 0x5F,  0x62, 0x79, 0x74, 0x65,
-  0x73, 0x54, 0x6F, 0x74,  0x61, 0x6C, 0x00, 0x58,  0x4D, 0x4C, 0x00, 0x9B,  0x12, 0x00, 0x41, 0x73,
-  0x42, 0x72, 0x6F, 0x61,  0x64, 0x63, 0x61, 0x73,  0x74, 0x65, 0x72, 0x00,  0x00, 0x00, 0x00, 0x00,
-  0x9B, 0x0D, 0x00, 0x4C,  0x6F, 0x61, 0x64, 0x56,  0x61, 0x72, 0x73, 0x00,  0x00, 0x00, 0x00, 0x00,
-  0x96, 0x13, 0x00, 0x08,  0x00, 0x07, 0x00, 0x00,  0x00, 0x00, 0x07, 0x04,  0x00, 0x00, 0x00, 0x07,
-  0x02, 0x00, 0x00, 0x00,  0x08, 0x01, 0x3D, 0x1D,  0x96, 0x13, 0x00, 0x08,  0x02, 0x07, 0x01, 0x00,
-  0x00, 0x00, 0x07, 0x04,  0x00, 0x00, 0x00, 0x07,  0x02, 0x00, 0x00, 0x00,  0x08, 0x01, 0x3D, 0x1D,
-  0x96, 0x02, 0x00, 0x08,  0x03, 0x1C, 0x96, 0x13,  0x00, 0x08, 0x04, 0x07,  0x0C, 0x00, 0x00, 0x00,
-  0x07, 0x65, 0x00, 0x00,  0x00, 0x07, 0x02, 0x00,  0x00, 0x00, 0x08, 0x01,  0x3D, 0x4F, 0x96, 0x02,
-  0x00, 0x08, 0x03, 0x1C,  0x96, 0x02, 0x00, 0x08,  0x05, 0x9B, 0x07, 0x00,  0x00, 0x01, 0x00, 0x78,
-  0x00, 0x3C, 0x00, 0x96,  0x02, 0x00, 0x08, 0x07,  0x1C, 0x96, 0x07, 0x00,  0x07, 0x01, 0x00, 0x00,
-  0x00, 0x08, 0x06, 0x1C,  0x96, 0x02, 0x00, 0x08,  0x08, 0x52, 0x17, 0x96,  0x02, 0x00, 0x08, 0x07,
-  0x1C, 0x96, 0x07, 0x00,  0x07, 0x01, 0x00, 0x00,  0x00, 0x08, 0x06, 0x1C,  0x96, 0x02, 0x00, 0x08,
-  0x09, 0x4E, 0x96, 0x02,  0x00, 0x08, 0x0A, 0x52,  0x17, 0x96, 0x02, 0x00,  0x05, 0x01, 0x3E, 0x4F,
-  0x96, 0x02, 0x00, 0x08,  0x03, 0x1C, 0x96, 0x02,  0x00, 0x08, 0x08, 0x9B,  0x07, 0x00, 0x00, 0x01,
-  0x00, 0x78, 0x00, 0x8F,  0x00, 0x96, 0x04, 0x00,  0x08, 0x0B, 0x08, 0x06,  0x1C, 0x96, 0x02, 0x00,
-  0x08, 0x09, 0x4E, 0x3C,  0x96, 0x02, 0x00, 0x08,  0x0C, 0x41, 0x96, 0x07,  0x00, 0x08, 0x0C, 0x07,
-  0x00, 0x00, 0x00, 0x00,  0x3C, 0x99, 0x02, 0x00,  0x09, 0x00, 0x96, 0x02,  0x00, 0x08, 0x0C, 0x4C,
-  0x1C, 0x50, 0x1D, 0x96,  0x02, 0x00, 0x08, 0x0C,  0x1C, 0x96, 0x02, 0x00,  0x08, 0x0B, 0x1C, 0x96,
-  0x02, 0x00, 0x08, 0x0D,  0x4E, 0x48, 0x12, 0x9D,  0x02, 0x00, 0x42, 0x00,  0x96, 0x02, 0x00, 0x08,
-  0x0B, 0x1C, 0x96, 0x02,  0x00, 0x08, 0x0C, 0x1C,  0x4E, 0x96, 0x02, 0x00,  0x08, 0x07, 0x1C, 0x49,
-  0x12, 0x9D, 0x02, 0x00,  0x23, 0x00, 0x96, 0x07,  0x00, 0x07, 0x01, 0x00,  0x00, 0x00, 0x08, 0x0C,
-  0x1C, 0x96, 0x07, 0x00,  0x07, 0x02, 0x00, 0x00,  0x00, 0x08, 0x0B, 0x1C,  0x96, 0x02, 0x00, 0x08,
-  0x0E, 0x52, 0x17, 0x96,  0x02, 0x00, 0x05, 0x01,  0x3E, 0x99, 0x02, 0x00,  0x9C, 0xFF, 0x96, 0x02,
-  0x00, 0x05, 0x00, 0x3E,  0x4F, 0x96, 0x02, 0x00,  0x08, 0x03, 0x1C, 0x96,  0x02, 0x00, 0x08, 0x0F,
-  0x9B, 0x07, 0x00, 0x00,  0x01, 0x00, 0x6F, 0x00,  0x75, 0x00, 0x96, 0x02,  0x00, 0x08, 0x10, 0x1C,
+  0x73, 0x54, 0x6F, 0x74,  0x61, 0x6C, 0x00, 0x58,  0x4D, 0x4C, 0x00, 0x53,  0x79, 0x73, 0x74, 0x65,
+  0x6D, 0x00, 0x63, 0x61,  0x70, 0x61, 0x62, 0x69,  0x6C, 0x69, 0x74, 0x69,  0x65, 0x73, 0x00, 0x51,
+  0x75, 0x65, 0x72, 0x79,  0x00, 0x9B, 0x12, 0x00,  0x41, 0x73, 0x42, 0x72,  0x6F, 0x61, 0x64, 0x63,
+  0x61, 0x73, 0x74, 0x65,  0x72, 0x00, 0x00, 0x00,  0x00, 0x00, 0x9B, 0x0D,  0x00, 0x4C, 0x6F, 0x61,
+  0x64, 0x56, 0x61, 0x72,  0x73, 0x00, 0x00, 0x00,  0x00, 0x00, 0x96, 0x13,  0x00, 0x08, 0x00, 0x07,
+  0x00, 0x00, 0x00, 0x00,  0x07, 0x04, 0x00, 0x00,  0x00, 0x07, 0x02, 0x00,  0x00, 0x00, 0x08, 0x01,
+  0x3D, 0x1D, 0x96, 0x13,  0x00, 0x08, 0x02, 0x07,  0x01, 0x00, 0x00, 0x00,  0x07, 0x04, 0x00, 0x00,
+  0x00, 0x07, 0x02, 0x00,  0x00, 0x00, 0x08, 0x01,  0x3D, 0x1D, 0x96, 0x02,  0x00, 0x08, 0x03, 0x1C,
   0x96, 0x13, 0x00, 0x08,  0x04, 0x07, 0x0C, 0x00,  0x00, 0x00, 0x07, 0x65,  0x00, 0x00, 0x00, 0x07,
-  0x02, 0x00, 0x00, 0x00,  0x08, 0x01, 0x3D, 0x4F,  0x96, 0x02, 0x00, 0x08,  0x10, 0x1C, 0x96, 0x04,
-  0x00, 0x08, 0x05, 0x08,  0x03, 0x1C, 0x96, 0x02,  0x00, 0x08, 0x05, 0x4E,  0x4F, 0x96, 0x02, 0x00,
-  0x08, 0x10, 0x1C, 0x96,  0x04, 0x00, 0x08, 0x08,  0x08, 0x03, 0x1C, 0x96,  0x02, 0x00, 0x08, 0x08,
-  0x4E, 0x4F, 0x96, 0x02,  0x00, 0x08, 0x10, 0x1C,  0x96, 0x09, 0x00, 0x08,  0x09, 0x07, 0x00, 0x00,
-  0x00, 0x00, 0x08, 0x11,  0x40, 0x4F, 0x96, 0x09,  0x00, 0x07, 0x83, 0x00,  0x00, 0x00, 0x08, 0x12,
-  0x08, 0x10, 0x1C, 0x96,  0x07, 0x00, 0x07, 0x03,  0x00, 0x00, 0x00, 0x08,  0x13, 0x3D, 0x17, 0x4F,
-  0x96, 0x08, 0x00, 0x07,  0x83, 0x00, 0x00, 0x00,  0x02, 0x08, 0x03, 0x1C,  0x96, 0x07, 0x00, 0x07,
-  0x03, 0x00, 0x00, 0x00,  0x08, 0x13, 0x3D, 0x17,  0x96, 0x8C, 0x00, 0x08,  0x14, 0x08, 0x15, 0x07,
-  0x12, 0x00, 0x00, 0x00,  0x08, 0x16, 0x07, 0x08,  0x00, 0x00, 0x00, 0x08,  0x17, 0x07, 0x14, 0x00,
-  0x00, 0x00, 0x08, 0x18,  0x07, 0x11, 0x00, 0x00,  0x00, 0x08, 0x19, 0x07,  0x2E, 0x00, 0x00, 0x00,
-  0x08, 0x1A, 0x07, 0x28,  0x00, 0x00, 0x00, 0x08,  0x1B, 0x07, 0x23, 0x00,  0x00, 0x00, 0x08, 0x1C,
-  0x07, 0x0D, 0x00, 0x00,  0x00, 0x08, 0x1D, 0x07,  0x1B, 0x00, 0x00, 0x00,  0x08, 0x1E, 0x07, 0x24,
-  0x00, 0x00, 0x00, 0x08,  0x1F, 0x07, 0x2D, 0x00,  0x00, 0x00, 0x08, 0x20,  0x07, 0x25, 0x00, 0x00,
-  0x00, 0x08, 0x21, 0x07,  0x22, 0x00, 0x00, 0x00,  0x08, 0x22, 0x07, 0x21,  0x00, 0x00, 0x00, 0x08,
-  0x23, 0x07, 0x27, 0x00,  0x00, 0x00, 0x08, 0x24,  0x07, 0x10, 0x00, 0x00,  0x00, 0x08, 0x25, 0x07,
-  0x20, 0x00, 0x00, 0x00,  0x08, 0x26, 0x07, 0x09,  0x00, 0x00, 0x00, 0x08,  0x27, 0x07, 0x26, 0x00,
-  0x00, 0x00, 0x07, 0x13,  0x00, 0x00, 0x00, 0x43,  0x1D, 0x96, 0x09, 0x00,  0x08, 0x28, 0x07, 0x20,
-  0x03, 0x00, 0x00, 0x08,  0x14, 0x1C, 0x96, 0x07,  0x00, 0x07, 0x03, 0x00,  0x00, 0x00, 0x08, 0x00,
-  0x3D, 0x17, 0x96, 0x02,  0x00, 0x08, 0x14, 0x1C,  0x96, 0x07, 0x00, 0x07,  0x01, 0x00, 0x00, 0x00,
-  0x08, 0x03, 0x1C, 0x96,  0x02, 0x00, 0x08, 0x0F,  0x52, 0x17, 0x96, 0x08,  0x00, 0x07, 0x07, 0x00,
-  0x00, 0x00, 0x02, 0x08,  0x14, 0x1C, 0x96, 0x07,  0x00, 0x07, 0x03, 0x00,  0x00, 0x00, 0x08, 0x13,
-  0x3D, 0x17, 0x96, 0x09,  0x00, 0x08, 0x29, 0x07,  0x00, 0x00, 0x00, 0x00,  0x08, 0x2A, 0x40, 0x1D,
-  0x96, 0x02, 0x00, 0x08,  0x29, 0x1C, 0x96, 0x13,  0x00, 0x08, 0x2B, 0x07,  0x00, 0x00, 0x00, 0x00,
-  0x07, 0x05, 0x00, 0x00,  0x00, 0x07, 0x02, 0x00,  0x00, 0x00, 0x08, 0x01,  0x3D, 0x4F, 0x96, 0x02,
-  0x00, 0x08, 0x29, 0x1C,  0x96, 0x13, 0x00, 0x08,  0x2C, 0x07, 0x01, 0x00,  0x00, 0x00, 0x07, 0x05,
-  0x00, 0x00, 0x00, 0x07,  0x02, 0x00, 0x00, 0x00,  0x08, 0x01, 0x3D, 0x4F,  0x96, 0x02, 0x00, 0x08,
-  0x29, 0x1C, 0x96, 0x07,  0x00, 0x07, 0x01, 0x00,  0x00, 0x00, 0x08, 0x03,  0x1C, 0x96, 0x02, 0x00,
-  0x08, 0x0F, 0x52, 0x17,  0x96, 0x08, 0x00, 0x07,  0x07, 0x00, 0x00, 0x00,  0x02, 0x08, 0x29, 0x1C,
+  0x02, 0x00, 0x00, 0x00,  0x08, 0x01, 0x3D, 0x4F,  0x96, 0x02, 0x00, 0x08,  0x03, 0x1C, 0x96, 0x02,
+  0x00, 0x08, 0x05, 0x9B,  0x07, 0x00, 0x00, 0x01,  0x00, 0x78, 0x00, 0x3C,  0x00, 0x96, 0x02, 0x00,
+  0x08, 0x07, 0x1C, 0x96,  0x07, 0x00, 0x07, 0x01,  0x00, 0x00, 0x00, 0x08,  0x06, 0x1C, 0x96, 0x02,
+  0x00, 0x08, 0x08, 0x52,  0x17, 0x96, 0x02, 0x00,  0x08, 0x07, 0x1C, 0x96,  0x07, 0x00, 0x07, 0x01,
+  0x00, 0x00, 0x00, 0x08,  0x06, 0x1C, 0x96, 0x02,  0x00, 0x08, 0x09, 0x4E,  0x96, 0x02, 0x00, 0x08,
+  0x0A, 0x52, 0x17, 0x96,  0x02, 0x00, 0x05, 0x01,  0x3E, 0x4F, 0x96, 0x02,  0x00, 0x08, 0x03, 0x1C,
+  0x96, 0x02, 0x00, 0x08,  0x08, 0x9B, 0x07, 0x00,  0x00, 0x01, 0x00, 0x78,  0x00, 0x8F, 0x00, 0x96,
+  0x04, 0x00, 0x08, 0x0B,  0x08, 0x06, 0x1C, 0x96,  0x02, 0x00, 0x08, 0x09,  0x4E, 0x3C, 0x96, 0x02,
+  0x00, 0x08, 0x0C, 0x41,  0x96, 0x07, 0x00, 0x08,  0x0C, 0x07, 0x00, 0x00,  0x00, 0x00, 0x3C, 0x99,
+  0x02, 0x00, 0x09, 0x00,  0x96, 0x02, 0x00, 0x08,  0x0C, 0x4C, 0x1C, 0x50,  0x1D, 0x96, 0x02, 0x00,
+  0x08, 0x0C, 0x1C, 0x96,  0x02, 0x00, 0x08, 0x0B,  0x1C, 0x96, 0x02, 0x00,  0x08, 0x0D, 0x4E, 0x48,
+  0x12, 0x9D, 0x02, 0x00,  0x42, 0x00, 0x96, 0x02,  0x00, 0x08, 0x0B, 0x1C,  0x96, 0x02, 0x00, 0x08,
+  0x0C, 0x1C, 0x4E, 0x96,  0x02, 0x00, 0x08, 0x07,  0x1C, 0x49, 0x12, 0x9D,  0x02, 0x00, 0x23, 0x00,
+  0x96, 0x07, 0x00, 0x07,  0x01, 0x00, 0x00, 0x00,  0x08, 0x0C, 0x1C, 0x96,  0x07, 0x00, 0x07, 0x02,
+  0x00, 0x00, 0x00, 0x08,  0x0B, 0x1C, 0x96, 0x02,  0x00, 0x08, 0x0E, 0x52,  0x17, 0x96, 0x02, 0x00,
+  0x05, 0x01, 0x3E, 0x99,  0x02, 0x00, 0x9C, 0xFF,  0x96, 0x02, 0x00, 0x05,  0x00, 0x3E, 0x4F, 0x96,
+  0x02, 0x00, 0x08, 0x03,  0x1C, 0x96, 0x02, 0x00,  0x08, 0x0F, 0x9B, 0x07,  0x00, 0x00, 0x01, 0x00,
+  0x6F, 0x00, 0x75, 0x00,  0x96, 0x02, 0x00, 0x08,  0x10, 0x1C, 0x96, 0x13,  0x00, 0x08, 0x04, 0x07,
+  0x0C, 0x00, 0x00, 0x00,  0x07, 0x65, 0x00, 0x00,  0x00, 0x07, 0x02, 0x00,  0x00, 0x00, 0x08, 0x01,
+  0x3D, 0x4F, 0x96, 0x02,  0x00, 0x08, 0x10, 0x1C,  0x96, 0x04, 0x00, 0x08,  0x05, 0x08, 0x03, 0x1C,
+  0x96, 0x02, 0x00, 0x08,  0x05, 0x4E, 0x4F, 0x96,  0x02, 0x00, 0x08, 0x10,  0x1C, 0x96, 0x04, 0x00,
+  0x08, 0x08, 0x08, 0x03,  0x1C, 0x96, 0x02, 0x00,  0x08, 0x08, 0x4E, 0x4F,  0x96, 0x02, 0x00, 0x08,
+  0x10, 0x1C, 0x96, 0x09,  0x00, 0x08, 0x09, 0x07,  0x00, 0x00, 0x00, 0x00,  0x08, 0x11, 0x40, 0x4F,
+  0x96, 0x09, 0x00, 0x07,  0x83, 0x00, 0x00, 0x00,  0x08, 0x12, 0x08, 0x10,  0x1C, 0x96, 0x07, 0x00,
+  0x07, 0x03, 0x00, 0x00,  0x00, 0x08, 0x13, 0x3D,  0x17, 0x4F, 0x96, 0x08,  0x00, 0x07, 0x83, 0x00,
+  0x00, 0x00, 0x02, 0x08,  0x03, 0x1C, 0x96, 0x07,  0x00, 0x07, 0x03, 0x00,  0x00, 0x00, 0x08, 0x13,
+  0x3D, 0x17, 0x96, 0x8C,  0x00, 0x08, 0x14, 0x08,  0x15, 0x07, 0x12, 0x00,  0x00, 0x00, 0x08, 0x16,
+  0x07, 0x08, 0x00, 0x00,  0x00, 0x08, 0x17, 0x07,  0x14, 0x00, 0x00, 0x00,  0x08, 0x18, 0x07, 0x11,
+  0x00, 0x00, 0x00, 0x08,  0x19, 0x07, 0x2E, 0x00,  0x00, 0x00, 0x08, 0x1A,  0x07, 0x28, 0x00, 0x00,
+  0x00, 0x08, 0x1B, 0x07,  0x23, 0x00, 0x00, 0x00,  0x08, 0x1C, 0x07, 0x0D,  0x00, 0x00, 0x00, 0x08,
+  0x1D, 0x07, 0x1B, 0x00,  0x00, 0x00, 0x08, 0x1E,  0x07, 0x24, 0x00, 0x00,  0x00, 0x08, 0x1F, 0x07,
+  0x2D, 0x00, 0x00, 0x00,  0x08, 0x20, 0x07, 0x25,  0x00, 0x00, 0x00, 0x08,  0x21, 0x07, 0x22, 0x00,
+  0x00, 0x00, 0x08, 0x22,  0x07, 0x21, 0x00, 0x00,  0x00, 0x08, 0x23, 0x07,  0x27, 0x00, 0x00, 0x00,
+  0x08, 0x24, 0x07, 0x10,  0x00, 0x00, 0x00, 0x08,  0x25, 0x07, 0x20, 0x00,  0x00, 0x00, 0x08, 0x26,
+  0x07, 0x09, 0x00, 0x00,  0x00, 0x08, 0x27, 0x07,  0x26, 0x00, 0x00, 0x00,  0x07, 0x13, 0x00, 0x00,
+  0x00, 0x43, 0x1D, 0x96,  0x09, 0x00, 0x08, 0x28,  0x07, 0x20, 0x03, 0x00,  0x00, 0x08, 0x14, 0x1C,
+  0x96, 0x07, 0x00, 0x07,  0x03, 0x00, 0x00, 0x00,  0x08, 0x00, 0x3D, 0x17,  0x96, 0x02, 0x00, 0x08,
+  0x14, 0x1C, 0x96, 0x07,  0x00, 0x07, 0x01, 0x00,  0x00, 0x00, 0x08, 0x03,  0x1C, 0x96, 0x02, 0x00,
+  0x08, 0x0F, 0x52, 0x17,  0x96, 0x08, 0x00, 0x07,  0x07, 0x00, 0x00, 0x00,  0x02, 0x08, 0x14, 0x1C,
   0x96, 0x07, 0x00, 0x07,  0x03, 0x00, 0x00, 0x00,  0x08, 0x13, 0x3D, 0x17,  0x96, 0x09, 0x00, 0x08,
-  0x2D, 0x07, 0x00, 0x00,  0x00, 0x00, 0x08, 0x2A,  0x40, 0x1D, 0x96, 0x02,  0x00, 0x08, 0x2D, 0x1C,
-  0x96, 0x07, 0x00, 0x07,  0x01, 0x00, 0x00, 0x00,  0x08, 0x03, 0x1C, 0x96,  0x02, 0x00, 0x08, 0x0F,
-  0x52, 0x17, 0x96, 0x0E,  0x00, 0x07, 0x01, 0x00,  0x00, 0x00, 0x08, 0x2E,  0x07, 0x9A, 0x02, 0x00,
-  0x00, 0x08, 0x2D, 0x1C,  0x96, 0x07, 0x00, 0x07,  0x04, 0x00, 0x00, 0x00,  0x08, 0x02, 0x3D, 0x17,
-  0x96, 0x02, 0x00, 0x08,  0x2F, 0x1C, 0x96, 0x02,  0x00, 0x08, 0x30, 0x4E,  0x96, 0x04, 0x00, 0x08,
-  0x31, 0x08, 0x32, 0x4F,  0x96, 0x02, 0x00, 0x08,  0x2F, 0x1C, 0x96, 0x02,  0x00, 0x08, 0x30, 0x4E,
-  0x96, 0x13, 0x00, 0x08,  0x33, 0x07, 0x00, 0x00,  0x00, 0x00, 0x07, 0x2D,  0x01, 0x00, 0x00, 0x07,
-  0x02, 0x00, 0x00, 0x00,  0x08, 0x01, 0x3D, 0x4F,  0x96, 0x02, 0x00, 0x08,  0x2F, 0x1C, 0x96, 0x02,
-  0x00, 0x08, 0x30, 0x4E,  0x96, 0x13, 0x00, 0x08,  0x34, 0x07, 0x03, 0x00,  0x00, 0x00, 0x07, 0x2D,
-  0x01, 0x00, 0x00, 0x07,  0x02, 0x00, 0x00, 0x00,  0x08, 0x01, 0x3D, 0x4F,  0x96, 0x02, 0x00, 0x08,
-  0x2F, 0x1C, 0x96, 0x02,  0x00, 0x08, 0x30, 0x4E,  0x96, 0x02, 0x00, 0x08,  0x35, 0x9B, 0x05, 0x00,
-  0x00, 0x00, 0x00, 0x00,  0x00, 0x4F, 0x96, 0x02,  0x00, 0x08, 0x2F, 0x1C,  0x96, 0x02, 0x00, 0x08,
-  0x30, 0x4E, 0x96, 0x02,  0x00, 0x08, 0x36, 0x9B,  0x09, 0x00, 0x00, 0x01,  0x00, 0x73, 0x72, 0x63,
-  0x00, 0x64, 0x00, 0x96,  0x02, 0x00, 0x08, 0x06,  0x1C, 0x96, 0x04, 0x00,  0x08, 0x37, 0x05, 0x01,
-  0x4F, 0x96, 0x02, 0x00,  0x08, 0x38, 0x1C, 0x96,  0x01, 0x00, 0x02, 0x49,  0x12, 0x9D, 0x02, 0x00,
-  0x19, 0x00, 0x96, 0x09,  0x00, 0x05, 0x00, 0x07,  0x01, 0x00, 0x00, 0x00,  0x08, 0x06, 0x1C, 0x96,
-  0x02, 0x00, 0x08, 0x35,  0x52, 0x17, 0x99, 0x02,  0x00, 0x2C, 0x00, 0x96,  0x02, 0x00, 0x08, 0x38,
-  0x1C, 0x96, 0x07, 0x00,  0x07, 0x01, 0x00, 0x00,  0x00, 0x08, 0x06, 0x1C,  0x96, 0x02, 0x00, 0x08,
-  0x34, 0x52, 0x17, 0x96,  0x09, 0x00, 0x05, 0x01,  0x07, 0x01, 0x00, 0x00,  0x00, 0x08, 0x06, 0x1C,
-  0x96, 0x02, 0x00, 0x08,  0x35, 0x52, 0x17, 0x4F,  0x96, 0x02, 0x00, 0x08,  0x2F, 0x1C, 0x96, 0x02,
-  0x00, 0x08, 0x30, 0x4E,  0x96, 0x02, 0x00, 0x08,  0x39, 0x9B, 0x05, 0x00,  0x00, 0x00, 0x00, 0xB3,
-  0x00, 0x96, 0x03, 0x00,  0x08, 0x3A, 0x02, 0x3C,  0x96, 0x02, 0x00, 0x08,  0x06, 0x46, 0x87, 0x01,
-  0x00, 0x00, 0x96, 0x01,  0x00, 0x02, 0x49, 0x9D,  0x02, 0x00, 0x91, 0x00,  0x96, 0x04, 0x00, 0x08,
-  0x07, 0x04, 0x00, 0x3C,  0x96, 0x02, 0x00, 0x08,  0x3A, 0x1C, 0x96, 0x01,  0x00, 0x02, 0x49, 0x9D,
-  0x02, 0x00, 0x41, 0x00,  0x96, 0x02, 0x00, 0x08,  0x3A, 0x4C, 0x1C, 0x96,  0x04, 0x00, 0x08, 0x3D,
-  0x08, 0x07, 0x1C, 0x96,  0x07, 0x00, 0x07, 0x01,  0x00, 0x00, 0x00, 0x08,  0x3B, 0x3D, 0x47, 0x96,
-  0x02, 0x00, 0x08, 0x3C,  0x47, 0x96, 0x02, 0x00,  0x08, 0x06, 0x1C, 0x96,  0x02, 0x00, 0x08, 0x07,
-  0x1C, 0x4E, 0x96, 0x07,  0x00, 0x07, 0x01, 0x00,  0x00, 0x00, 0x08, 0x3B,  0x3D, 0x47, 0x47, 0x1D,
-  0x99, 0x02, 0x00, 0x33,  0x00, 0x96, 0x04, 0x00,  0x08, 0x3A, 0x08, 0x07,  0x1C, 0x96, 0x07, 0x00,
-  0x07, 0x01, 0x00, 0x00,  0x00, 0x08, 0x3B, 0x3D,  0x96, 0x02, 0x00, 0x08,  0x3C, 0x47, 0x96, 0x02,
-  0x00, 0x08, 0x06, 0x1C,  0x96, 0x02, 0x00, 0x08,  0x07, 0x1C, 0x4E, 0x96,  0x07, 0x00, 0x07, 0x01,
-  0x00, 0x00, 0x00, 0x08,  0x3B, 0x3D, 0x47, 0x1D,  0x99, 0x02, 0x00, 0x61,  0xFF, 0x96, 0x02, 0x00,
-  0x08, 0x3A, 0x1C, 0x3E,  0x4F, 0x96, 0x02, 0x00,  0x08, 0x2F, 0x1C, 0x96,  0x02, 0x00, 0x08, 0x30,
-  0x4E, 0x96, 0x02, 0x00,  0x08, 0x3E, 0x9B, 0x05,  0x00, 0x00, 0x00, 0x00,  0x0D, 0x00, 0x96, 0x02,
-  0x00, 0x08, 0x06, 0x1C,  0x96, 0x02, 0x00, 0x08,  0x3F, 0x4E, 0x3E, 0x4F,  0x96, 0x02, 0x00, 0x08,
-  0x2F, 0x1C, 0x96, 0x02,  0x00, 0x08, 0x30, 0x4E,  0x96, 0x02, 0x00, 0x08,  0x40, 0x9B, 0x05, 0x00,
-  0x00, 0x00, 0x00, 0x0D,  0x00, 0x96, 0x02, 0x00,  0x08, 0x06, 0x1C, 0x96,  0x02, 0x00, 0x08, 0x41,
-  0x4E, 0x3E, 0x4F, 0x96,  0x08, 0x00, 0x07, 0x83,  0x00, 0x00, 0x00, 0x02,  0x08, 0x2F, 0x1C, 0x96,
-  0x02, 0x00, 0x08, 0x30,  0x4E, 0x96, 0x07, 0x00,  0x07, 0x03, 0x00, 0x00,  0x00, 0x08, 0x13, 0x3D,
-  0x17, 0x96, 0x02, 0x00,  0x08, 0x42, 0x1C, 0x96,  0x02, 0x00, 0x08, 0x30,  0x4E, 0x96, 0x13, 0x00,
-  0x08, 0x33, 0x07, 0x00,  0x00, 0x00, 0x00, 0x07,  0x2D, 0x01, 0x00, 0x00,  0x07, 0x02, 0x00, 0x00,
-  0x00, 0x08, 0x01, 0x3D,  0x4F, 0x96, 0x03, 0x00,  0x08, 0x10, 0x02, 0x1D,  0x00
+  0x29, 0x07, 0x00, 0x00,  0x00, 0x00, 0x08, 0x2A,  0x40, 0x1D, 0x96, 0x02,  0x00, 0x08, 0x29, 0x1C,
+  0x96, 0x13, 0x00, 0x08,  0x2B, 0x07, 0x00, 0x00,  0x00, 0x00, 0x07, 0x05,  0x00, 0x00, 0x00, 0x07,
+  0x02, 0x00, 0x00, 0x00,  0x08, 0x01, 0x3D, 0x4F,  0x96, 0x02, 0x00, 0x08,  0x29, 0x1C, 0x96, 0x13,
+  0x00, 0x08, 0x2C, 0x07,  0x01, 0x00, 0x00, 0x00,  0x07, 0x05, 0x00, 0x00,  0x00, 0x07, 0x02, 0x00,
+  0x00, 0x00, 0x08, 0x01,  0x3D, 0x4F, 0x96, 0x02,  0x00, 0x08, 0x29, 0x1C,  0x96, 0x07, 0x00, 0x07,
+  0x01, 0x00, 0x00, 0x00,  0x08, 0x03, 0x1C, 0x96,  0x02, 0x00, 0x08, 0x0F,  0x52, 0x17, 0x96, 0x08,
+  0x00, 0x07, 0x07, 0x00,  0x00, 0x00, 0x02, 0x08,  0x29, 0x1C, 0x96, 0x07,  0x00, 0x07, 0x03, 0x00,
+  0x00, 0x00, 0x08, 0x13,  0x3D, 0x17, 0x96, 0x09,  0x00, 0x08, 0x2D, 0x07,  0x00, 0x00, 0x00, 0x00,
+  0x08, 0x2A, 0x40, 0x1D,  0x96, 0x02, 0x00, 0x08,  0x2D, 0x1C, 0x96, 0x07,  0x00, 0x07, 0x01, 0x00,
+  0x00, 0x00, 0x08, 0x03,  0x1C, 0x96, 0x02, 0x00,  0x08, 0x0F, 0x52, 0x17,  0x96, 0x0E, 0x00, 0x07,
+  0x01, 0x00, 0x00, 0x00,  0x08, 0x2E, 0x07, 0x9A,  0x02, 0x00, 0x00, 0x08,  0x2D, 0x1C, 0x96, 0x07,
+  0x00, 0x07, 0x04, 0x00,  0x00, 0x00, 0x08, 0x02,  0x3D, 0x17, 0x96, 0x02,  0x00, 0x08, 0x2F, 0x1C,
+  0x96, 0x02, 0x00, 0x08,  0x30, 0x4E, 0x96, 0x04,  0x00, 0x08, 0x31, 0x08,  0x32, 0x4F, 0x96, 0x02,
+  0x00, 0x08, 0x2F, 0x1C,  0x96, 0x02, 0x00, 0x08,  0x30, 0x4E, 0x96, 0x13,  0x00, 0x08, 0x33, 0x07,
+  0x00, 0x00, 0x00, 0x00,  0x07, 0x2D, 0x01, 0x00,  0x00, 0x07, 0x02, 0x00,  0x00, 0x00, 0x08, 0x01,
+  0x3D, 0x4F, 0x96, 0x02,  0x00, 0x08, 0x2F, 0x1C,  0x96, 0x02, 0x00, 0x08,  0x30, 0x4E, 0x96, 0x13,
+  0x00, 0x08, 0x34, 0x07,  0x03, 0x00, 0x00, 0x00,  0x07, 0x2D, 0x01, 0x00,  0x00, 0x07, 0x02, 0x00,
+  0x00, 0x00, 0x08, 0x01,  0x3D, 0x4F, 0x96, 0x02,  0x00, 0x08, 0x2F, 0x1C,  0x96, 0x02, 0x00, 0x08,
+  0x30, 0x4E, 0x96, 0x02,  0x00, 0x08, 0x35, 0x9B,  0x05, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x4F,
+  0x96, 0x02, 0x00, 0x08,  0x2F, 0x1C, 0x96, 0x02,  0x00, 0x08, 0x30, 0x4E,  0x96, 0x02, 0x00, 0x08,
+  0x36, 0x9B, 0x09, 0x00,  0x00, 0x01, 0x00, 0x73,  0x72, 0x63, 0x00, 0x64,  0x00, 0x96, 0x02, 0x00,
+  0x08, 0x06, 0x1C, 0x96,  0x04, 0x00, 0x08, 0x37,  0x05, 0x01, 0x4F, 0x96,  0x02, 0x00, 0x08, 0x38,
+  0x1C, 0x96, 0x01, 0x00,  0x02, 0x49, 0x12, 0x9D,  0x02, 0x00, 0x19, 0x00,  0x96, 0x09, 0x00, 0x05,
+  0x00, 0x07, 0x01, 0x00,  0x00, 0x00, 0x08, 0x06,  0x1C, 0x96, 0x02, 0x00,  0x08, 0x35, 0x52, 0x17,
+  0x99, 0x02, 0x00, 0x2C,  0x00, 0x96, 0x02, 0x00,  0x08, 0x38, 0x1C, 0x96,  0x07, 0x00, 0x07, 0x01,
+  0x00, 0x00, 0x00, 0x08,  0x06, 0x1C, 0x96, 0x02,  0x00, 0x08, 0x34, 0x52,  0x17, 0x96, 0x09, 0x00,
+  0x05, 0x01, 0x07, 0x01,  0x00, 0x00, 0x00, 0x08,  0x06, 0x1C, 0x96, 0x02,  0x00, 0x08, 0x35, 0x52,
+  0x17, 0x4F, 0x96, 0x02,  0x00, 0x08, 0x2F, 0x1C,  0x96, 0x02, 0x00, 0x08,  0x30, 0x4E, 0x96, 0x02,
+  0x00, 0x08, 0x39, 0x9B,  0x05, 0x00, 0x00, 0x00,  0x00, 0xB3, 0x00, 0x96,  0x03, 0x00, 0x08, 0x3A,
+  0x02, 0x3C, 0x96, 0x02,  0x00, 0x08, 0x06, 0x46,  0x87, 0x01, 0x00, 0x00,  0x96, 0x01, 0x00, 0x02,
+  0x49, 0x9D, 0x02, 0x00,  0x91, 0x00, 0x96, 0x04,  0x00, 0x08, 0x07, 0x04,  0x00, 0x3C, 0x96, 0x02,
+  0x00, 0x08, 0x3A, 0x1C,  0x96, 0x01, 0x00, 0x02,  0x49, 0x9D, 0x02, 0x00,  0x41, 0x00, 0x96, 0x02,
+  0x00, 0x08, 0x3A, 0x4C,  0x1C, 0x96, 0x04, 0x00,  0x08, 0x3D, 0x08, 0x07,  0x1C, 0x96, 0x07, 0x00,
+  0x07, 0x01, 0x00, 0x00,  0x00, 0x08, 0x3B, 0x3D,  0x47, 0x96, 0x02, 0x00,  0x08, 0x3C, 0x47, 0x96,
+  0x02, 0x00, 0x08, 0x06,  0x1C, 0x96, 0x02, 0x00,  0x08, 0x07, 0x1C, 0x4E,  0x96, 0x07, 0x00, 0x07,
+  0x01, 0x00, 0x00, 0x00,  0x08, 0x3B, 0x3D, 0x47,  0x47, 0x1D, 0x99, 0x02,  0x00, 0x33, 0x00, 0x96,
+  0x04, 0x00, 0x08, 0x3A,  0x08, 0x07, 0x1C, 0x96,  0x07, 0x00, 0x07, 0x01,  0x00, 0x00, 0x00, 0x08,
+  0x3B, 0x3D, 0x96, 0x02,  0x00, 0x08, 0x3C, 0x47,  0x96, 0x02, 0x00, 0x08,  0x06, 0x1C, 0x96, 0x02,
+  0x00, 0x08, 0x07, 0x1C,  0x4E, 0x96, 0x07, 0x00,  0x07, 0x01, 0x00, 0x00,  0x00, 0x08, 0x3B, 0x3D,
+  0x47, 0x1D, 0x99, 0x02,  0x00, 0x61, 0xFF, 0x96,  0x02, 0x00, 0x08, 0x3A,  0x1C, 0x3E, 0x4F, 0x96,
+  0x02, 0x00, 0x08, 0x2F,  0x1C, 0x96, 0x02, 0x00,  0x08, 0x30, 0x4E, 0x96,  0x02, 0x00, 0x08, 0x3E,
+  0x9B, 0x05, 0x00, 0x00,  0x00, 0x00, 0x0D, 0x00,  0x96, 0x02, 0x00, 0x08,  0x06, 0x1C, 0x96, 0x02,
+  0x00, 0x08, 0x3F, 0x4E,  0x3E, 0x4F, 0x96, 0x02,  0x00, 0x08, 0x2F, 0x1C,  0x96, 0x02, 0x00, 0x08,
+  0x30, 0x4E, 0x96, 0x02,  0x00, 0x08, 0x40, 0x9B,  0x05, 0x00, 0x00, 0x00,  0x00, 0x0D, 0x00, 0x96,
+  0x02, 0x00, 0x08, 0x06,  0x1C, 0x96, 0x02, 0x00,  0x08, 0x41, 0x4E, 0x3E,  0x4F, 0x96, 0x08, 0x00,
+  0x07, 0x83, 0x00, 0x00,  0x00, 0x02, 0x08, 0x2F,  0x1C, 0x96, 0x02, 0x00,  0x08, 0x30, 0x4E, 0x96,
+  0x07, 0x00, 0x07, 0x03,  0x00, 0x00, 0x00, 0x08,  0x13, 0x3D, 0x17, 0x96,  0x02, 0x00, 0x08, 0x42,
+  0x1C, 0x96, 0x02, 0x00,  0x08, 0x30, 0x4E, 0x96,  0x13, 0x00, 0x08, 0x33,  0x07, 0x00, 0x00, 0x00,
+  0x00, 0x07, 0x2D, 0x01,  0x00, 0x00, 0x07, 0x02,  0x00, 0x00, 0x00, 0x08,  0x01, 0x3D, 0x4F, 0x96,
+  0x07, 0x00, 0x08, 0x43,  0x07, 0x00, 0x00, 0x00,  0x00, 0x43, 0x1D, 0x96,  0x02, 0x00, 0x08, 0x43,
+  0x1C, 0x96, 0x07, 0x00,  0x08, 0x44, 0x07, 0x00,  0x00, 0x00, 0x00, 0x43,  0x4F, 0x96, 0x02, 0x00,
+  0x08, 0x43, 0x1C, 0x96,  0x02, 0x00, 0x08, 0x44,  0x4E, 0x96, 0x13, 0x00,  0x08, 0x45, 0x07, 0x00,
+  0x00, 0x00, 0x00, 0x07,  0x0B, 0x00, 0x00, 0x00,  0x07, 0x02, 0x00, 0x00,  0x00, 0x08, 0x01, 0x3D,
+  0x4F, 0x96, 0x07, 0x00,  0x07, 0x00, 0x00, 0x00,  0x00, 0x08, 0x43, 0x1C,  0x96, 0x02, 0x00, 0x08,
+  0x44, 0x4E, 0x96, 0x02,  0x00, 0x08, 0x45, 0x52,  0x17, 0x96, 0x02, 0x00,  0x08, 0x43, 0x1C, 0x96,
+  0x02, 0x00, 0x08, 0x44,  0x4E, 0x96, 0x02, 0x00,  0x08, 0x45, 0x3A, 0x17,  0x96, 0x03, 0x00, 0x08,
+  0x10, 0x02, 0x1D, 0x00
 };
 
diff --git a/libswfdec/swfdec_system_as.c b/libswfdec/swfdec_system_as.c
new file mode 100644
index 0000000..b921f89
--- /dev/null
+++ b/libswfdec/swfdec_system_as.c
@@ -0,0 +1,34 @@
+/* Swfdec
+ * Copyright (C) 2007 Benjamin Otte <otte at gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+ * Boston, MA  02110-1301  USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "swfdec.h"
+#include "swfdec_as_strings.h"
+#include "swfdec_player_internal.h"
+
+SWFDEC_AS_NATIVE (11, 0, swfdec_system_query)
+void
+swfdec_system_query (SwfdecAsContext *cx, SwfdecAsObject *object,
+    guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval)
+{
+}
+
diff-tree 796327ee3016688145a7b607746fb6f0af3a0924 (from a87c7388cdd8424a1624b6e24bbfb9997a319c60)
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Aug 27 12:34:11 2007 +0200

    fix copyrights

diff --git a/libswfdec/swfdec_system.c b/libswfdec/swfdec_system.c
index e1620c5..78049fb 100644
--- a/libswfdec/swfdec_system.c
+++ b/libswfdec/swfdec_system.c
@@ -1,5 +1,5 @@
 /* Swfdec
- * Copyright (C) 2006-2007 Benjamin Otte <otte at gnome.org>
+ * Copyright (C) 2007 Benjamin Otte <otte at gnome.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
diff --git a/libswfdec/swfdec_system.h b/libswfdec/swfdec_system.h
index 6bb3a40..51c4bbc 100644
--- a/libswfdec/swfdec_system.h
+++ b/libswfdec/swfdec_system.h
@@ -1,5 +1,5 @@
 /* Swfdec
- * Copyright (C) 2006-2007 Benjamin Otte <otte at gnome.org>
+ * Copyright (C) 2007 Benjamin Otte <otte at gnome.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
diff-tree a87c7388cdd8424a1624b6e24bbfb9997a319c60 (from 5393dfcf8b8d98191556c89ff57ec7b674f15a73)
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Aug 27 12:32:56 2007 +0200

    add a "system" property to SwfdecPlayer that holds the player

diff --git a/libswfdec/swfdec_player.c b/libswfdec/swfdec_player.c
index a20bcb7..5987382 100644
--- a/libswfdec/swfdec_player.c
+++ b/libswfdec/swfdec_player.c
@@ -541,7 +541,8 @@ enum {
   PROP_WIDTH,
   PROP_HEIGHT,
   PROP_ALIGNMENT,
-  PROP_SCALE
+  PROP_SCALE,
+  PROP_SYSTEM
 };
 
 G_DEFINE_TYPE (SwfdecPlayer, swfdec_player, SWFDEC_TYPE_AS_CONTEXT)
@@ -634,6 +635,9 @@ swfdec_player_get_property (GObject *obj
     case PROP_SCALE:
       g_value_set_enum (value, player->scale_mode);
       break;
+    case PROP_SYSTEM:
+      g_value_set_object (value, player->system);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
       break;
@@ -735,6 +739,14 @@ swfdec_player_set_property (GObject *obj
     case PROP_SCALE:
       swfdec_player_set_scale_mode (player, g_value_get_enum (value));
       break;
+    case PROP_SYSTEM:
+      g_object_unref (player->system);
+      if (g_value_get_object (value)) {
+	player->system = SWFDEC_SYSTEM (g_value_dup_object (value));
+      } else {
+	player->system = swfdec_system_new ();
+      }
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
       break;
@@ -789,6 +801,10 @@ swfdec_player_dispose (GObject *object)
     g_object_unref (player->loader);
     player->loader = NULL;
   }
+  if (player->system) {
+    g_object_unref (player->system);
+    player->system = NULL;
+  }
 }
 
 static void
@@ -1304,6 +1320,9 @@ swfdec_player_class_init (SwfdecPlayerCl
   g_object_class_install_property (object_class, PROP_SCALE,
       g_param_spec_enum ("scale-mode", "scale mode", "method used to scale the movie",
 	  SWFDEC_TYPE_SCALE_MODE, SWFDEC_SCALE_SHOW_ALL, G_PARAM_READWRITE));
+  g_object_class_install_property (object_class, PROP_SCALE,
+      g_param_spec_object ("system", "system", "object holding system information",
+	  SWFDEC_TYPE_SYSTEM, G_PARAM_READWRITE));
 
   /**
    * SwfdecPlayer::invalidate:
@@ -1447,6 +1466,7 @@ swfdec_player_class_init (SwfdecPlayerCl
 static void
 swfdec_player_init (SwfdecPlayer *player)
 {
+  player->system = swfdec_system_new ();
   player->registered_classes = g_hash_table_new (g_direct_hash, g_direct_equal);
 
   player->actions = swfdec_ring_buffer_new_for_type (SwfdecPlayerAction, 16);
diff --git a/libswfdec/swfdec_player_internal.h b/libswfdec/swfdec_player_internal.h
index 9153aae..ec7f914 100644
--- a/libswfdec/swfdec_player_internal.h
+++ b/libswfdec/swfdec_player_internal.h
@@ -24,6 +24,7 @@
 #include <libswfdec/swfdec_as_context.h>
 #include <libswfdec/swfdec_rect.h>
 #include <libswfdec/swfdec_ringbuffer.h>
+#include <libswfdec/swfdec_system.h>
 
 G_BEGIN_DECLS
 
@@ -51,6 +52,7 @@ struct _SwfdecPlayer
   SwfdecAsContext	context;
 
   /* global properties */
+  SwfdecSystem *	system;			/* our system properties */
   gboolean		initialized;		/* if width and height are set already */
   guint		  	rate;			/* divide by 256 to get iterations per second */
   guint			width;			/* width of movie */
diff-tree 5393dfcf8b8d98191556c89ff57ec7b674f15a73 (from be675b5620eea36d607af711b544ce67dc732368)
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Aug 27 12:32:37 2007 +0200

    fix initial copy-paste issues

diff --git a/libswfdec/swfdec_system.c b/libswfdec/swfdec_system.c
index ef81c3a..e1620c5 100644
--- a/libswfdec/swfdec_system.c
+++ b/libswfdec/swfdec_system.c
@@ -116,7 +116,7 @@ swfdec_system_get_property (GObject *obj
       g_value_set_double (value, system->par);
       break;
     case PROP_DPI:
-      g_value_set_double (value, system->dpi);
+      g_value_set_uint (value, system->dpi);
       break;
     case PROP_COLOR_MODE:
       g_value_set_string (value, system->color_mode);
@@ -190,7 +190,7 @@ swfdec_system_set_property (GObject *obj
       system->par = g_value_get_double (value);
       break;
     case PROP_DPI:
-      system->dpi = g_value_get_double (value);
+      system->dpi = g_value_get_uint (value);
       break;
     case PROP_COLOR_MODE:
       s = g_value_dup_string (value);
@@ -249,7 +249,7 @@ swfdec_system_class_init (SwfdecSystemCl
       g_param_spec_string ("version", "version", "version string",
 	  "WIN 9.0.100.0", G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
   g_object_class_install_property (object_class, PROP_LANGUAGE,
-      g_param_spec_string ("screen-width", "screen-width", "ISO 639-1 screen-width code",
+      g_param_spec_string ("language", "language", "ISO 639-1 language code",
 	  "en", G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
   g_object_class_install_property (object_class, PROP_SCREEN_WIDTH,
       g_param_spec_uint ("screen-width", "screen width", "width of the screen in pixels",
diff-tree be675b5620eea36d607af711b544ce67dc732368 (from 17ca7b67e7a88ba90b5d3a2bf49a2de050b1949b)
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Aug 27 12:09:01 2007 +0200

    add a SwfdecSystem object to hold system information

diff --git a/libswfdec/Makefile.am b/libswfdec/Makefile.am
index 0555968..c9ff277 100644
--- a/libswfdec/Makefile.am
+++ b/libswfdec/Makefile.am
@@ -103,6 +103,7 @@ libswfdec_ at SWFDEC_MAJORMINOR@_la_SOURCES
 	swfdec_stage_as.c \
 	swfdec_swf_decoder.c \
 	swfdec_swf_instance.c \
+	swfdec_system.c \
 	swfdec_tag.c \
 	swfdec_text.c \
 	swfdec_url.c \
@@ -140,6 +141,7 @@ public_headers = \
 	swfdec_loader.h \
 	swfdec_player.h \
 	swfdec_script.h \
+	swfdec_system.h \
 	swfdec_url.h
 
 libswfdec_ at SWFDEC_MAJORMINOR@_la_LIBADD = jpeg/libjpeg.la 
diff --git a/libswfdec/swfdec.h b/libswfdec/swfdec.h
index 8a4cd65..34d4cfe 100644
--- a/libswfdec/swfdec.h
+++ b/libswfdec/swfdec.h
@@ -38,6 +38,7 @@
 #include <libswfdec/swfdec_keys.h>
 #include <libswfdec/swfdec_loader.h>
 #include <libswfdec/swfdec_player.h>
+#include <libswfdec/swfdec_system.h>
 #include <libswfdec/swfdec_url.h>
 
 #endif
diff --git a/libswfdec/swfdec_system.c b/libswfdec/swfdec_system.c
new file mode 100644
index 0000000..ef81c3a
--- /dev/null
+++ b/libswfdec/swfdec_system.c
@@ -0,0 +1,290 @@
+/* Swfdec
+ * Copyright (C) 2006-2007 Benjamin Otte <otte at gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+ * Boston, MA  02110-1301  USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "swfdec_system.h"
+#include "swfdec_debug.h"
+
+/*** gtk-doc ***/
+
+/**
+ * SECTION:SwfdecSystem
+ * @title: SwfdecSystem
+ * @short_description: object holding system settings
+ * @see_also: SwfdecPlayer
+ *
+ * This object is used to provide information about the system Swfdec currently 
+ * runs on.
+ *
+ * Almost all of this information can be categorized into three types:
+ * Information about the current playback engine like manufacturer or version,
+ * information about the current operating system and capabilities of the output
+ * capabilities of the System like screen size.
+ *
+ * The information provided by this object is used by the Actionscript 
+ * System.capabilities.Query() function that is usually only run once during 
+ * initialization of the Flash player. If you want to set custom properties and
+ * have them affect a running #SwfdecPlayer, you should change them before the
+ * player gets initialized.
+ *
+ * Note that the System.capabilites object in Flash provides more functionality
+ * than provided by this object. That information can be and is determined 
+ * automatically by Swfdec.
+ */
+
+/**
+ * SwfdecSystem:
+ *
+ * This is the object used for holding information about the current system. See
+ * the introduction for details.
+ */
+
+/*** SwfdecSystem ***/
+
+enum {
+  PROP_0,
+  PROP_DEBUGGER,
+  PROP_MANUFACTURER,
+  PROP_OS,
+  PROP_OS_TYPE,
+  PROP_PLAYER_TYPE,
+  PROP_VERSION,
+  PROP_LANGUAGE,
+  PROP_SCREEN_WIDTH,
+  PROP_SCREEN_HEIGHT,
+  PROP_PAR,
+  PROP_DPI,
+  PROP_COLOR_MODE
+};
+
+G_DEFINE_TYPE (SwfdecSystem, swfdec_system, G_TYPE_OBJECT)
+
+static void
+swfdec_system_get_property (GObject *object, guint param_id, GValue *value, 
+    GParamSpec * pspec)
+{
+  SwfdecSystem *system = SWFDEC_SYSTEM (object);
+  
+  switch (param_id) {
+    case PROP_DEBUGGER:
+      g_value_set_boolean (value, system->debugger);
+      break;
+    case PROP_MANUFACTURER:
+      g_value_set_string (value, system->manufacturer);
+      break;
+    case PROP_OS:
+      g_value_set_string (value, system->os);
+      break;
+    case PROP_OS_TYPE:
+      g_value_set_string (value, system->os_type);
+      break;
+    case PROP_PLAYER_TYPE:
+      g_value_set_string (value, system->player_type);
+      break;
+    case PROP_VERSION:
+      g_value_set_string (value, system->version);
+      break;
+    case PROP_LANGUAGE:
+      g_value_set_string (value, system->language);
+      break;
+    case PROP_SCREEN_WIDTH:
+      g_value_set_uint (value, system->screen_width);
+      break;
+    case PROP_SCREEN_HEIGHT:
+      g_value_set_uint (value, system->screen_height);
+      break;
+    case PROP_PAR:
+      g_value_set_double (value, system->par);
+      break;
+    case PROP_DPI:
+      g_value_set_double (value, system->dpi);
+      break;
+    case PROP_COLOR_MODE:
+      g_value_set_string (value, system->color_mode);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
+      break;
+  }
+}
+
+static void
+swfdec_system_set_property (GObject *object, guint param_id, const GValue *value,
+    GParamSpec *pspec)
+{
+  SwfdecSystem *system = SWFDEC_SYSTEM (object);
+  char *s;
+
+  switch (param_id) {
+    case PROP_DEBUGGER:
+      system->debugger = g_value_get_boolean (value);
+      break;
+    case PROP_MANUFACTURER:
+      s = g_value_dup_string (value);
+      if (s) {
+	g_free (system->manufacturer);
+	system->manufacturer = s;
+      }
+      break;
+    case PROP_OS:
+      s = g_value_dup_string (value);
+      if (s) {
+	g_free (system->os);
+	system->os = s;
+      }
+      break;
+    case PROP_OS_TYPE:
+      s = g_value_dup_string (value);
+      if (s) {
+	g_free (system->os_type);
+	system->os_type = s;
+      }
+      break;
+    case PROP_PLAYER_TYPE:
+      s = g_value_dup_string (value);
+      if (s) {
+	g_free (system->player_type);
+	system->player_type = s;
+      }
+      break;
+    case PROP_VERSION:
+      s = g_value_dup_string (value);
+      if (s) {
+	g_free (system->version);
+	system->version = s;
+      }
+      break;
+    case PROP_LANGUAGE:
+      s = g_value_dup_string (value);
+      if (s) {
+	g_free (system->language);
+	system->language = s;
+      }
+      break;
+    case PROP_SCREEN_WIDTH:
+      system->screen_width = g_value_get_uint (value);
+      break;
+    case PROP_SCREEN_HEIGHT:
+      system->screen_height = g_value_get_uint (value);
+      break;
+    case PROP_PAR:
+      system->par = g_value_get_double (value);
+      break;
+    case PROP_DPI:
+      system->dpi = g_value_get_double (value);
+      break;
+    case PROP_COLOR_MODE:
+      s = g_value_dup_string (value);
+      if (s) {
+	g_free (system->color_mode);
+	system->color_mode = s;
+      }
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
+      break;
+  }
+}
+
+static void
+swfdec_system_finalize (GObject *object)
+{
+  SwfdecSystem *system = SWFDEC_SYSTEM (object);
+
+  g_free (system->manufacturer);
+  g_free (system->os);
+  g_free (system->os_type);
+  g_free (system->player_type);
+  g_free (system->version);
+  g_free (system->language);
+  g_free (system->color_mode);
+
+  G_OBJECT_CLASS (swfdec_system_parent_class)->finalize (object);
+}
+
+static void
+swfdec_system_class_init (SwfdecSystemClass *klass)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  object_class->finalize = swfdec_system_finalize;
+  object_class->get_property = swfdec_system_get_property;
+  object_class->set_property = swfdec_system_set_property;
+
+  g_object_class_install_property (object_class, PROP_DEBUGGER,
+      g_param_spec_boolean ("debugger", "debugger", "TRUE if this player is supposed to be a debugger",
+	  FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+  g_object_class_install_property (object_class, PROP_MANUFACTURER,
+      g_param_spec_string ("manufacturer", "manufacturer", "string describing the manufacturer of this system",
+	  "Macromedia Windows", G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+  g_object_class_install_property (object_class, PROP_OS,
+      g_param_spec_string ("os", "os", "description of the operating system",
+	  "Windows XP", G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+  g_object_class_install_property (object_class, PROP_OS_TYPE,
+      g_param_spec_string ("os-type", "os type", "the operating system type: WIN, LIN or MAC",
+	  "WIN", G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+  g_object_class_install_property (object_class, PROP_PLAYER_TYPE,
+      g_param_spec_string ("player-type", "player type", "\"StandAlone\", \"External\", \"PlugIn\" or \"ActiveX\"",
+	  "StandAlone", G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+  g_object_class_install_property (object_class, PROP_VERSION,
+      g_param_spec_string ("version", "version", "version string",
+	  "WIN 9.0.100.0", G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+  g_object_class_install_property (object_class, PROP_LANGUAGE,
+      g_param_spec_string ("screen-width", "screen-width", "ISO 639-1 screen-width code",
+	  "en", G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+  g_object_class_install_property (object_class, PROP_SCREEN_WIDTH,
+      g_param_spec_uint ("screen-width", "screen width", "width of the screen in pixels",
+	  0, G_MAXUINT, 1024, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+  g_object_class_install_property (object_class, PROP_SCREEN_HEIGHT,
+      g_param_spec_uint ("screen-height", "screen height", "height of the screen in pixels",
+	  0, G_MAXUINT, 768, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+  g_object_class_install_property (object_class, PROP_PAR,
+      g_param_spec_double ("pixel-aspect-ratio", "pixel aspect ratio", "the screen's pixel aspect ratio",
+	  G_MINDOUBLE, G_MAXDOUBLE, 1.0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+  g_object_class_install_property (object_class, PROP_DPI,
+      g_param_spec_uint ("dpi", "dpi", "DPI setting of screen",
+	  0, G_MAXUINT, 96, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+  g_object_class_install_property (object_class, PROP_COLOR_MODE,
+      g_param_spec_string ("color-mode", "color mode", "\"color\", \"gray\" or \"bw\"",
+	  "color", G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+}
+
+static void
+swfdec_system_init (SwfdecSystem *system)
+{
+}
+
+/**
+ * swfdec_system_new:
+ *
+ * Creates a new #SwfdecSystem object using default settings. These settings are 
+ * mirroring the most common settings used by a Flash player. Currently this is
+ * equivalent to a Flash player running on Windows XP.
+ *
+ * Returns: a new #SwfdecSystem object
+ **/
+SwfdecSystem *
+swfdec_system_new (void)
+{
+  return g_object_new (SWFDEC_TYPE_SYSTEM, NULL);
+}
+
diff --git a/libswfdec/swfdec_system.h b/libswfdec/swfdec_system.h
new file mode 100644
index 0000000..6bb3a40
--- /dev/null
+++ b/libswfdec/swfdec_system.h
@@ -0,0 +1,72 @@
+/* Swfdec
+ * Copyright (C) 2006-2007 Benjamin Otte <otte at gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+ * Boston, MA  02110-1301  USA
+ */
+
+#ifndef _SWFDEC_SYSTEM_H_
+#define _SWFDEC_SYSTEM_H_
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+typedef struct _SwfdecSystem SwfdecSystem;
+typedef struct _SwfdecSystemClass SwfdecSystemClass;
+
+#define SWFDEC_TYPE_SYSTEM                    (swfdec_system_get_type())
+#define SWFDEC_IS_SYSTEM(obj)                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_SYSTEM))
+#define SWFDEC_IS_SYSTEM_CLASS(klass)         (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_SYSTEM))
+#define SWFDEC_SYSTEM(obj)                    (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_SYSTEM, SwfdecSystem))
+#define SWFDEC_SYSTEM_CLASS(klass)            (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_SYSTEM, SwfdecSystemClass))
+#define SWFDEC_SYSTEM_GET_CLASS(obj)          (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_SYSTEM, SwfdecSystemClass))
+
+struct _SwfdecSystem
+{
+  GObject		object;
+
+  /*< private >*/
+  /* player engine */
+  gboolean		debugger;	/* TRUE if this engine is debugging */
+  char *		manufacturer;	/* note that this includes OS information */
+  char *		os;		/* supposed to identify the operating system */
+  char *		os_type;	/* usually WIN, LIN or MAC */
+  char *		player_type;	/* "StandAlone", "External", "PlugIn" or "ActiveX" */
+  char *		version;	/* string of type "os_type MAJOR.MINOR.MACRO.MICRO" */
+  
+  /* system */
+  char *		language;	/* ISO 639-1 language code */
+
+  /* screen */
+  guint			screen_width;	/* width of screen */
+  guint			screen_height;	/* height of screen */
+  double		par;		/* pixel aspect ratio */
+  guint			dpi;		/* dpi setting */
+  char *		color_mode;	/* "color", "gray" or "bw" */
+
+};
+
+struct _SwfdecSystemClass
+{
+  GObjectClass		object_class;
+};
+
+GType		swfdec_system_get_type		(void);
+
+SwfdecSystem *	swfdec_system_new		(void);
+
+G_END_DECLS
+#endif


More information about the Swfdec mailing list