[Swfdec-commits] 6 commits - swfdec/Makefile.am swfdec/swfdec_amf.h swfdec/swfdec_asnative.h swfdec/swfdec_bits.h swfdec/swfdec_buffer.h swfdec/swfdec_codec_gst.h swfdec/swfdec_color.h swfdec/swfdec_debug.h swfdec/swfdec_player.c swfdec/swfdec_rectangle.h swfdec/swfdec_rect.h swfdec/swfdec_sound_matrix.h swfdec/swfdec_tag.h swfdec/swfdec_types.h swfdec/swfdec_utils.h tools/swfdec-extract.c

Benjamin Otte company at kemper.freedesktop.org
Fri Jul 4 07:45:05 PDT 2008


 swfdec/Makefile.am           |    2 ++
 swfdec/swfdec_amf.h          |    4 ++++
 swfdec/swfdec_asnative.h     |    3 +++
 swfdec/swfdec_bits.h         |    3 +++
 swfdec/swfdec_buffer.h       |    4 ++++
 swfdec/swfdec_codec_gst.h    |    2 ++
 swfdec/swfdec_color.h        |    3 +++
 swfdec/swfdec_debug.h        |    3 +++
 swfdec/swfdec_player.c       |    8 ++++----
 swfdec/swfdec_rect.h         |    3 +++
 swfdec/swfdec_rectangle.h    |    3 +++
 swfdec/swfdec_sound_matrix.h |    3 +++
 swfdec/swfdec_tag.h          |    9 +++++++--
 swfdec/swfdec_types.h        |    3 +++
 swfdec/swfdec_utils.h        |    5 +++--
 tools/swfdec-extract.c       |    2 +-
 16 files changed, 51 insertions(+), 9 deletions(-)

New commits:
commit 33116babf1bed4603374b70f338cfc04da752583
Author: Benjamin Otte <otte at gnome.org>
Date:   Fri Jul 4 16:41:53 2008 +0200

    fix 0.7-introduced G_BEGIN/END_DECLS missings

diff --git a/swfdec/swfdec_asnative.h b/swfdec/swfdec_asnative.h
index 3ca29ff..e512bb6 100644
--- a/swfdec/swfdec_asnative.h
+++ b/swfdec/swfdec_asnative.h
@@ -22,6 +22,8 @@
 
 #include <swfdec/swfdec_as_native_function.h>
 
