summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sourceforge.net>2008-09-03 11:10:25 +0000
committerStefan Kost <ensonic@users.sourceforge.net>2008-09-03 11:10:25 +0000
commitd64815f75f97e21e3e32701db509d2978c3940dc (patch)
treeffdeba81a778a1e248e899a780be4c5a8c0557ba
parent105e002337ad41996d4d95dc1caaa6eb6b4f8516 (diff)
gst/debug/gsttaginject.c: Add warning when tags parameter is unparsable and give example for quoting in the docs.
Original commit message from CVS: * gst/debug/gsttaginject.c: Add warning when tags parameter is unparsable and give example for quoting in the docs.
-rw-r--r--ChangeLog6
-rw-r--r--gst/debug/gsttaginject.c17
2 files changed, 18 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 3c70ce20..d7a23590 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-03 Stefan Kost <ensonic@users.sf.net>
+
+ * gst/debug/gsttaginject.c:
+ Add warning when tags parameter is unparsable and give example for
+ quoting in the docs.
+
2008-09-02 Wim Taymans <wim.taymans@collabora.co.uk>
* gst/qtdemux/qtdemux.c: (qtdemux_audio_caps):
diff --git a/gst/debug/gsttaginject.c b/gst/debug/gsttaginject.c
index 896dfea7..840aa2a4 100644
--- a/gst/debug/gsttaginject.c
+++ b/gst/debug/gsttaginject.c
@@ -25,7 +25,10 @@
* unmodified.
* |[
* gst-launch audiotestsrc num-buffers=100 ! taginject tags="title=testsrc,artist=gstreamer" ! vorbisenc ! oggmux ! filesink location=test.ogg
- * ]|
+ * ]| set title and artist
+ * |[
+ * gst-launch audiotestsrc num-buffers=100 ! taginject tags="keywords=\"testone,audio\",title=\"audio testtone\"" ! vorbisenc ! oggmux ! filesink location=test.ogg
+ * ]| set keywords and title demonstrating quoting of special chars
*/
#ifdef HAVE_CONFIG_H
@@ -141,6 +144,7 @@ gst_tag_inject_transform_ip (GstBaseTransform * trans, GstBuffer * buf)
self->tags_sent = TRUE;
/* send tags */
if (self->tags && !gst_tag_list_is_empty (self->tags)) {
+ GST_DEBUG ("tag event :%" GST_PTR_FORMAT, self->tags);
gst_element_found_tags (GST_ELEMENT (trans),
gst_tag_list_copy (self->tags));
}
@@ -154,14 +158,17 @@ gst_tag_inject_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstTagInject *self = GST_TAG_INJECT (object);
- gchar *structure;
switch (prop_id) {
- case PROP_TAGS:
- structure = g_strdup_printf ("taglist,%s", g_value_get_string (value));
- self->tags = gst_structure_from_string (structure, NULL);
+ case PROP_TAGS:{
+ gchar *structure =
+ g_strdup_printf ("taglist,%s", g_value_get_string (value));
+ if (!(self->tags = gst_structure_from_string (structure, NULL))) {
+ GST_WARNING ("unparsable taglist = '%s'", structure);
+ }
g_free (structure);
break;
+ }
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;