summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGert Michael Kulyk <gkulyk@yahoo.de>2012-12-27 00:03:06 +0100
committerTim-Philipp Müller <tim@centricular.net>2013-02-13 21:37:26 +0000
commit21c4c718b243a52cce0f99424a9ca22a8ae709eb (patch)
tree91e0ac5e3a3621bfbfe651f121aae92e7ecb8849 /docs
parent5fc34add2560ad3d6abd970b0b8cbe4f35e00f2a (diff)
docs: fix advanced-metadata code example in manual
https://bugzilla.gnome.org/show_bug.cgi?id=690751
Diffstat (limited to 'docs')
-rw-r--r--docs/manual/advanced-metadata.xml15
1 files changed, 10 insertions, 5 deletions
diff --git a/docs/manual/advanced-metadata.xml b/docs/manual/advanced-metadata.xml
index ec34a2eff..e75f10710 100644
--- a/docs/manual/advanced-metadata.xml
+++ b/docs/manual/advanced-metadata.xml
@@ -72,11 +72,16 @@ print_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data)
g_print ("\t%20s : %s\n", tag,
(g_value_get_boolean (val)) ? "true" : "false");
} else if (GST_VALUE_HOLDS_BUFFER (val)) {
- g_print ("\t%20s : buffer of size %u\n", tag,
- GST_BUFFER_SIZE (gst_value_get_buffer (val)));
- } else if (GST_VALUE_HOLDS_DATE (val)) {
- g_print ("\t%20s : date (year=%u,...)\n", tag,
- g_date_get_year (gst_value_get_date (val)));
+ GstBuffer *buf = gst_value_get_buffer (val);
+ guint buffer_size = gst_buffer_get_size (buf);
+
+ g_print ("\t%20s : buffer of size %u\n", tag, buffer_size);
+ } else if (GST_VALUE_HOLDS_DATE_TIME (val)) {
+ GstDateTime *dt = g_value_get_boxed (val);
+ gchar *dt_str = gst_date_time_to_iso8601_string (dt);
+
+ g_print ("\t%20s : %s\n", tag, dt_str);
+ g_free (dt_str);
} else {
g_print ("\t%20s : tag of type '%s'\n", tag, G_VALUE_TYPE_NAME (val));
}