mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-12 06:42:00 +00:00
gst/debug/gsttaginject.*: Sent tags in _transform_ip() instead of _start(). Fixes #543404 partially.
Original commit message from CVS: * gst/debug/gsttaginject.c: * gst/debug/gsttaginject.h: Sent tags in _transform_ip() instead of _start(). Fixes #543404 partially.
This commit is contained in:
parent
260098a761
commit
da2d6b62e9
4 changed files with 25 additions and 13 deletions
|
@ -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>
|
2008-07-19 Jan Schmidt <jan.schmidt@sun.com>
|
||||||
|
|
||||||
* configure.ac:
|
* configure.ac:
|
||||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
||||||
Subproject commit a100efef186a5f8999fe3aa42c0720f5123c08eb
|
Subproject commit e79879859bc866545379eb77e1378a906dc30ebf
|
|
@ -21,7 +21,7 @@
|
||||||
/**
|
/**
|
||||||
* SECTION:element-taginject
|
* 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.
|
* unmodified.
|
||||||
* |[
|
* |[
|
||||||
* gst-launch audiotestsrc num-buffers=100 ! taginject tags="title=testsrc,artist=gstreamer" ! vorbisenc ! oggmux ! filesink location=test.ogg
|
* 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,
|
static void gst_tag_inject_get_property (GObject * object, guint prop_id,
|
||||||
GValue * value, GParamSpec * pspec);
|
GValue * value, GParamSpec * pspec);
|
||||||
|
|
||||||
/*static GstFlowReturn gst_tag_inject_transform_ip (GstBaseTransform * trans,
|
static GstFlowReturn gst_tag_inject_transform_ip (GstBaseTransform * trans,
|
||||||
GstBuffer * buf); */
|
GstBuffer * buf);
|
||||||
static gboolean gst_tag_inject_start (GstBaseTransform * trans);
|
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);
|
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_tag_inject_finalize);
|
||||||
|
|
||||||
/*gstbasetrans_class->transform_ip =
|
gstbasetrans_class->transform_ip =
|
||||||
GST_DEBUG_FUNCPTR (gst_tag_inject_transform_ip); */
|
GST_DEBUG_FUNCPTR (gst_tag_inject_transform_ip);
|
||||||
|
|
||||||
gstbasetrans_class->start = GST_DEBUG_FUNCPTR (gst_tag_inject_start);
|
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;
|
self->tags = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_tag_inject_transform_ip (GstBaseTransform * trans, GstBuffer * buf)
|
gst_tag_inject_transform_ip (GstBaseTransform * trans, GstBuffer * buf)
|
||||||
{
|
{
|
||||||
GstTagInject *self = GST_TAG_INJECT (trans);
|
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;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_tag_inject_set_property (GObject * object, guint prop_id,
|
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);
|
GstTagInject *self = GST_TAG_INJECT (trans);
|
||||||
|
|
||||||
/* send tags */
|
/* we need to sent tags _transform_ip() once */
|
||||||
if (self->tags && !gst_tag_list_is_empty (self->tags)) {
|
self->tags_sent = FALSE;
|
||||||
gst_element_found_tags (GST_ELEMENT (trans),
|
|
||||||
gst_tag_list_copy (self->tags));
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,7 @@ struct _GstTagInject {
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
GstTagList *tags;
|
GstTagList *tags;
|
||||||
|
gboolean tags_sent;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstTagInjectClass {
|
struct _GstTagInjectClass {
|
||||||
|
|
Loading…
Reference in a new issue