[farsight2/master] Add fs_codec_add_optional_parameter function
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:22:31 PST 2008
---
docs/libs/farsight2-libs-sections.txt | 1 +
gst-libs/gst/farsight/fs-codec.c | 26 ++++++++++++++++++++++++++
gst-libs/gst/farsight/fs-codec.h | 3 +++
3 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/docs/libs/farsight2-libs-sections.txt b/docs/libs/farsight2-libs-sections.txt
index ef9d4af..84313e6 100644
--- a/docs/libs/farsight2-libs-sections.txt
+++ b/docs/libs/farsight2-libs-sections.txt
@@ -120,6 +120,7 @@ fs_codec_list_copy
fs_codec_list_are_equal
fs_codec_to_string
fs_codec_to_gst_caps
+fs_codec_add_optional_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 9d0afbe..94e396a 100644
--- a/gst-libs/gst/farsight/fs-codec.c
+++ b/gst-libs/gst/farsight/fs-codec.c
@@ -638,3 +638,29 @@ fs_codec_list_are_equal (GList *list1, GList *list2)
else
return FALSE;
}
+
+/**
+ * fs_codec_add_optional_parameter:
+ * @codec: The #FsCodec to add the parameter to
+ * @name: The name of the optional parameter
+ * @value: The value of the optional parameter
+ *
+ * This function adds an new optional parameter to a #FsCodec
+ */
+
+void
+fs_codec_add_optional_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->optional_params = g_list_append (codec->optional_params, param);
+}
diff --git a/gst-libs/gst/farsight/fs-codec.h b/gst-libs/gst/farsight/fs-codec.h
index 88ab580..af6b89b 100644
--- a/gst-libs/gst/farsight/fs-codec.h
+++ b/gst-libs/gst/farsight/fs-codec.h
@@ -135,6 +135,9 @@ gboolean fs_codec_list_are_equal (GList *list1, GList *list2);
const gchar *fs_media_type_to_string (FsMediaType media_type);
+void fs_codec_add_optional_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