summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
m---------common0
-rw-r--r--gst/debug/gsttaginject.c28
-rw-r--r--gst/debug/gsttaginject.h1
4 files changed, 24 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index b964e74d..8c297d9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-07-22 Stefan Kost <ensonic@users.sf.net>
+
+ * gst/debug/gsttaginject.c:
+ * gst/debug/gsttaginject.h:
+ Sent tags in _transform_ip() instead of _start(). Fixes #543404
+ partially.
+
2008-07-19 Jan Schmidt <jan.schmidt@sun.com>
* configure.ac:
diff --git a/common b/common
-Subproject a100efef186a5f8999fe3aa42c0720f5123c08e
+Subproject e79879859bc866545379eb77e1378a906dc30eb
diff --git a/gst/debug/gsttaginject.c b/gst/debug/gsttaginject.c
index 7e2b81c8..896dfea7 100644
--- a/gst/debug/gsttaginject.c
+++ b/gst/debug/gsttaginject.c
@@ -21,7 +21,7 @@
/**
* SECTION:element-taginject
*
- * Element that inject new metadata tags, but passes incomming data through
+ * Element that injects new metadata tags, but passes incomming data through
* unmodified.
* |[
* gst-launch audiotestsrc num-buffers=100 ! taginject tags="title=testsrc,artist=gstreamer" ! vorbisenc ! oggmux ! filesink location=test.ogg
@@ -67,8 +67,8 @@ static void gst_tag_inject_set_property (GObject * object, guint prop_id,
static void gst_tag_inject_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
-/*static GstFlowReturn gst_tag_inject_transform_ip (GstBaseTransform * trans,
- GstBuffer * buf); */
+static GstFlowReturn gst_tag_inject_transform_ip (GstBaseTransform * trans,
+ GstBuffer * buf);
static gboolean gst_tag_inject_start (GstBaseTransform * trans);
@@ -120,8 +120,8 @@ gst_tag_inject_class_init (GstTagInjectClass * klass)
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_tag_inject_finalize);
- /*gstbasetrans_class->transform_ip =
- GST_DEBUG_FUNCPTR (gst_tag_inject_transform_ip); */
+ gstbasetrans_class->transform_ip =
+ GST_DEBUG_FUNCPTR (gst_tag_inject_transform_ip);
gstbasetrans_class->start = GST_DEBUG_FUNCPTR (gst_tag_inject_start);
}
@@ -132,15 +132,22 @@ gst_tag_inject_init (GstTagInject * self, GstTagInjectClass * g_class)
self->tags = NULL;
}
-/*
static GstFlowReturn
gst_tag_inject_transform_ip (GstBaseTransform * trans, GstBuffer * buf)
{
GstTagInject *self = GST_TAG_INJECT (trans);
+ if (G_UNLIKELY (!self->tags_sent)) {
+ self->tags_sent = TRUE;
+ /* send tags */
+ if (self->tags && !gst_tag_list_is_empty (self->tags)) {
+ gst_element_found_tags (GST_ELEMENT (trans),
+ gst_tag_list_copy (self->tags));
+ }
+ }
+
return GST_FLOW_OK;
}
-*/
static void
gst_tag_inject_set_property (GObject * object, guint prop_id,
@@ -179,11 +186,8 @@ gst_tag_inject_start (GstBaseTransform * trans)
{
GstTagInject *self = GST_TAG_INJECT (trans);
- /* send tags */
- if (self->tags && !gst_tag_list_is_empty (self->tags)) {
- gst_element_found_tags (GST_ELEMENT (trans),
- gst_tag_list_copy (self->tags));
- }
+ /* we need to sent tags _transform_ip() once */
+ self->tags_sent = FALSE;
return TRUE;
}
diff --git a/gst/debug/gsttaginject.h b/gst/debug/gsttaginject.h
index 7c80ec0f..4d0f04f1 100644
--- a/gst/debug/gsttaginject.h
+++ b/gst/debug/gsttaginject.h
@@ -54,6 +54,7 @@ struct _GstTagInject {
/*< private >*/
GstTagList *tags;
+ gboolean tags_sent;
};
struct _GstTagInjectClass {