[farsight2/master] Add fs_codec_add_config_parameter

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:22:52 PST 2008


---
 docs/libs/farsight2-libs-sections.txt |    1 +
 gst-libs/gst/farsight/fs-codec.c      |   27 +++++++++++++++++++++++++++
 gst-libs/gst/farsight/fs-codec.h      |    3 +++
 3 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/docs/libs/farsight2-libs-sections.txt b/docs/libs/farsight2-libs-sections.txt
index 84313e6..ac10b8b 100644
--- a/docs/libs/farsight2-libs-sections.txt
+++ b/docs/libs/farsight2-libs-sections.txt
@@ -121,6 +121,7 @@ fs_codec_list_are_equal
 fs_codec_to_string
 fs_codec_to_gst_caps
 fs_codec_add_optional_parameter
+fs_codec_add_config_parameter
 <SUBSECTION Standard>
 FS_TYPE_CODEC
 FS_TYPE_CODEC_LIST
diff --git a/gst-libs/gst/farsight/fs-codec.c b/gst-libs/gst/farsight/fs-codec.c
index 3cf5305..32a741f 100644
--- a/gst-libs/gst/farsight/fs-codec.c
+++ b/gst-libs/gst/farsight/fs-codec.c
@@ -701,3 +701,30 @@ fs_codec_add_optional_parameter (FsCodec *codec,
 
   codec->optional_params = g_list_append (codec->optional_params, param);
 }
+
+
+/**
+ * fs_codec_add_config_parameter:
+ * @codec: The #FsCodec to add the parameter to
+ * @name: The name of the config parameter
+ * @value: The value of the config parameter
+ *
+ * This function adds an new config parameter to a #FsCodec
+ */
+
+void
+fs_codec_add_config_parameter (FsCodec *codec,
+    const gchar *name,
+    const gchar *value)
+{
+  FsCodecParameter *param;
+
+  g_return_if_fail (name != NULL && value != NULL);
+
+  param = g_slice_new (FsCodecParameter);
+
+  param->name = g_strdup (name);
+  param->value = g_strdup (value);
+
+  codec->config_params = g_list_append (codec->config_params, param);
+}
diff --git a/gst-libs/gst/farsight/fs-codec.h b/gst-libs/gst/farsight/fs-codec.h
index 369d3b6..6e3383d 100644
--- a/gst-libs/gst/farsight/fs-codec.h
+++ b/gst-libs/gst/farsight/fs-codec.h
@@ -140,6 +140,9 @@ const gchar *fs_media_type_to_string (FsMediaType media_type);
 void fs_codec_add_optional_parameter (FsCodec *codec, const gchar *name,
     const gchar *value);
 
+void fs_codec_add_config_parameter (FsCodec *codec, const gchar *name,
+    const gchar *value);
+
 G_END_DECLS
 
 #endif /* __FS_CODEC_H__ */
-- 
1.5.6.5




More information about the farsight-commits mailing list