[Swfdec-commits] 20 commits - configure.ac doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt NEWS swfdec-gtk/swfdec_playback_pulse.c swfdec/swfdec_as_array.c swfdec/swfdec_as_context.c swfdec/swfdec_as_gcable.h swfdec/swfdec_as_internal.h swfdec/swfdec_as_object.c swfdec/swfdec_as_object.h swfdec/swfdec_as_relay.c swfdec/swfdec_as_relay.h swfdec/swfdec_as_string.c swfdec/swfdec_as_types.c swfdec/swfdec_as_types.h swfdec/swfdec_constant_pool.c swfdec/swfdec_constant_pool.h swfdec/swfdec_renderer.c swfdec/swfdec_resource.c
Benjamin Otte
company at kemper.freedesktop.org
Wed Nov 12 05:21:25 PST 2008
NEWS | 13 +++++
configure.ac | 4 -
doc/Makefile.am | 14 +++++-
doc/swfdec-docs.sgml | 3 -
doc/swfdec-sections.txt | 68 ++++++++++++++++++-------------
swfdec-gtk/swfdec_playback_pulse.c | 4 -
swfdec/swfdec_as_array.c | 2
swfdec/swfdec_as_context.c | 11 ++++-
swfdec/swfdec_as_gcable.h | 1
swfdec/swfdec_as_internal.h | 2
swfdec/swfdec_as_object.c | 42 +++++++++++++++++++
swfdec/swfdec_as_object.h | 9 ----
swfdec/swfdec_as_relay.c | 28 +++++++++++-
swfdec/swfdec_as_relay.h | 1
swfdec/swfdec_as_string.c | 2
swfdec/swfdec_as_types.c | 81 ++++++++++++++++++++++++++++++++-----
swfdec/swfdec_as_types.h | 6 --
swfdec/swfdec_constant_pool.c | 15 +++++-
swfdec/swfdec_constant_pool.h | 1
swfdec/swfdec_renderer.c | 1
swfdec/swfdec_resource.c | 5 +-
21 files changed, 248 insertions(+), 65 deletions(-)
New commits:
commit 861c7ebfe05e4c2a703c32f248e60230bf018768
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Nov 12 14:03:02 2008 +0100
only free constant pools during garbage collection
Ideally, they should be collected on SwfdecResource destruction, but
this requires more work.
diff --git a/swfdec/swfdec_as_context.c b/swfdec/swfdec_as_context.c
index ddfb05a..ce28188 100644
--- a/swfdec/swfdec_as_context.c
+++ b/swfdec/swfdec_as_context.c
@@ -302,6 +302,12 @@ swfdec_as_context_collect_movie (SwfdecAsContext *context, gpointer gc)
swfdec_as_movie_value_free ((SwfdecAsMovieValue *) gc);
}
+static gboolean
+swfdec_as_context_collect_pools (gpointer mem, gpointer pool, gpointer cx)
+{
+ return swfdec_constant_pool_collect (pool);
+}
+
static void
swfdec_as_context_collect (SwfdecAsContext *context)
{
@@ -319,6 +325,9 @@ swfdec_as_context_collect (SwfdecAsContext *context)
context->movies = swfdec_as_gcable_collect (context, context->movies,
swfdec_as_context_collect_movie);
+ g_hash_table_foreach_remove (context->constant_pools,
+ swfdec_as_context_collect_pools, context);
+
SWFDEC_INFO (">> done collecting garbage");
}
diff --git a/swfdec/swfdec_constant_pool.c b/swfdec/swfdec_constant_pool.c
index 9a14312..c7df4f9 100644
--- a/swfdec/swfdec_constant_pool.c
+++ b/swfdec/swfdec_constant_pool.c
@@ -92,6 +92,7 @@ swfdec_constant_pool_new (SwfdecAsContext *context, SwfdecBuffer *buffer, guint
if (context) {
pool->context = context;
g_hash_table_insert (context->constant_pools, buffer->data, pool);
+ swfdec_constant_pool_ref (pool);
}
return pool;
}
@@ -131,9 +132,7 @@ swfdec_constant_pool_unref (SwfdecConstantPool *pool)
if (pool->refcount)
return;
- if (pool->context) {
- g_hash_table_remove (pool->context->constant_pools, pool->buffer->data);
- } else {
+ if (pool->context == NULL) {
guint i;
for (i = 0; i < pool->n_strings; i++) {
g_free (pool->strings[i]);
@@ -143,6 +142,16 @@ swfdec_constant_pool_unref (SwfdecConstantPool *pool)
g_slice_free1 (sizeof (SwfdecConstantPool) + (MAX (1, pool->n_strings) - 1) * sizeof (char *), pool);
}
+gboolean
+swfdec_constant_pool_collect (SwfdecConstantPool *pool)
+{
+ if (pool->refcount) {
+ swfdec_constant_pool_unref (pool);
+ return TRUE;
+ }
+ return FALSE;
+}
+
/**
* swfdec_constant_pool_size:
* @pool: a pool
diff --git a/swfdec/swfdec_constant_pool.h b/swfdec/swfdec_constant_pool.h
index 3592dbc..462ad13 100644
--- a/swfdec/swfdec_constant_pool.h
+++ b/swfdec/swfdec_constant_pool.h
@@ -35,6 +35,7 @@ SwfdecConstantPool * swfdec_constant_pool_new (SwfdecAsContext * context,
guint version);
SwfdecConstantPool * swfdec_constant_pool_ref (SwfdecConstantPool * pool);
void swfdec_constant_pool_unref (SwfdecConstantPool * pool);
+gboolean swfdec_constant_pool_collect (SwfdecConstantPool * pool);
guint swfdec_constant_pool_size (SwfdecConstantPool * pool);
const char * swfdec_constant_pool_get (SwfdecConstantPool * pool,
commit 4eae7cd012909849eb6f3309d72b7ffc1b25637e
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Nov 12 14:01:24 2008 +0100
don't assert a movie exists in open
There might not be one, as opening can happen way later than creating
the movie and lots of stuff can have happened
diff --git a/swfdec/swfdec_resource.c b/swfdec/swfdec_resource.c
index c1f498b..85197d0 100644
--- a/swfdec/swfdec_resource.c
+++ b/swfdec/swfdec_resource.c
@@ -213,7 +213,10 @@ swfdec_resource_stream_target_open (SwfdecStreamTarget *target, SwfdecStream *st
g_assert (SWFDEC_AS_VALUE_IS_MOVIE (instance->movie));
movie = SWFDEC_AS_VALUE_GET_MOVIE (instance->movie);
- g_assert (movie);
+ if (movie == NULL) {
+ SWFDEC_FIXME ("no movie, what now?");
+ return;
+ }
object = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (movie));
query = swfdec_url_get_query (swfdec_loader_get_url (loader));
if (query) {
commit 007c22f75fc9f21537e08781c895094b9c17cc01
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Nov 12 09:57:12 2008 +0100
fix typo in documentation
diff --git a/swfdec/swfdec_as_context.c b/swfdec/swfdec_as_context.c
index 84ac4f7..ddfb05a 100644
--- a/swfdec/swfdec_as_context.c
+++ b/swfdec/swfdec_as_context.c
@@ -127,7 +127,7 @@
/**
* SwfdecAsContext
*
- * This is the main object ued to hold the state of a script engine. All members
+ * This is the main object used to hold the state of a script engine. All members
* are private and should not be accessed.
*
* Subclassing this structure to get scripting support in your own appliation is
commit d297cadf0220f013f8c08c070921a05c8c413e17
Author: Benjamin Otte <otte at gnome.org>
Date: Tue Nov 11 18:31:19 2008 +0100
back to development
diff --git a/configure.ac b/configure.ac
index 761e555..9705bab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ AC_PREREQ([2.58])
m4_define(swfdec_major, 0)
m4_define(swfdec_minor, 9)
-m4_define(swfdec_micro, 2)
+m4_define(swfdec_micro, 3)
AC_INIT(swfdec,[swfdec_major.swfdec_minor.swfdec_micro])
SWFDEC_VERSION_MAJOR=swfdec_major
commit d5403e39a3818cde352919f8e4576e6dc03a4f78
Author: Benjamin Otte <otte at gnome.org>
Date: Tue Nov 11 11:33:32 2008 +0100
release 0.9.2
diff --git a/configure.ac b/configure.ac
index 738b751..761e555 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ AC_PREREQ([2.58])
m4_define(swfdec_major, 0)
m4_define(swfdec_minor, 9)
-m4_define(swfdec_micro, 1)
+m4_define(swfdec_micro, 2)
AC_INIT(swfdec,[swfdec_major.swfdec_minor.swfdec_micro])
SWFDEC_VERSION_MAJOR=swfdec_major
commit 5f27d803bd879453854754c7651cce732a9a3f55
Author: Benjamin Otte <otte at gnome.org>
Date: Tue Nov 11 11:33:14 2008 +0100
update NEWS file for 0.9.2
diff --git a/NEWS b/NEWS
index 7c39d8b..c354ed9 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,17 @@
+ 0.9.2 ("Bloxorz")
+
+Yes, we are breaking things again. The first unstable release leading to
+Swfdec 0.10 contains:
+- rewrite the script interpreter for performance and correctness
+- add a new Movie script value that looks up the correct movie
+- remove most of Vivified and the test suite's HTTP handling as it was unused
+- implement Blur and ColorMatrix filter
+- improve various policy file checks, so files actually load
+- initial support for new video/audio codecs (AAC audio is still missing)
+- lots of memory leaks plugged
+- vast amount of other bugfixes
+
0.8.2 ("Gametrailers")
Here's the first stable release.
commit 0d0cdf06359e8a589b5db9d06f6039770d5d1eac
Author: Benjamin Otte <otte at gnome.org>
Date: Tue Nov 11 10:34:32 2008 +0100
reenable the 100% symbol coverage test
also dump the gtk-doc requirement, so this check actually exists
diff --git a/configure.ac b/configure.ac
index beec59c..738b751 100644
--- a/configure.ac
+++ b/configure.ac
@@ -278,7 +278,7 @@ SWFDEC_GTK_LIBS="\$(top_builddir)/swfdec-gtk/libswfdec-gtk-$SWFDEC_MAJORMINOR.la
AC_SUBST(SWFDEC_GTK_LIBS)
AC_SUBST(SWFDEC_GTK_CFLAGS)
-GTK_DOC_CHECK([1.6])
+GTK_DOC_CHECK([1.10])
if test "x${prefix}" = "xNONE"; then
PACKAGE_PREFIX=${ac_default_prefix}
diff --git a/doc/Makefile.am b/doc/Makefile.am
index f64a82a..7e2f9e8 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -223,4 +223,7 @@ include $(top_srcdir)/gtk-doc.make
EXTRA_DIST +=
# Comment this out if you want your docs-status tested during 'make check'
-#TESTS = $(GTKDOC_CHECK)
+check-local:
+ (cd $(srcdir) \
+ && $(GTKDOC_CHECK))
+
commit 8a6084d6aa722eb8e87aa7dd01ee4623c2fee2cc
Author: Benjamin Otte <otte at gnome.org>
Date: Tue Nov 11 10:30:46 2008 +0100
write the rest of the documentation
100% coverage again \o/
diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt
index 4bbc191..a7f9bf6 100644
--- a/doc/swfdec-sections.txt
+++ b/doc/swfdec-sections.txt
@@ -391,6 +391,7 @@ SwfdecGcObject
SwfdecGcObjectClass
swfdec_gc_object_get_context
swfdec_gc_object_mark
+swfdec_as_object_mark
swfdec_as_string_mark
swfdec_as_value_mark
<SUBSECTION Standard>
@@ -408,21 +409,32 @@ SWFDEC_TYPE_GC_OBJECT
<TITLE>SwfdecAsValue</TITLE>
SwfdecAsValueType
SwfdecAsValue
+SWFDEC_AS_VALUE_GET_TYPE
+SWFDEC_AS_VALUE_UNDEFINED
SWFDEC_AS_VALUE_SET_UNDEFINED
+SWFDEC_AS_VALUE_FALSE
+SWFDEC_AS_VALUE_TRUE
+SWFDEC_AS_VALUE_FROM_BOOLEAN
SWFDEC_AS_VALUE_GET_BOOLEAN
swfdec_as_value_to_boolean
SWFDEC_AS_VALUE_SET_BOOLEAN
SWFDEC_AS_VALUE_GET_NUMBER
+swfdec_as_value_from_number
swfdec_as_value_to_number
+swfdec_as_value_from_integer
swfdec_as_value_to_integer
+SWFDEC_AS_VALUE_FROM_STRING
SWFDEC_AS_VALUE_GET_STRING
swfdec_as_value_to_string
SWFDEC_AS_VALUE_SET_STRING
+SWFDEC_AS_VALUE_NULL
SWFDEC_AS_VALUE_SET_NULL
+SWFDEC_AS_VALUE_FROM_OBJECT
SWFDEC_AS_VALUE_GET_OBJECT
swfdec_as_value_to_object
SWFDEC_AS_VALUE_SET_OBJECT
swfdec_as_value_to_primitive
+swfdec_as_value_get_variable
swfdec_as_double_to_integer
swfdec_as_double_to_string
swfdec_as_integer_to_string
@@ -434,6 +446,13 @@ SWFDEC_AS_VALUE_IS_NUMBER
SWFDEC_AS_VALUE_IS_STRING
SWFDEC_AS_VALUE_IS_NULL
SWFDEC_AS_VALUE_IS_OBJECT
+SWFDEC_AS_VALUE_COMBINE
+SWFDEC_AS_VALUE_TYPE_BITS
+SWFDEC_AS_VALUE_TYPE_MASK
+SWFDEC_AS_VALUE_VALUE_MASK
+SWFDEC_AS_VALUE_GET_VALUE
+SwfdecAsDoubleValue
+SwfdecAsStringValue
</SECTION>
<SECTION>
@@ -489,6 +508,9 @@ SwfdecAsVariableForeach
swfdec_as_object_foreach
swfdec_as_object_run
swfdec_as_object_call
+swfdec_as_object_set_constructor_by_name
+swfdec_as_object_set_constructor_by_namev
+swfdec_as_object_set_relay
swfdec_as_object_add_function
swfdec_as_object_resolve
</SECTION>
diff --git a/swfdec/swfdec_as_object.c b/swfdec/swfdec_as_object.c
index fc91eab..6e9ab92 100644
--- a/swfdec/swfdec_as_object.c
+++ b/swfdec/swfdec_as_object.c
@@ -228,6 +228,13 @@ swfdec_as_object_mark_watch (gpointer key, gpointer value, gpointer unused)
swfdec_as_value_mark (&watch->watch_data);
}
+/**
+ * swfdec_as_object_mark:
+ * @object: the object to mark
+ *
+ * Mark @object as being in use. Calling this function is only valid during
+ * the marking phase of garbage collection.
+ **/
void
swfdec_as_object_mark (SwfdecAsObject *object)
{
@@ -1300,6 +1307,20 @@ swfdec_as_object_create (SwfdecAsFunction *fun, guint n_args,
swfdec_as_function_call_full (fun, new, TRUE, new->prototype, n_args, args, return_value);
}
+/**
+ * swfdec_as_object_set_constructor_by_name:
+ * @object: the object to set a constructor on
+ * @name: first variable name for getting the constructor
+ * @...: %NULL-terminated list of further variables to get
+ *
+ * Sets the constructor of @object to be the objet you get when you get the
+ * variables given by @name and further arguments on the global object. It is
+ * equivalent to calling swfdec_as_object_get_variable() with the names first
+ * and then calling swfdec_as_object_set_constructor() on @object with the
+ * final result.
+ *
+ * Returns: The actual constructor that was set or %NULL on failure
+ **/
SwfdecAsObject *
swfdec_as_object_set_constructor_by_name (SwfdecAsObject *object, const char *name, ...)
{
@@ -1315,6 +1336,17 @@ swfdec_as_object_set_constructor_by_name (SwfdecAsObject *object, const char *na
return ret;
}
+/**
+ * swfdec_as_object_set_constructor_by_namev:
+ * @object: the object to set a constructor on
+ * @name: first variable name for getting the constructor
+ * @args: va_list of further name arguments
+ *
+ * This is the va_list version of swfdec_as_object_set_constructor_by_name().
+ * See that function for details.
+ *
+ * Returns: The actual constructor that was set or %NULL on failure
+ **/
SwfdecAsObject *
swfdec_as_object_set_constructor_by_namev (SwfdecAsObject *object,
const char *name, va_list args)
@@ -1785,10 +1817,20 @@ swfdec_as_object_resolve (SwfdecAsObject *object)
return object;
}
+/**
+ * swfdec_as_object_set_relay:
+ * @object: The object to set a new relay on
+ * @relay: The relay to set
+ *
+ * Associates @object and @relay. This allows you to associate your own data
+ * with a given #SwfdecAsObject, so you can write native functions making use
+ * of this. See #SwfdecAsRelay documentation for details about relays.
+ **/
void
swfdec_as_object_set_relay (SwfdecAsObject *object, SwfdecAsRelay *relay)
{
g_return_if_fail (object != NULL);
+
if (relay) {
g_return_if_fail (SWFDEC_IS_AS_RELAY (relay));
g_return_if_fail (relay->relay == NULL);
diff --git a/swfdec/swfdec_as_types.c b/swfdec/swfdec_as_types.c
index ce71ecc..5432ade 100644
--- a/swfdec/swfdec_as_types.c
+++ b/swfdec/swfdec_as_types.c
@@ -84,9 +84,21 @@
*
* This is the type used to present an opaque value in the Actionscript
* engine. See #SwfdecAsValueType for possible types. It's similar in
- * spirit to #GValue. The value held is garbage-collected. Apart from the type
- * member, use the provided macros to access this structure.
- * <note>If you memset a SwfdecAsValue to 0, it is a valid undefined value.</note>
+ * spirit to #GValue. Use the provided macros to access this structure.
+ */
+
+/**
+ * SWFDEC_AS_VALUE_GET_TYPE:
+ * @val: The value to extract the type from
+ *
+ * Extracts the type from a given value.
+ */
+
+/**
+ * SWFDEC_AS_VALUE_UNDEFINED:
+ *
+ * The special "undefined" value. Use SWFDEC_AS_VALUE_IS_UNDEFINED() to
+ * check if a value equals this value.
*/
/**
@@ -98,6 +110,18 @@
*/
/**
+ * SWFDEC_AS_VALUE_FALSE:
+ *
+ * The boolean value false.
+ */
+
+/**
+ * SWFDEC_AS_VALUE_TRUE:
+ *
+ * The boolean value true.
+ */
+
+/**
* SWFDEC_AS_VALUE_GET_BOOLEAN:
* @val: value to get, the value must reference a boolean
*
@@ -108,6 +132,17 @@
*/
/**
+ * SWFDEC_AS_VALUE_FROM_BOOLEAN:
+ * @b: boolean to convert
+ *
+ * Converts the given value to a boolean #SwfdecAsValue. When knowing the value
+ * at compile-time, use the static values such as %SWFDEC_AS_VALUE_TRUE instead
+ * of SWFDEC_AS_VALUE_FROM_BOOLEAN(%TRUE).
+ *
+ * Returns: %SWFDEC_AS_VALUE_TRUE or %SWFDEC_AS_VALUE_FALSE
+ */
+
+/**
* SWFDEC_AS_VALUE_SET_BOOLEAN:
* @val: value to set
* @b: boolean value to set, must be either %TRUE or %FALSE
@@ -137,6 +172,15 @@
*/
/**
+ * SWFDEC_AS_VALUE_FROM_STRING:
+ * @s: garbage-collected string to convert
+ *
+ * Converts the given string to a #SwfdecAsValue.
+ *
+ * Returns: a SwfdecAsValue representing the given string
+ */
+
+/**
* SWFDEC_AS_VALUE_SET_STRING:
* @val: value to set
* @s: garbage-collected string to use
@@ -145,6 +189,13 @@
*/
/**
+ * SWFDEC_AS_VALUE_NULL:
+ *
+ * The special "null" value. Use SWFDEC_AS_VALUE_IS_NULL() to
+ * check if a value equals this value.
+ */
+
+/**
* SWFDEC_AS_VALUE_SET_NULL:
* @val: value to set
*
@@ -162,6 +213,15 @@
*/
/**
+ * SWFDEC_AS_VALUE_FROM_OBJECT:
+ * @o: the #SwfdecAsObject to convert
+ *
+ * Converts the given object to a #SwfdecAsValue.
+ *
+ * Returns: a SwfdecAsValue representing the given object
+ */
+
+/**
* SWFDEC_AS_VALUE_SET_OBJECT:
* @val: value to set
* @o: garbage-collected #SwfdecAsObject to use
@@ -173,20 +233,19 @@
/*** actual code ***/
/**
- * swfdec_as_value_set_int:
- * @val: value to set
+ * swfdec_as_value_from_integer:
+ * @cx: The context to use
* @i: integer value to set
*
* Creates a garbage-collected value representing @i and returns it.
- * Sets @val to the given value. Currently this function is a macro that calls
- * swfdec_as_value_set_number(), but this may change in future versions of
- * Swfdec.
+ * Currently this function is a macro that calls swfdec_as_value_set_number(),
+ * but this may change in future versions of Swfdec.
*
* Returns: The new value representing @i
*/
/**
- * swfdec_as_value_set_number:
+ * swfdec_as_value_from_number:
* @context: The context to use
* @number: double value to set
*
diff --git a/swfdec/swfdec_as_types.h b/swfdec/swfdec_as_types.h
index b5a96e3..b668bb0 100644
--- a/swfdec/swfdec_as_types.h
+++ b/swfdec/swfdec_as_types.h
@@ -139,7 +139,7 @@ const char * swfdec_as_str_concat (SwfdecAsContext * cx,
/* variable get/set */
void swfdec_as_value_get_variable (SwfdecAsContext * cx,
- const SwfdecAsValue * val,
+ const SwfdecAsValue * value,
const char * name,
SwfdecAsValue * ret);
commit 72a520327ea65c575c42d520a2aae474e75a223a
Author: Benjamin Otte <otte at gnome.org>
Date: Tue Nov 11 00:50:44 2008 +0100
add more relay symbols
diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt
index 6a9e2cf..4bbc191 100644
--- a/doc/swfdec-sections.txt
+++ b/doc/swfdec-sections.txt
@@ -505,6 +505,9 @@ swfdec_as_relay_get_type
SWFDEC_AS_RELAY
SWFDEC_AS_RELAY_CLASS
SWFDEC_AS_RELAY_GET_CLASS
+SWFDEC_IS_AS_RELAY
+SWFDEC_IS_AS_RELAY_CLASS
+SWFDEC_TYPE_AS_RELAY
</SECTION>
<SECTION>
commit fdbd9368ccf7156f5ebe15bc952ab81564b1e6d9
Author: Benjamin Otte <otte at gnome.org>
Date: Tue Nov 11 00:49:34 2008 +0100
idocument the new movie value type
diff --git a/swfdec/swfdec_as_types.c b/swfdec/swfdec_as_types.c
index 93b8d38..ce71ecc 100644
--- a/swfdec/swfdec_as_types.c
+++ b/swfdec/swfdec_as_types.c
@@ -62,6 +62,7 @@
/**
* SwfdecAsValueType:
* @SWFDEC_AS_TYPE_UNDEFINED: the special undefined value
+ * @SWFDEC_AS_TYPE_NULL: the spaecial null value
* @SWFDEC_AS_TYPE_BOOLEAN: a boolean value - true or false
* @SWFDEC_AS_TYPE_INT: reserved value for integers. Should the need arise for
* performance enhancements - especially on embedded
@@ -70,8 +71,9 @@
* it will cause Swfdec to crash.
* @SWFDEC_AS_TYPE_NUMBER: a double value - also used for integer numbers
* @SWFDEC_AS_TYPE_STRING: a string. Strings are garbage-collected and unique.
- * @SWFDEC_AS_TYPE_NULL: the spaecial null value
* @SWFDEC_AS_TYPE_OBJECT: an object - must be of type #SwfdecAsObject
+ * @SWFDEC_AS_TYPE_MOVIE: an internal type used only inside #SwfdecPlayer
+ * objects. It is not exported in the API.
*
* These are the possible values the Swfdec Actionscript engine knows about.
*/
commit 9e7b14235c2c110ceeb598c8bc35be80855c8082
Author: Benjamin Otte <otte at gnome.org>
Date: Tue Nov 11 00:47:50 2008 +0100
remove unused leftover function definition
diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt
index 68ea280..6a9e2cf 100644
--- a/doc/swfdec-sections.txt
+++ b/doc/swfdec-sections.txt
@@ -490,7 +490,6 @@ swfdec_as_object_foreach
swfdec_as_object_run
swfdec_as_object_call
swfdec_as_object_add_function
-swfdec_as_object_add_constructor
swfdec_as_object_resolve
</SECTION>
diff --git a/swfdec/swfdec_as_object.h b/swfdec/swfdec_as_object.h
index 1e2442e..f1acba9 100644
--- a/swfdec/swfdec_as_object.h
+++ b/swfdec/swfdec_as_object.h
@@ -130,12 +130,6 @@ gboolean swfdec_as_object_foreach (SwfdecAsObject * object,
SwfdecAsFunction *swfdec_as_object_add_function (SwfdecAsObject * object,
const char * name,
SwfdecAsNative native);
-SwfdecAsFunction *swfdec_as_object_add_constructor
- (SwfdecAsObject * object,
- const char * name,
- GType construct_type,
- SwfdecAsNative native,
- SwfdecAsObject * prototype);
gboolean swfdec_as_object_call (SwfdecAsObject * object,
const char * name,
commit 456ef4c4df8937208a048d56c02556f3570ec3e6
Author: Benjamin Otte <otte at gnome.org>
Date: Tue Nov 11 00:44:54 2008 +0100
fix array documentation
diff --git a/doc/swfdec-docs.sgml b/doc/swfdec-docs.sgml
index 96a68bb..7e707b4 100644
--- a/doc/swfdec-docs.sgml
+++ b/doc/swfdec-docs.sgml
@@ -38,7 +38,7 @@
<xi:include href="xml/SwfdecAsContext.xml"/>
<xi:include href="xml/SwfdecAsObject.xml"/>
<xi:include href="xml/SwfdecAsRelay.xml"/>
- <xi:include href="xml/SwfdecAsArray.xml"/>
+ <xi:include href="xml/Arrays.xml"/>
<xi:include href="xml/SwfdecAsFunction.xml"/>
<xi:include href="xml/SwfdecAsFrame.xml"/>
<xi:include href="xml/SwfdecAsDebugger.xml"/>
diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt
index 3e2145e..68ea280 100644
--- a/doc/swfdec-sections.txt
+++ b/doc/swfdec-sections.txt
@@ -509,8 +509,8 @@ SWFDEC_AS_RELAY_GET_CLASS
</SECTION>
<SECTION>
-<FILE>SwfdecAsArray</FILE>
-<TITLE>SwfdecAsArray</TITLE>
+<FILE>Arrays</FILE>
+<TITLE>Arrays</TITLE>
swfdec_as_array_new
swfdec_as_array_append
swfdec_as_array_append_with_flags
diff --git a/swfdec/swfdec_as_array.c b/swfdec/swfdec_as_array.c
index 6f39136..592b6a8 100644
--- a/swfdec/swfdec_as_array.c
+++ b/swfdec/swfdec_as_array.c
@@ -40,7 +40,7 @@
/**
* SECTION:Arrays
* @title: arrays
- * @short_description: the array object
+ * @short_description: utility functions for treating objects as arrays
*
* The array object provides some convenience functions for creating and
* modifying arrays.
commit 448b805fc4f89fef2632f9149739ada0683dbfe6
Author: Benjamin Otte <otte at gnome.org>
Date: Tue Nov 11 00:43:19 2008 +0100
document relays
diff --git a/doc/swfdec-docs.sgml b/doc/swfdec-docs.sgml
index 4b5de7e..96a68bb 100644
--- a/doc/swfdec-docs.sgml
+++ b/doc/swfdec-docs.sgml
@@ -37,6 +37,7 @@
<xi:include href="xml/SwfdecAsValue.xml"/>
<xi:include href="xml/SwfdecAsContext.xml"/>
<xi:include href="xml/SwfdecAsObject.xml"/>
+ <xi:include href="xml/SwfdecAsRelay.xml"/>
<xi:include href="xml/SwfdecAsArray.xml"/>
<xi:include href="xml/SwfdecAsFunction.xml"/>
<xi:include href="xml/SwfdecAsFrame.xml"/>
diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt
index a9d8600..3e2145e 100644
--- a/doc/swfdec-sections.txt
+++ b/doc/swfdec-sections.txt
@@ -495,6 +495,20 @@ swfdec_as_object_resolve
</SECTION>
<SECTION>
+<FILE>SwfdecAsRelay</FILE>
+<TITLE>SwfdecAsRelay</TITLE>
+SwfdecAsRelay
+SwfdecAsRelayClass
+swfdec_as_relay_call
+swfdec_as_relay_get_as_object
+<SUBSECTION Standard>
+swfdec_as_relay_get_type
+SWFDEC_AS_RELAY
+SWFDEC_AS_RELAY_CLASS
+SWFDEC_AS_RELAY_GET_CLASS
+</SECTION>
+
+<SECTION>
<FILE>SwfdecAsArray</FILE>
<TITLE>SwfdecAsArray</TITLE>
swfdec_as_array_new
diff --git a/swfdec/swfdec_as_relay.c b/swfdec/swfdec_as_relay.c
index 4c0d238..f5babc9 100644
--- a/swfdec/swfdec_as_relay.c
+++ b/swfdec/swfdec_as_relay.c
@@ -28,6 +28,30 @@
#include "swfdec_as_object.h"
#include "swfdec_as_function.h"
+/**
+ * SECTION:SwfdecAsRelay
+ * @title: SwfdecAsRelay
+ * @short_description: object for attaching to Actionscript objects
+ *
+ * #SwfdecAsRelay objects can be attached to a #SwfdecAsObject using
+ * swfdec_as_object_relay(). You can then query an object for its relay in
+ * your own native function and use it there, for example by using
+ * SWFDEC_AS_CHECK().
+ */
+
+/**
+ * SwfdecAsRelay:
+ *
+ * This object has no public members.
+ */
+
+/**
+ * SwfdecAsRelayClass:
+ *
+ * This is the base class for all objects that can be attached to a
+ * #SwfdecAsObject. It has no virtual functions.
+ */
+
G_DEFINE_ABSTRACT_TYPE (SwfdecAsRelay, swfdec_as_relay, SWFDEC_TYPE_GC_OBJECT)
static void
@@ -56,7 +80,7 @@ swfdec_as_relay_init (SwfdecAsRelay *object)
/**
* swfdec_as_relay_get_as_object:
- * @object: a #SwfdecAsRelay.
+ * @relay: a #SwfdecAsRelay.
*
* Gets the Actionscript object associated with this object.
*
@@ -73,7 +97,7 @@ swfdec_as_relay_get_as_object (SwfdecAsRelay *relay)
/**
* swfdec_as_relay_call:
- * @object: a #SwfdecAsRelay
+ * @relay: a #SwfdecAsRelay
* @name: garbage-collected string naming the function to call.
* @argc: number of arguments to provide to function
* @argv: arguments or %NULL when @argc is 0
diff --git a/swfdec/swfdec_as_relay.h b/swfdec/swfdec_as_relay.h
index d574088..55cd3fa 100644
--- a/swfdec/swfdec_as_relay.h
+++ b/swfdec/swfdec_as_relay.h
@@ -37,6 +37,7 @@ typedef struct _SwfdecAsRelayClass SwfdecAsRelayClass;
struct _SwfdecAsRelay {
/*< protected >*/
SwfdecGcObject object;
+ /*< private >*/
SwfdecAsObject * relay;
};
commit 03b0c6c57d98cf0f9f4ef55d8b07708b66582fc7
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Nov 10 19:51:17 2008 +0100
ignore the new private headers
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 4e9a69f..f64a82a 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -56,9 +56,11 @@ IGNORE_HFILES= \
swfdec_as_boolean.h \
swfdec_as_date.h \
swfdec_as_frame_internal.h \
+ swfdec_as_gcable.h \
swfdec_as_internal.h \
swfdec_as_interpret.h \
swfdec_as_math.h \
+ swfdec_as_movie_value.h \
swfdec_as_number.h \
swfdec_as_scope.h \
swfdec_as_script_function.h \
@@ -82,6 +84,7 @@ IGNORE_HFILES= \
swfdec_bitmap_movie.h \
swfdec_bitmap_pattern.h \
swfdec_bits.h \
+ swfdec_blur_filter.h \
swfdec_bots.h \
swfdec_button.h \
swfdec_button_movie.h \
@@ -93,12 +96,17 @@ IGNORE_HFILES= \
swfdec_codec_gst.h \
swfdec_color.h \
swfdec_color_as.h \
+ swfdec_color_matrix_filter.h \
swfdec_color_transform_as.h \
+ swfdec_convolution_matrix.h \
swfdec_constant_pool.h \
swfdec_debug.h \
swfdec_debugger.h \
swfdec_decoder.h \
+ swfdec_display_object.h \
+ swfdec_display_object_container.h \
swfdec_draw.h \
+ swfdec_event_dispatcher.h \
swfdec_text_field.h \
swfdec_text_field_movie.h \
swfdec_enums.h \
@@ -112,6 +120,7 @@ IGNORE_HFILES= \
swfdec_graphic_movie.h \
swfdec_image.h \
swfdec_image_decoder.h \
+ swfdec_interactive_object.h \
swfdec_internal.h \
swfdec_interval.h \
swfdec_js.h \
commit b9c5d1cce9f2e45f92e96918b36f8b949f1d9fce
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Nov 10 19:47:21 2008 +0100
make SwfdecAsGcable private
diff --git a/swfdec/swfdec_as_gcable.h b/swfdec/swfdec_as_gcable.h
index 2c7a27c..b6c2ad9 100644
--- a/swfdec/swfdec_as_gcable.h
+++ b/swfdec/swfdec_as_gcable.h
@@ -30,6 +30,7 @@ G_BEGIN_DECLS
#define SWFDEC_AS_GC_ROOT (1 << 1)
#define SWFDEC_AS_GC_ALIGN (1 << 2)
+typedef struct _SwfdecAsGcable SwfdecAsGcable;
struct _SwfdecAsGcable {
SwfdecAsGcable * next;
};
diff --git a/swfdec/swfdec_as_internal.h b/swfdec/swfdec_as_internal.h
index 4f64951..cf066d3 100644
--- a/swfdec/swfdec_as_internal.h
+++ b/swfdec/swfdec_as_internal.h
@@ -37,6 +37,8 @@ G_BEGIN_DECLS
#define SWFDEC_AS_OBJECT_PROTOTYPE_RECURSION_LIMIT 256
/* swfdec_as_types.h */
+#define SWFDEC_AS_TYPE_IS_GCABLE(type) ((type) & 4)
+
#define SWFDEC_AS_VALUE_IS_COMPOSITE(val) (SWFDEC_AS_VALUE_GET_TYPE (val) >= SWFDEC_AS_TYPE_OBJECT)
#define SWFDEC_AS_VALUE_IS_PRIMITIVE(val) (!SWFDEC_AS_VALUE_IS_COMPOSITE(val))
/* FIXME: ugly macro */
diff --git a/swfdec/swfdec_as_object.h b/swfdec/swfdec_as_object.h
index 9efa95c..1e2442e 100644
--- a/swfdec/swfdec_as_object.h
+++ b/swfdec/swfdec_as_object.h
@@ -49,7 +49,7 @@ typedef gboolean (* SwfdecAsVariableForeach) (SwfdecAsObject *object,
struct _SwfdecAsObject {
/*< private >*/
- SwfdecAsGcable * next; /* GC management */
+ SwfdecAsObject * next; /* GC management */
SwfdecAsContext * context; /* the context that manages the object */
gboolean array:1; /* TRUE if object is an array */
gboolean super:1; /* TRUE if object is a super object */
diff --git a/swfdec/swfdec_as_types.h b/swfdec/swfdec_as_types.h
index 756e8c1..b5a96e3 100644
--- a/swfdec/swfdec_as_types.h
+++ b/swfdec/swfdec_as_types.h
@@ -36,14 +36,12 @@ typedef enum {
SWFDEC_AS_TYPE_OBJECT = 6,
SWFDEC_AS_TYPE_MOVIE = 7
} SwfdecAsValueType;
-#define SWFDEC_AS_TYPE_IS_GCABLE(type) ((type) & 4)
typedef struct _SwfdecAsContext SwfdecAsContext;
typedef struct _SwfdecAsDebugger SwfdecAsDebugger;
typedef struct _SwfdecAsDoubleValue SwfdecAsDoubleValue;
typedef struct _SwfdecAsFrame SwfdecAsFrame;
typedef struct _SwfdecAsFunction SwfdecAsFunction;
-typedef struct _SwfdecAsGcable SwfdecAsGcable;
typedef struct _SwfdecAsObject SwfdecAsObject;
typedef struct _SwfdecAsRelay SwfdecAsRelay;
typedef struct _SwfdecAsScope SwfdecAsScope;
@@ -83,7 +81,7 @@ typedef struct _SwfdecScript SwfdecScript;
} G_STMT_END
struct _SwfdecAsDoubleValue {
- SwfdecAsGcable * next;
+ SwfdecAsDoubleValue * next;
double number;
};
commit 1bae67b0b39d146489db7a5cfc9249be806e1041
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Nov 10 19:27:55 2008 +0100
SwfdecAsObjectClass is gone now
diff --git a/swfdec/swfdec_as_object.h b/swfdec/swfdec_as_object.h
index 43c50a5..9efa95c 100644
--- a/swfdec/swfdec_as_object.h
+++ b/swfdec/swfdec_as_object.h
@@ -44,7 +44,6 @@ typedef enum {
SWFDEC_AS_DELETE_NOT_DELETED
} SwfdecAsDeleteReturn;
-typedef struct _SwfdecAsObjectClass SwfdecAsObjectClass;
typedef gboolean (* SwfdecAsVariableForeach) (SwfdecAsObject *object,
const char *variable, SwfdecAsValue *value, guint flags, gpointer data);
commit 63cfba52ee7ef4950b11fe01e6a766ec361a13f8
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Nov 10 19:25:10 2008 +0100
remove old symbols
diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt
index bb09427..a9d8600 100644
--- a/doc/swfdec-sections.txt
+++ b/doc/swfdec-sections.txt
@@ -415,8 +415,6 @@ SWFDEC_AS_VALUE_SET_BOOLEAN
SWFDEC_AS_VALUE_GET_NUMBER
swfdec_as_value_to_number
swfdec_as_value_to_integer
-SWFDEC_AS_VALUE_SET_INT
-SWFDEC_AS_VALUE_SET_NUMBER
SWFDEC_AS_VALUE_GET_STRING
swfdec_as_value_to_string
SWFDEC_AS_VALUE_SET_STRING
@@ -425,13 +423,11 @@ SWFDEC_AS_VALUE_GET_OBJECT
swfdec_as_value_to_object
SWFDEC_AS_VALUE_SET_OBJECT
swfdec_as_value_to_primitive
-swfdec_as_value_to_debug
swfdec_as_double_to_integer
swfdec_as_double_to_string
swfdec_as_integer_to_string
swfdec_as_str_concat
<SUBSECTION Standard>
-SWFDEC_IS_AS_VALUE
SWFDEC_AS_VALUE_IS_UNDEFINED
SWFDEC_AS_VALUE_IS_BOOLEAN
SWFDEC_AS_VALUE_IS_NUMBER
@@ -495,23 +491,12 @@ swfdec_as_object_run
swfdec_as_object_call
swfdec_as_object_add_function
swfdec_as_object_add_constructor
-swfdec_as_object_get_debug
swfdec_as_object_resolve
-<SUBSECTION Standard>
-swfdec_as_object_get_type
-SwfdecAsObjectClass
-SWFDEC_AS_OBJECT
-SWFDEC_AS_OBJECT_CLASS
-SWFDEC_AS_OBJECT_GET_CLASS
-SWFDEC_IS_AS_OBJECT
-SWFDEC_IS_AS_OBJECT_CLASS
-SWFDEC_TYPE_AS_OBJECT
</SECTION>
<SECTION>
<FILE>SwfdecAsArray</FILE>
<TITLE>SwfdecAsArray</TITLE>
-SwfdecAsArray
swfdec_as_array_new
swfdec_as_array_append
swfdec_as_array_append_with_flags
@@ -524,15 +509,6 @@ swfdec_as_array_set_length
swfdec_as_array_get_value
swfdec_as_array_set_value
swfdec_as_array_remove
-<SUBSECTION Standard>
-swfdec_as_array_get_type
-SwfdecAsArrayClass
-SWFDEC_AS_ARRAY
-SWFDEC_AS_ARRAY_CLASS
-SWFDEC_AS_ARRAY_GET_CLASS
-SWFDEC_IS_AS_ARRAY
-SWFDEC_IS_AS_ARRAY_CLASS
-SWFDEC_TYPE_AS_ARRAY
</SECTION>
<SECTION>
@@ -544,7 +520,6 @@ SwfdecAsNativeFunction
swfdec_as_function_call
swfdec_as_function_call_full
swfdec_as_native_function_new
-swfdec_as_native_function_set_construct_type
swfdec_as_native_function_check
swfdec_as_native_function_checkv
SWFDEC_AS_CHECK
@@ -573,7 +548,6 @@ SWFDEC_TYPE_AS_NATIVE_FUNCTION
SwfdecAsFrame
swfdec_as_frame_get_next
swfdec_as_frame_get_script
-swfdec_as_frame_get_this
SwfdecAsStackIterator
swfdec_as_stack_iterator_init
swfdec_as_stack_iterator_init_arguments
commit 374d3fa055499b9a59dcd1f561a0523bc3fe8142
Author: Riccardo Magliocchetti <riccardo at datahost.it>
Date: Mon Nov 10 19:20:52 2008 +0100
zero memory when using it in PA
diff --git a/swfdec-gtk/swfdec_playback_pulse.c b/swfdec-gtk/swfdec_playback_pulse.c
index 5aa85f0..e884005 100644
--- a/swfdec-gtk/swfdec_playback_pulse.c
+++ b/swfdec-gtk/swfdec_playback_pulse.c
@@ -74,7 +74,7 @@ stream_write_callback (pa_stream *pa,
/* Adjust to our rounded-down number */
bytes = samples * SAMPLESIZE * CHANNELS;
- frag = malloc (bytes);
+ frag = g_try_malloc0 (bytes);
if (frag == NULL) {
g_printerr ("Failed to allocate fragment of size %d\n", (int)bytes);
return;
@@ -96,7 +96,7 @@ stream_write_callback (pa_stream *pa,
/* Advance playback pointer */
stream->offset += samples;
- free(frag);
+ g_free (frag);
}
static void
commit 148e0a988404229fcd27ea9d9a5155b30d1d99e7
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Nov 10 17:15:09 2008 +0100
mark transformed images as dirty
diff --git a/swfdec/swfdec_renderer.c b/swfdec/swfdec_renderer.c
index 3c9b252..787e592 100644
--- a/swfdec/swfdec_renderer.c
+++ b/swfdec/swfdec_renderer.c
@@ -449,6 +449,7 @@ swfdec_renderer_transform (SwfdecRenderer *renderer, cairo_surface_t *surface,
}
data += stride;
}
+ cairo_surface_mark_dirty (target);
return target;
}
commit 57220588fbec85b47c5a7175b9442c31868cbe7c
Author: Benjamin Otte <otte at gnome.org>
Date: Sun Nov 9 09:39:31 2008 +0100
check the right value for an error
diff --git a/swfdec/swfdec_as_string.c b/swfdec/swfdec_as_string.c
index 2d2e269..7bbd314 100644
--- a/swfdec/swfdec_as_string.c
+++ b/swfdec/swfdec_as_string.c
@@ -710,7 +710,7 @@ swfdec_as_string_escape (SwfdecAsContext *cx, const char *s)
array = g_byte_array_new ();
if (cx->version <= 5) {
in = g_convert (s, -1, "LATIN1", "UTF-8", NULL, NULL, NULL);
- if (s == NULL) {
+ if (in == NULL) {
SWFDEC_FIXME ("%s can not be converted to utf8 - is this Flash 5 or what?", s);
return NULL;
} else {
More information about the Swfdec-commits
mailing list