+G_BEGIN_DECLS
+
 extern const struct { 
   guint x, y; 
   SwfdecAsNative func; 
@@ -29,4 +31,5 @@ extern const struct {
   GType (* get_type) (void); 
 } native_funcs[];
 
+G_END_DECLS
 #endif
diff --git a/swfdec/swfdec_codec_gst.h b/swfdec/swfdec_codec_gst.h
index 1cb719e..049422d 100644
--- a/swfdec/swfdec_codec_gst.h
+++ b/swfdec/swfdec_codec_gst.h
@@ -25,6 +25,7 @@
 #include <gst/gst.h>
 #include <swfdec/swfdec.h>
 
+G_BEGIN_DECLS
 
 typedef struct {
   GstElement *		bin;
@@ -55,5 +56,6 @@ GstElementFactory *
 		swfdec_gst_get_element_factory	(GstCaps *		caps);
 
 
+G_END_DECLS
 #endif
 
diff --git a/swfdec/swfdec_sound_matrix.h b/swfdec/swfdec_sound_matrix.h
index aa0042e..6a0a093 100644
--- a/swfdec/swfdec_sound_matrix.h
+++ b/swfdec/swfdec_sound_matrix.h
@@ -22,6 +22,8 @@
 
 #include <glib.h>
 
+G_BEGIN_DECLS
+
 typedef struct _SwfdecSoundMatrix SwfdecSoundMatrix;
 
 struct _SwfdecSoundMatrix
@@ -52,5 +54,6 @@ void		swfdec_sound_matrix_multiply		(SwfdecSoundMatrix *		dest,
 							 const SwfdecSoundMatrix *	b);
 
 
+G_END_DECLS
 #endif
 
commit c5e908f8942dfd3479854a65746129966e8095c6
Merge: 661b809... 233e204...
Author: Benjamin Otte <otte at gnome.org>
Date:   Fri Jul 4 16:13:02 2008 +0200

    Merge branch '0.6'
    
    Conflicts:
    
    	swfdec/swfdec_codec_audio.h
    	swfdec/swfdec_codec_video.h

commit 233e2045d40b103886efd6f9860cdaefdb82ff57
Author: Benjamin Otte <otte at gnome.org>
Date:   Fri Jul 4 16:10:34 2008 +0200

    update documentation

diff --git a/swfdec/swfdec_player.c b/swfdec/swfdec_player.c
index 5a50c52..d508647 100644
--- a/swfdec/swfdec_player.c
+++ b/swfdec/swfdec_player.c
@@ -2471,12 +2471,12 @@ swfdec_player_mouse_release (SwfdecPlayer *player, double x, double y,
 /**
  * swfdec_player_key_press:
  * @player: a #SwfdecPlayer
- * @keycode: the key that was pressed
+ * @keycode: the key that was pressed, must be smaller than 256.
  * @character: UCS4 of the character that was inserted or 0 if none
  *
- * Call this function to make the @player react to a key press. Be sure to
- * check that keycode transformations are done correctly. For a list of 
- * keycodes see FIXME.
+ * Call this function to make the @player react to a key press. A list of 
+ * defined key codes is defined by #SwfdecKey. You will likely need to 
+ * translate from your keyboard API to the Flash key codes.
  *
  * Returns: %TRUE if the key press was handled by the @player, %FALSE if it
  *          should be propagated further
commit c7a22e53e0031c9c5f3ddbbeb94d0a1ca2c64a4c
Author: Benjamin Otte <otte at gnome.org>
Date:   Fri Jul 4 16:07:34 2008 +0200

    fix all missing G_BEGIN_DECLS G_END_DECLS for inclusion from C++

diff --git a/swfdec/Makefile.am b/swfdec/Makefile.am
index d05145e..6de3b0e 100644
--- a/swfdec/Makefile.am
+++ b/swfdec/Makefile.am
@@ -364,10 +364,12 @@ swfdec_as_strings.h: swfdec_as_strings.c
 	( cd $(srcdir) && echo "/* This is a generated file. See swfdec_as_strings.c for details. */" \
 	  && echo "#ifndef _SWFDEC_AS_STRINGS_H_" \
 	  && echo "#define _SWFDEC_AS_STRINGS_H_" \
+	  && echo "G_BEGIN_DECLS" \
 	  && echo "extern const char swfdec_as_strings[];" \
 	  && grep "  SWFDEC_AS_CONSTANT_STRING" swfdec_as_strings.c \
 	  | sed "s/.*(\"\(.*\)\").*/\1/" \
 	  | LC_ALL="C" $(AWK) '{ if ($$0 == "") name = "EMPTY"; else if ($$0 == ",") name = "COMMA"; else if ($$0 == "/") name = "SLASH"; else name = $$0; gsub("[^a-zA-Z0-9]","_",name); print "#define SWFDEC_AS_STR_" name " &swfdec_as_strings[" x + 1 "]"; x = x + length ($$0) + 2 }' \
+	  && echo "G_END_DECLS" \
 	  && echo "#endif" ) > xgen-sas \
 	&& (cmp -s xgen-sas swfdec_as_strings.h || cp xgen-sas swfdec_as_strings.h ) \
 	&& rm -f xgen-sas
diff --git a/swfdec/swfdec_amf.h b/swfdec/swfdec_amf.h
index 2b493dd..06dde8a 100644
--- a/swfdec/swfdec_amf.h
+++ b/swfdec/swfdec_amf.h
@@ -23,6 +23,8 @@
 #include <swfdec/swfdec_as_context.h>
 #include <swfdec/swfdec_bits.h>
 
+G_BEGIN_DECLS
+
 typedef enum {
   SWFDEC_AMF_NUMBER = 0,
   SWFDEC_AMF_BOOLEAN = 1,
@@ -56,4 +58,6 @@ guint		swfdec_amf_parse		(SwfdecAsContext *	context,
 						 ...);
 
 
+G_END_DECLS
+
 #endif
diff --git a/swfdec/swfdec_bits.h b/swfdec/swfdec_bits.h
index 36e9a6a..891b284 100644
--- a/swfdec/swfdec_bits.h
+++ b/swfdec/swfdec_bits.h
@@ -26,6 +26,8 @@
 #include <swfdec/swfdec_color.h>
 #include <swfdec/swfdec_buffer.h>
 
+G_BEGIN_DECLS
+
 typedef struct _SwfdecBits SwfdecBits;
 
 struct _SwfdecBits
@@ -72,4 +74,5 @@ SwfdecBuffer *swfdec_bits_decompress (SwfdecBits *bits, int compressed,
     int decompressed);
 
 
+G_END_DECLS
 #endif
diff --git a/swfdec/swfdec_buffer.h b/swfdec/swfdec_buffer.h
index 37e6da4..99befd4 100644
--- a/swfdec/swfdec_buffer.h
+++ b/swfdec/swfdec_buffer.h
@@ -25,6 +25,8 @@
 #include <glib.h>
 #include <glib-object.h>
 
+G_BEGIN_DECLS
+
 typedef struct _SwfdecBuffer SwfdecBuffer;
 typedef struct _SwfdecBufferQueue SwfdecBufferQueue;
 
@@ -85,5 +87,7 @@ SwfdecBuffer *swfdec_buffer_queue_peek (SwfdecBufferQueue * queue, gsize length)
 SwfdecBuffer *swfdec_buffer_queue_peek_buffer (SwfdecBufferQueue * queue);
 SwfdecBufferQueue *swfdec_buffer_queue_ref (SwfdecBufferQueue * queue);
 void swfdec_buffer_queue_unref (SwfdecBufferQueue * queue);
+
+G_END_DECLS
 #endif
 
diff --git a/swfdec/swfdec_codec_audio.h b/swfdec/swfdec_codec_audio.h
index d3fb74d..3b9572d 100644
--- a/swfdec/swfdec_codec_audio.h
+++ b/swfdec/swfdec_codec_audio.h
@@ -24,6 +24,8 @@
 #include <swfdec/swfdec_audio_internal.h>
 #include <swfdec/swfdec_buffer.h>
 
+G_BEGIN_DECLS
+
 typedef struct _SwfdecAudioDecoder SwfdecAudioDecoder;
 
 #define SWFDEC_AUDIO_CODEC_UNDEFINED 0
diff --git a/swfdec/swfdec_codec_video.h b/swfdec/swfdec_codec_video.h
index eb6e3ab..31edd47 100644
--- a/swfdec/swfdec_codec_video.h
+++ b/swfdec/swfdec_codec_video.h
@@ -24,6 +24,8 @@
 #include <cairo.h>
 #include <swfdec/swfdec_buffer.h>
 
+G_BEGIN_DECLS
+
 #define SWFDEC_VIDEO_CODEC_UNDEFINED 0
 #define SWFDEC_VIDEO_CODEC_H263 2
 #define SWFDEC_VIDEO_CODEC_SCREEN 3
diff --git a/swfdec/swfdec_color.h b/swfdec/swfdec_color.h
index 188e6dd..7a74a0e 100644
--- a/swfdec/swfdec_color.h
+++ b/swfdec/swfdec_color.h
@@ -24,6 +24,8 @@
 
 #include <swfdec/swfdec_types.h>
 
+G_BEGIN_DECLS
+
 struct _SwfdecColorTransform {
   gboolean mask;			/* TRUE if this is a mask - masks are always black */
   /* naming here is taken from ActionScript, where ?a is the multiplier and ?b the offset */
@@ -72,4 +74,5 @@ void swfdec_matrix_morph (cairo_matrix_t *dest, const cairo_matrix_t *start,
     const cairo_matrix_t *end, guint ratio);
 
 
+G_END_DECLS
 #endif
diff --git a/swfdec/swfdec_debug.h b/swfdec/swfdec_debug.h
index e6821e9..9d0963b 100644
--- a/swfdec/swfdec_debug.h
+++ b/swfdec/swfdec_debug.h
@@ -24,6 +24,8 @@
 
 #include <glib.h>
 
+G_BEGIN_DECLS
+
 enum {
   SWFDEC_LEVEL_NONE = 0,
   SWFDEC_LEVEL_ERROR,
@@ -62,4 +64,5 @@ void swfdec_debug_log (guint level, const char *file, const char *function,
 void swfdec_debug_set_level (guint level);
 int swfdec_debug_get_level (void);
 
+G_END_DECLS
 #endif
diff --git a/swfdec/swfdec_rect.h b/swfdec/swfdec_rect.h
index 6833b8c..9871321 100644
--- a/swfdec/swfdec_rect.h
+++ b/swfdec/swfdec_rect.h
@@ -25,6 +25,8 @@
 #include <swfdec/swfdec_types.h>
 #include <swfdec/swfdec_rectangle.h>
 
+G_BEGIN_DECLS
+
 struct _SwfdecRect
 {
   double x0;
@@ -48,4 +50,5 @@ void swfdec_rect_transform (SwfdecRect *dest, const SwfdecRect *src, const cairo
 
 void swfdec_rectangle_init_rect (SwfdecRectangle *rectangle, const SwfdecRect *rect);
 
+G_END_DECLS
 #endif
diff --git a/swfdec/swfdec_rectangle.h b/swfdec/swfdec_rectangle.h
index 4d34ae6..b1ddc38 100644
--- a/swfdec/swfdec_rectangle.h
+++ b/swfdec/swfdec_rectangle.h
@@ -22,6 +22,8 @@
 
 #include <glib-object.h>
 
+G_BEGIN_DECLS
+
 #define SWFDEC_TYPE_RECTANGLE swfdec_rectangle_get_type ()
 
 typedef struct _SwfdecRectangle SwfdecRectangle;
@@ -52,4 +54,5 @@ gboolean	swfdec_rectangle_contains_point	    (const SwfdecRectangle *	rectangle,
 						     int			y);
 
 
+G_END_DECLS
 #endif
diff --git a/swfdec/swfdec_tag.h b/swfdec/swfdec_tag.h
index cee23ce..a269fa3 100644
--- a/swfdec/swfdec_tag.h
+++ b/swfdec/swfdec_tag.h
@@ -19,8 +19,12 @@
  * Boston, MA  02110-1301  USA
  */
 
-#ifndef __LIBSWFDEC_TAGS_H__
-#define __LIBSWFDEC_TAGS_H__
+#ifndef __SWFDEC_TAGS_H__
+#define __SWFDEC_TAGS_H__
+
+#include <glib.h>
+
+G_BEGIN_DECLS
 
 typedef enum {
   SWFDEC_TAG_END                  = 0,
@@ -118,4 +122,5 @@ typedef enum {
   SWFDEC_TAG_FIRST_ONLY = (1 << 1)
 } SwfdecTagFlag;
 
+G_END_DECLS
 #endif
diff --git a/swfdec/swfdec_types.h b/swfdec/swfdec_types.h
index d484396..8024b19 100644
--- a/swfdec/swfdec_types.h
+++ b/swfdec/swfdec_types.h
@@ -5,6 +5,8 @@
 #include <glib-object.h>
 #include <cairo.h>
 
+G_BEGIN_DECLS
+
 /* Pixel value in the same colorspace as cairo - endian-dependant ARGB.
  * The alpha pixel must be present */
 typedef guint SwfdecColor;
@@ -60,4 +62,5 @@ typedef struct _SwfdecSpriteMovie SwfdecSpriteMovie;
 typedef struct _SwfdecSwfDecoder SwfdecSwfDecoder;
 typedef struct _SwfdecText SwfdecText;
 
+G_END_DECLS
 #endif
diff --git a/swfdec/swfdec_utils.h b/swfdec/swfdec_utils.h
index fc57a5d..3c2afa6 100644
--- a/swfdec/swfdec_utils.h
+++ b/swfdec/swfdec_utils.h
@@ -17,11 +17,12 @@
  * Boston, MA  02110-1301  USA
  */
 
-#include <glib.h>
-
 #ifndef _SWFDEC_UTILS_H_
 #define _SWFDEC_UTILS_H_
 
+#include <glib.h>
+
+G_BEGIN_DECLS
 
 gboolean	swfdec_str_case_equal		(gconstpointer	v1,
 						 gconstpointer	v2);
commit 661b80998234281c12d07f4cdd1e5564b7d85572
Merge: 5575a84... 1a331bd...
Author: Benjamin Otte <otte at gnome.org>
Date:   Fri Jul 4 10:02:55 2008 +0200

    Merge branch 'master' of ssh://company@git.freedesktop.org/git/swfdec/swfdec

commit 5575a8453d69742adf9ea863a835b06ce1121719
Author: Benjamin Otte <otte at gnome.org>
Date:   Wed Jul 2 17:34:10 2008 +0200

    use the right color transform
    
    everything was rendered as mask previously

diff --git a/tools/swfdec-extract.c b/tools/swfdec-extract.c
index 2a8df1a..24d2578 100644
--- a/tools/swfdec-extract.c
+++ b/tools/swfdec-extract.c
@@ -186,7 +186,7 @@ export_graphic (SwfdecGraphic *graphic, const char *filename)
   cairo_surface_t *surface;
   cairo_t *cr;
   guint width, height;
-  const SwfdecColorTransform trans = { 256, 0, 256, 0, 256, 0, 256, 0 };
+  const SwfdecColorTransform trans = { FALSE, 256, 0, 256, 0, 256, 0, 256, 0 };
 
   if (SWFDEC_IS_SPRITE (graphic)) {
     g_printerr ("Sprites can not be exported\n");


More information about the Swfdec-commits mailing list