diff options
author | Emmanuele Bassi <ebassi@openedhand.com> | 2007-08-20 16:07:02 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@openedhand.com> | 2007-08-20 16:07:02 +0000 |
commit | 40f9896aa607dac01068cbe28848713ecb5c2174 (patch) | |
tree | a46381f0550421aa3de58815720d96dd9c84da84 | |
parent | 301fdc150292b15d239cb57ac75e40f6d6f0a605 (diff) |
2007-08-20 Emmanuele Bassi <ebassi@openedhand.com>
* doc/reference/clutter-gst-sections.txt:
* doc/reference/clutter-gst-docs.sgml:
* doc/reference/Makefile.am: Fix API reference generation.
* clutter-gst/clutter-gst-audio.[ch]:
* clutter-gst/clutter-gst-video-sink.[ch]:
* clutter-gst/clutter-gst-video-texture.[ch]:
* clutter-gst/clutter-gst-video-util.c:
* clutter-gst/clutter-gst-version.h.in: Fix API reference
documentation.
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | clutter-gst/clutter-gst-audio.c | 19 | ||||
-rw-r--r-- | clutter-gst/clutter-gst-audio.h | 4 | ||||
-rw-r--r-- | clutter-gst/clutter-gst-util.c | 17 | ||||
-rw-r--r-- | clutter-gst/clutter-gst-version.h.in | 17 | ||||
-rw-r--r-- | clutter-gst/clutter-gst-video-sink.c | 18 | ||||
-rw-r--r-- | clutter-gst/clutter-gst-video-sink.h | 2 | ||||
-rw-r--r-- | clutter-gst/clutter-gst-video-texture.c | 6 | ||||
-rw-r--r-- | clutter-gst/clutter-gst-video-texture.h | 2 | ||||
-rw-r--r-- | doc/reference/Makefile.am | 4 | ||||
-rw-r--r-- | doc/reference/clutter-gst-docs.sgml | 3 | ||||
-rw-r--r-- | doc/reference/clutter-gst-sections.txt | 72 |
12 files changed, 148 insertions, 29 deletions
@@ -1,3 +1,16 @@ +2007-08-20 Emmanuele Bassi <ebassi@openedhand.com> + + * doc/reference/clutter-gst-sections.txt: + * doc/reference/clutter-gst-docs.sgml: + * doc/reference/Makefile.am: Fix API reference generation. + + * clutter-gst/clutter-gst-audio.[ch]: + * clutter-gst/clutter-gst-video-sink.[ch]: + * clutter-gst/clutter-gst-video-texture.[ch]: + * clutter-gst/clutter-gst-video-util.c: + * clutter-gst/clutter-gst-version.h.in: Fix API reference + documentation. + 2007-08-15 Emmanuele Bassi <ebassi@openedhand.com> * configure.ac: diff --git a/clutter-gst/clutter-gst-audio.c b/clutter-gst/clutter-gst-audio.c index cc60eb7..62cd609 100644 --- a/clutter-gst/clutter-gst-audio.c +++ b/clutter-gst/clutter-gst-audio.c @@ -27,10 +27,12 @@ */ /** - * SECTION:clutter-audio + * SECTION:clutter-gst-audio * @short_description: Object for playback of audio files. * - * #ClutterGstAudio is an object that plays audio files. + * #ClutterGstAudio is an object that plays audio files. It is a simple + * wrapper around GStreamer base audio sink implementing the #ClutterMedia + * interface and providing a nice API to play a sound file using its URI. */ #include "clutter-gst-audio.h" @@ -69,12 +71,11 @@ static void clutter_media_init (ClutterMediaInterface *iface); static gboolean tick_timeout (ClutterGstAudio *audio); -G_DEFINE_TYPE_EXTENDED (ClutterGstAudio, \ - clutter_gst_audio, \ - G_TYPE_OBJECT, \ - 0, \ - G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_MEDIA, \ - clutter_media_init)); +G_DEFINE_TYPE_WITH_CODE (ClutterGstAudio, + clutter_gst_audio, + G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_MEDIA, + clutter_media_init)); /* Interface implementation */ @@ -777,7 +778,7 @@ clutter_gst_audio_init (ClutterGstAudio *audio) * * Return value: A newly allocated #ClutterGstAudio object. */ -ClutterGstAudio* +ClutterGstAudio * clutter_gst_audio_new (void) { return g_object_new (CLUTTER_GST_TYPE_AUDIO, NULL); diff --git a/clutter-gst/clutter-gst-audio.h b/clutter-gst/clutter-gst-audio.h index fbb1d91..5d0a590 100644 --- a/clutter-gst/clutter-gst-audio.h +++ b/clutter-gst/clutter-gst-audio.h @@ -59,16 +59,16 @@ typedef struct _ClutterGstAudio ClutterGstAudio; typedef struct _ClutterGstAudioClass ClutterGstAudioClass; typedef struct _ClutterGstAudioPrivate ClutterGstAudioPrivate; -/* #define CLUTTER_GST_AUDIO_ERROR clutter_gst_audio_error_quark() */ - struct _ClutterGstAudio { + /*< private >*/ GObject parent; ClutterGstAudioPrivate *priv; }; struct _ClutterGstAudioClass { + /*< private >*/ GObjectClass parent_class; /* Future padding */ diff --git a/clutter-gst/clutter-gst-util.c b/clutter-gst/clutter-gst-util.c index 89ab9f7..23778cb 100644 --- a/clutter-gst/clutter-gst-util.c +++ b/clutter-gst/clutter-gst-util.c @@ -37,8 +37,10 @@ /** * clutter_gst_init: + * @argc: pointer to the argument list count + * @argv: pointer to the argument list vector * - * Utility function to call gst_init, then clutter_init. + * Utility function to call gst_init(), then clutter_init(). * * Return value: A #ClutterInitError. */ @@ -47,11 +49,18 @@ clutter_gst_init (int *argc, char ***argv) { static gboolean gst_is_initialized = FALSE; + ClutterInitError retval; if (!gst_is_initialized) - gst_init (argc, argv); + { + gst_init (argc, argv); - gst_is_initialized = TRUE; + retval = clutter_init (argc, argv); - return clutter_init (argc, argv); + gst_is_initialized = TRUE; + } + else + retval = CLUTTER_INIT_SUCCESS; + + return retval; } diff --git a/clutter-gst/clutter-gst-version.h.in b/clutter-gst/clutter-gst-version.h.in index fc26c3c..0b1651e 100644 --- a/clutter-gst/clutter-gst-version.h.in +++ b/clutter-gst/clutter-gst-version.h.in @@ -23,14 +23,21 @@ * Boston, MA 02111-1307, USA. */ +/** + * SECTION:clutter-gst-version + * @short_description: Version Checking + * + * Version checking macros. + */ + #ifndef __CLUTTER_GST_VERSION_H__ #define __CLUTTER_GST_VERSION_H__ -#define CLUTTER_GST_MAJOR_VERSION @CLUTTER_GST_MAJOR_VERSION@ -#define CLUTTER_GST_MINOR_VERSION @CLUTTER_GST_MINOR_VERSION@ -#define CLUTTER_GST_MICRO_VERSION @CLUTTER_GST_MICRO_VERSION@ +#define CLUTTER_GST_MAJOR_VERSION (@CLUTTER_GST_MAJOR_VERSION@) +#define CLUTTER_GST_MINOR_VERSION (@CLUTTER_GST_MINOR_VERSION@) +#define CLUTTER_GST_MICRO_VERSION (@CLUTTER_GST_MICRO_VERSION@) -#define CLUTTER_GST_VERSION @CLUTTER_GST_VERSION@ +#define CLUTTER_GST_VERSION (@CLUTTER_GST_VERSION@) #define CLUTTER_GST_VERSION_S "@CLUTTER_GST_VERSION@" #define CLUTTER_GST_VERSION_HEX ((CLUTTER_GST_MAJOR_VERSION << 24) | \ (CLUTTER_GST_MINOR_VERSION << 16) | \ @@ -39,6 +46,6 @@ #define CLUTTER_GST_CHECK_VERSION(major,minor,micro) \ (CLUTTER_GST_MAJOR_VERSION > (major) || \ (CLUTTER_GST_MAJOR_VERSION == (major) && CLUTTER_GST_MINOR_VERSION > (minor)) || \ - (CLUTTER_GST_MAJOR_VERSION == (major) && CLUTTER_GST_MINOR_VERSION == (minor) && CLUTTER_GST_MICRO_VERSION > (micro))) + (CLUTTER_GST_MAJOR_VERSION == (major) && CLUTTER_GST_MINOR_VERSION == (minor) && CLUTTER_GST_MICRO_VERSION >= (micro))) #endif /* __CLUTTER_GST_VERSION_H__ */ diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c index 9e13413..b0a4e83 100644 --- a/clutter-gst/clutter-gst-video-sink.c +++ b/clutter-gst/clutter-gst-video-sink.c @@ -27,11 +27,11 @@ */ /** - * SECTION:clutter-video-sink + * SECTION:clutter-gst-video-sink * @short_description: GStreamer video sink * * #ClutterGstVideoSink is a GStreamer sink element that sends - * data to a #ClutterTexture + * data to a #ClutterTexture. */ #include "config.h" @@ -378,6 +378,15 @@ clutter_gst_video_sink_class_init (ClutterGstVideoSinkClass *klass) G_PARAM_READWRITE)); } +/** + * clutter_gst_video_sink_new: + * @texture: a #ClutterTexture + * + * Creates a new GStreamer video sink which uses @texture as the target + * for sinking a video stream from GStreamer. + * + * Return value: a #GstElement for the newly created video sink + */ GstElement * clutter_gst_video_sink_new (ClutterTexture *texture) { @@ -399,10 +408,9 @@ plugin_init (GstPlugin *plugin) GST_PLUGIN_DEFINE_STATIC (GST_VERSION_MAJOR, GST_VERSION_MINOR, "cluttersink", - "element to render to clutter textures", + "Element to render to Clutter textures", plugin_init, VERSION, - "LGPL", + "LGPL", /* license */ PACKAGE, ""); - diff --git a/clutter-gst/clutter-gst-video-sink.h b/clutter-gst/clutter-gst-video-sink.h index 587a477..e256393 100644 --- a/clutter-gst/clutter-gst-video-sink.h +++ b/clutter-gst/clutter-gst-video-sink.h @@ -63,12 +63,14 @@ typedef struct _ClutterGstVideoSinkPrivate ClutterGstVideoSinkPrivate; struct _ClutterGstVideoSink { + /*< private >*/ GstBaseSink parent; ClutterGstVideoSinkPrivate *priv; }; struct _ClutterGstVideoSinkClass { + /*< private >*/ GstBaseSinkClass parent_class; /* Future padding */ diff --git a/clutter-gst/clutter-gst-video-texture.c b/clutter-gst/clutter-gst-video-texture.c index 295d267..0792142 100644 --- a/clutter-gst/clutter-gst-video-texture.c +++ b/clutter-gst/clutter-gst-video-texture.c @@ -27,12 +27,14 @@ */ /** - * SECTION:clutter-video-texture + * SECTION:clutter-gst-video-texture * @short_description: Actor for playback of video files. * * #ClutterGstVideoTexture is a #ClutterTexture that plays video files. */ +#include "config.h" + #include "clutter-gst-video-texture.h" #include "clutter-gst-video-sink.h" @@ -103,7 +105,7 @@ set_uri (ClutterMedia *media, * We also have it installed in PAUSED state, because * seeks etc may have a delayed effect on the position. **/ - if (priv->tick_timeout_id == 0) + if (priv->tick_timeout_id == 0) { priv->tick_timeout_id = g_timeout_add (TICK_TIMEOUT * 1000, (GSourceFunc) tick_timeout, diff --git a/clutter-gst/clutter-gst-video-texture.h b/clutter-gst/clutter-gst-video-texture.h index 0b353ac..39f23a2 100644 --- a/clutter-gst/clutter-gst-video-texture.h +++ b/clutter-gst/clutter-gst-video-texture.h @@ -64,12 +64,14 @@ typedef struct _ClutterGstVideoTexturePrivate ClutterGstVideoTexturePrivate; struct _ClutterGstVideoTexture { + /*< private >*/ ClutterTexture parent; ClutterGstVideoTexturePrivate *priv; }; struct _ClutterGstVideoTextureClass { + /*< private >*/ ClutterTextureClass parent_class; /* Future padding */ diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am index b4d1ae5..682487d 100644 --- a/doc/reference/Makefile.am +++ b/doc/reference/Makefile.am @@ -21,7 +21,7 @@ DOC_MAIN_SGML_FILE=clutter-gst-docs.sgml DOC_SOURCE_DIR=../../clutter-gst # Extra options to pass to gtkdoc-scangobj. Not normally needed. -SCANGOBJ_OPTIONS= +SCANGOBJ_OPTIONS=--type-init-func="clutter_gst_init(0,0)" # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" @@ -70,7 +70,7 @@ expand_content_files= # FIXME: $(GST_CFLAGS) needed for clutter_media metadata - togo.. INCLUDES=-I$(top_srcdir) $(CLUTTER_GST_CFLAGS) $(GST_CFLAGS) -GTKDOC_LIBS=$(top_builddir)/clutter-gst/libclutter-gst-@CLUTTER_MAJORMINOR@.la $(CLUTTER_GST_LIBS) +GTKDOC_LIBS=$(top_builddir)/clutter-gst/libclutter-gst-@CLUTTER_GST_MAJORMINOR@.la $(CLUTTER_GST_LIBS) # This includes the standard gtk-doc make rules, copied by gtkdocize. include $(top_srcdir)/gtk-doc.make diff --git a/doc/reference/clutter-gst-docs.sgml b/doc/reference/clutter-gst-docs.sgml index 4fe520a..44f6f5d 100644 --- a/doc/reference/clutter-gst-docs.sgml +++ b/doc/reference/clutter-gst-docs.sgml @@ -49,6 +49,9 @@ <title>Clutter Actors And Objects</title> <xi:include href="xml/clutter-gst-video-texture.xml"/> <xi:include href="xml/clutter-gst-audio.xml"/> + <xi:include href="xml/clutter-gst-video-sink.xml"/> + <xi:include href="xml/clutter-gst-util.xml"/> + <xi:include href="xml/clutter-gst-version.xml"/> </chapter> <appendix id="license"> <title>License</title> diff --git a/doc/reference/clutter-gst-sections.txt b/doc/reference/clutter-gst-sections.txt index e69de29..25151e0 100644 --- a/doc/reference/clutter-gst-sections.txt +++ b/doc/reference/clutter-gst-sections.txt @@ -0,0 +1,72 @@ +<SECTION> +<FILE>clutter-gst-video-texture</FILE> +<TITLE>ClutterGstVideoTexture</TITLE> +ClutterGstVideoTexture +ClutterGstVideoTextureClass +clutter_gst_video_texture_new +clutter_gst_video_texture_get_playbin +<SUBSECTION Standard> +CLUTTER_GST_VIDEO_TEXTURE +CLUTTER_GST_IS_VIDEO_TEXTURE +CLUTTER_GST_TYPE_VIDEO_TEXTURE +clutter_gst_video_texture_get_type +CLUTTER_GST_VIDEO_TEXTURE_CLASS +CLUTTER_GST_IS_VIDEO_TEXTURE_CLASS +CLUTTER_GST_VIDEO_TEXTURE_GET_CLASS +<SUBSECTION Private> +ClutterGstVideoTexturePrivate +</SECTION> + +<SECTION> +<FILE>clutter-gst-video-sink</FILE> +<TITLE>ClutterGstVideoSink</TITLE> +ClutterGstVideoSink +ClutterGstVideoSinkClass +clutter_gst_video_sink_new +<SUBSECTION Standard> +CLUTTER_GST_VIDEO_SINK +CLUTTER_GST_IS_VIDEO_SINK +CLUTTER_GST_TYPE_VIDEO_SINK +clutter_gst_video_sink_get_type +CLUTTER_GST_VIDEO_SINK_CLASS +CLUTTER_GST_IS_VIDEO_SINK_CLASS +CLUTTER_GST_VIDEO_SINK_GET_CLASS +<SUBSECTION Private> +ClutterGstVideoSinkPrivate +</SECTION> + +<SECTION> +<FILE>clutter-gst-audio</FILE> +<TITLE>ClutterGstAudio</TITLE> +ClutterGstAudio +ClutterGstAudioClass +clutter_gst_audio_new +<SUBSECTION Standard> +CLUTTER_GST_AUDIO +CLUTTER_GST_IS_AUDIO +CLUTTER_GST_TYPE_AUDIO +clutter_gst_audio_get_type +CLUTTER_GST_AUDIO_CLASS +CLUTTER_GST_IS_AUDIO_CLASS +CLUTTER_GST_AUDIO_GET_CLASS +<SUBSECTION Private> +ClutterGstAudioPrivate +</SECTION> + +<SECTION> +<FILE>clutter-gst-util</FILE> +<TITLE>Utilities</TITLE> +clutter_gst_init +</SECTION> + +<SECTION> +<FILE>clutter-gst-version</FILE> +<TITLE>Version Checking</TITLE> +CLUTTER_GST_MAJOR_VERSION +CLUTTER_GST_MINOR_VERSION +CLUTTER_GST_MICRO_VERSION +CLUTTER_GST_VERSION +CLUTTER_GST_VERSION_S +CLUTTER_GST_VERSION_HEX +CLUTTER_GST_CHECK_VERSION +</SECTION> |