diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2010-01-09 13:45:15 +0000 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2010-01-09 16:29:29 +0000 |
commit | fdc60bea8efbded08dd454b9fedb8c24c263d5ad (patch) | |
tree | 74abdc0dddd8036e06f55c7e8b4dd617b519d645 | |
parent | 104e542f70bd9e6cb753e97b4fcdbacf0114bc89 (diff) | |
download | clutter-gst-fdc60bea8efbded08dd454b9fedb8c24c263d5ad.tar.gz |
[misc] Intern the strings of property names
So glib does not have to copy them, less things to do, less memory used,
happy bunnies.
-rw-r--r-- | clutter-gst/Makefile.am | 1 | ||||
-rw-r--r-- | clutter-gst/clutter-gst-private.h | 49 | ||||
-rw-r--r-- | clutter-gst/clutter-gst-video-sink.c | 3 | ||||
-rw-r--r-- | doc/reference/Makefile.am | 3 |
4 files changed, 54 insertions, 2 deletions
diff --git a/clutter-gst/Makefile.am b/clutter-gst/Makefile.am index 5c5358f..f8137f2 100644 --- a/clutter-gst/Makefile.am +++ b/clutter-gst/Makefile.am @@ -16,6 +16,7 @@ source_h = \ source_priv_h = \ $(srcdir)/clutter-gst-debug.h \ + $(srcdir)/clutter-gst-private.h \ $(srcdir)/clutter-gst-shaders.h \ $(NULL) diff --git a/clutter-gst/clutter-gst-private.h b/clutter-gst/clutter-gst-private.h new file mode 100644 index 0000000..7d63899 --- /dev/null +++ b/clutter-gst/clutter-gst-private.h @@ -0,0 +1,49 @@ +/* + * Clutter-GStreamer. + * + * GStreamer integration library for Clutter. + * + * clutter-gst-private.h - a private header, put whatever you want here. + * + * Copyright (C) 2010 Intel Corporation + * + * 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 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __CLUTTER_GST_PRIVATE_H__ +#define __CLUTTER_GST_PRIVATE_H__ + +#include <glib.h> + +G_BEGIN_DECLS + +/* GLib has some define for that, but defining it ourselves allows to require a + * lower version of GLib */ +#define CLUTTER_GST_PARAM_STATIC \ + (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB) + +#define CLUTTER_GST_PARAM_READABLE \ + (G_PARAM_READABLE | CLUTTER_GST_PARAM_STATIC) + +#define CLUTTER_GST_PARAM_WRITABLE \ + (G_PARAM_READABLE | CLUTTER_GST_PARAM_STATIC) + +#define CLUTTER_GST_PARAM_READWRITE \ + (G_PARAM_READABLE | G_PARAM_WRITABLE | CLUTTER_GST_PARAM_STATIC) + +G_END_DECLS + +#endif /* __CLUTTER_GST_PRIVATE_H__ */ diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c index ed7e690..7c3935d 100644 --- a/clutter-gst/clutter-gst-video-sink.c +++ b/clutter-gst/clutter-gst-video-sink.c @@ -42,6 +42,7 @@ #endif #include "clutter-gst-video-sink.h" +#include "clutter-gst-private.h" #include "clutter-gst-shaders.h" /* include assembly shaders */ #include "I420.h" @@ -1312,7 +1313,7 @@ clutter_gst_video_sink_class_init (ClutterGstVideoSinkClass *klass) "texture", "Target ClutterTexture object", CLUTTER_TYPE_TEXTURE, - G_PARAM_READWRITE)); + CLUTTER_GST_PARAM_READWRITE)); } /** diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am index a3967cf..80c9167 100644 --- a/doc/reference/Makefile.am +++ b/doc/reference/Makefile.am @@ -52,8 +52,9 @@ IGNORE_HFILES= \ I420.h \ YV12.h \ clutter-gst.h \ - clutter-gst-shaders.h \ clutter-gst-debug.h \ + clutter-gst-private.h \ + clutter-gst-shaders.h \ $(NULL) # Images to copy into HTML directory. |