[farsight2/master] Add macros to printf FsCodecs
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:23:05 PST 2008
---
docs/libs/farsight2-libs-sections.txt | 2 ++
gst-libs/gst/farsight/fs-codec.h | 22 ++++++++++++++++++++++
2 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/docs/libs/farsight2-libs-sections.txt b/docs/libs/farsight2-libs-sections.txt
index f1f54d4..4b08b5f 100644
--- a/docs/libs/farsight2-libs-sections.txt
+++ b/docs/libs/farsight2-libs-sections.txt
@@ -122,6 +122,8 @@ fs_codec_to_string
fs_codec_to_gst_caps
fs_codec_add_optional_parameter
fs_codec_remove_optional_parameter
+FS_CODEC_FORMAT
+FS_CODEC_ARGS
<SUBSECTION Standard>
FS_TYPE_CODEC
FS_TYPE_CODEC_LIST
diff --git a/gst-libs/gst/farsight/fs-codec.h b/gst-libs/gst/farsight/fs-codec.h
index 4c756bb..6442ebc 100644
--- a/gst-libs/gst/farsight/fs-codec.h
+++ b/gst-libs/gst/farsight/fs-codec.h
@@ -112,6 +112,28 @@ struct _FsCodecParameter {
gchar *value;
};
+
+/**
+ * FS_CODEC_FORMAT:
+ *
+ * A format that can be used in printf like format strings to format a FsCodec
+ */
+
+/**
+ * FS_CODEC_ARGS:
+ * @codec: a #FsCodec
+ *
+ * Formats the codec in args for FS_CODEC_FORMAT
+ */
+
+#define FS_CODEC_FORMAT "%d: %s %s clock:%d channels:%d"
+#define FS_CODEC_ARGS(codec) \
+ (codec)->id, \
+ fs_media_type_to_string ((codec)->media_type), \
+ (codec)->encoding_name, \
+ (codec)->clock_rate, \
+ (codec)->channels \
+
GType fs_codec_get_type (void);
GType fs_codec_list_get_type (void);
--
1.5.6.5
More information about the farsight-commits
mailing list