[cheese] effect: add cheese_effect_get_name and cheese_effect_get_pipeline_desc



commit e40fcd5655cce9578a06be247c4826e7c20048d5
Author: Raluca Elena Podiuc <ralucaelena1985 gmail com>
Date:   Tue Dec 6 01:17:09 2011 +0200

    effect: add cheese_effect_get_name and cheese_effect_get_pipeline_desc
    
    Adding getters to save an allocation.
    
    Requested in: https://bugzilla.gnome.org/show_bug.cgi?id=654448#c53

 docs/reference/cheese-sections.txt |    2 ++
 libcheese/cheese-effect.c          |   29 +++++++++++++++++++++++++++++
 libcheese/cheese-effect.h          |    2 ++
 3 files changed, 33 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/cheese-sections.txt b/docs/reference/cheese-sections.txt
index dadc1b7..7a5b6a0 100644
--- a/docs/reference/cheese-sections.txt
+++ b/docs/reference/cheese-sections.txt
@@ -107,6 +107,8 @@ CHEESE_CAMERA_DEVICE_MONITOR_GET_CLASS
 <TITLE>CheeseEffect</TITLE>
 CheeseEffect
 cheese_effect_new
+cheese_effect_get_name
+cheese_effect_get_pipeline_desc
 cheese_effect_enable_preview
 cheese_effect_disable_preview
 cheese_effect_is_preview_connected
diff --git a/libcheese/cheese-effect.c b/libcheese/cheese-effect.c
index bfd7b70..7e95cc9 100644
--- a/libcheese/cheese-effect.c
+++ b/libcheese/cheese-effect.c
@@ -150,6 +150,35 @@ cheese_effect_class_init (CheeseEffectClass *klass)
   g_object_class_install_properties (object_class, PROP_LAST, properties);
 }
 
+
+/**
+ * cheese_effect_get_name:
+ * @effect: a #CheeseEffect
+ *
+ * Get the human-readable name of the @effect.
+ *
+ * Returns: (transfer none): the human-readable name of the effect.
+ */
+const gchar *
+cheese_effect_get_name (CheeseEffect *effect)
+{
+  return effect->priv->name;
+}
+
+/**
+ * cheese_effect_get_pipeline_desc:
+ * @effect: a #CheeseEffect
+ *
+ * Get the Gstreamer pipeline description of the @effect.
+ *
+ * Returns: (transfer none): the Gstreamer pipeline description of the effect.
+ */
+const gchar *
+cheese_effect_get_pipeline_desc (CheeseEffect *effect)
+{
+  return effect->priv->pipeline_desc;
+}
+
 /**
  * cheese_effect_is_preview_connected:
  * @effect: a #CheeseEffect
diff --git a/libcheese/cheese-effect.h b/libcheese/cheese-effect.h
index 0a49913..29463da 100644
--- a/libcheese/cheese-effect.h
+++ b/libcheese/cheese-effect.h
@@ -72,6 +72,8 @@ GType cheese_effect_get_type (void) G_GNUC_CONST;
 
 CheeseEffect *cheese_effect_new (const gchar *name,
                                  const gchar *pipeline_desc);
+const gchar * cheese_effect_get_name (CheeseEffect *effect);
+const gchar * cheese_effect_get_pipeline_desc (CheeseEffect *effect);
 gboolean      cheese_effect_is_preview_connected (CheeseEffect *effect);
 void          cheese_effect_enable_preview (CheeseEffect *effect);
 void          cheese_effect_disable_preview (CheeseEffect *effect);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]