mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 09:38:17 +00:00
gst/base/gstbasetransform.c: Also call the transform function if we have ANY caps.
Original commit message from CVS: * gst/base/gstbasetransform.c: (gst_base_transform_transform_caps), (gst_base_transform_handle_buffer): Also call the transform function if we have ANY caps. * gst/gstpipeline.c: (gst_pipeline_set_new_stream_time): Fix debug info.
This commit is contained in:
parent
ee1f83092e
commit
5ffafdb34a
4 changed files with 50 additions and 21 deletions
|
@ -1,3 +1,12 @@
|
|||
2005-08-22 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
|
||||
(gst_base_transform_handle_buffer):
|
||||
Also call the transform function if we have ANY caps.
|
||||
|
||||
* gst/gstpipeline.c: (gst_pipeline_set_new_stream_time):
|
||||
Fix debug info.
|
||||
|
||||
2005-08-22 Jan Schmidt <thaytan@mad.scientist.com>
|
||||
|
||||
* gst/base/gstbasesrc.c: (gst_base_src_event_handler)
|
||||
|
|
|
@ -222,18 +222,27 @@ gst_base_transform_transform_caps (GstBaseTransform * trans, GstPad * pad,
|
|||
|
||||
ret = gst_caps_new_empty ();
|
||||
|
||||
/* we send caps with just one structure to the transform
|
||||
* function as this is easier for the element */
|
||||
for (i = 0; i < gst_caps_get_size (caps); i++) {
|
||||
GstCaps *nth;
|
||||
|
||||
nth = gst_caps_copy_nth (caps, i);
|
||||
GST_DEBUG_OBJECT (trans, "from[%d]: %" GST_PTR_FORMAT, i, nth);
|
||||
temp = klass->transform_caps (trans, pad, nth);
|
||||
gst_caps_unref (nth);
|
||||
GST_DEBUG_OBJECT (trans, " to[%d]: %" GST_PTR_FORMAT, i, temp);
|
||||
if (gst_caps_is_any (caps)) {
|
||||
/* for any caps we still have to call the transform function */
|
||||
GST_DEBUG_OBJECT (trans, "from ANY:");
|
||||
temp = klass->transform_caps (trans, pad, caps);
|
||||
GST_DEBUG_OBJECT (trans, " to: %" GST_PTR_FORMAT, temp);
|
||||
|
||||
gst_caps_append (ret, temp);
|
||||
} else {
|
||||
/* we send caps with just one structure to the transform
|
||||
* function as this is easier for the element */
|
||||
for (i = 0; i < gst_caps_get_size (caps); i++) {
|
||||
GstCaps *nth;
|
||||
|
||||
nth = gst_caps_copy_nth (caps, i);
|
||||
GST_DEBUG_OBJECT (trans, "from[%d]: %" GST_PTR_FORMAT, i, nth);
|
||||
temp = klass->transform_caps (trans, pad, nth);
|
||||
gst_caps_unref (nth);
|
||||
GST_DEBUG_OBJECT (trans, " to[%d]: %" GST_PTR_FORMAT, i, temp);
|
||||
|
||||
gst_caps_append (ret, temp);
|
||||
}
|
||||
}
|
||||
gst_caps_do_simplify (ret);
|
||||
} else {
|
||||
|
@ -620,6 +629,7 @@ gst_base_transform_handle_buffer (GstBaseTransform * trans, GstBuffer * inbuf,
|
|||
|
||||
if (trans->in_place) {
|
||||
if (bclass->transform_ip) {
|
||||
/* we do not call make writable here */
|
||||
gst_buffer_ref (inbuf);
|
||||
|
||||
/* in place transform and subclass supports method */
|
||||
|
|
|
@ -410,7 +410,7 @@ gst_pipeline_set_new_stream_time (GstPipeline * pipeline, GstClockTime time)
|
|||
GST_LOCK (pipeline);
|
||||
pipeline->stream_time = time;
|
||||
GST_DEBUG ("%s: set new stream_time to %" GST_TIME_FORMAT,
|
||||
GST_ELEMENT_NAME (pipeline), time);
|
||||
GST_ELEMENT_NAME (pipeline), GST_TIME_ARGS (time));
|
||||
GST_UNLOCK (pipeline);
|
||||
}
|
||||
|
||||
|
|
|
@ -222,18 +222,27 @@ gst_base_transform_transform_caps (GstBaseTransform * trans, GstPad * pad,
|
|||
|
||||
ret = gst_caps_new_empty ();
|
||||
|
||||
/* we send caps with just one structure to the transform
|
||||
* function as this is easier for the element */
|
||||
for (i = 0; i < gst_caps_get_size (caps); i++) {
|
||||
GstCaps *nth;
|
||||
|
||||
nth = gst_caps_copy_nth (caps, i);
|
||||
GST_DEBUG_OBJECT (trans, "from[%d]: %" GST_PTR_FORMAT, i, nth);
|
||||
temp = klass->transform_caps (trans, pad, nth);
|
||||
gst_caps_unref (nth);
|
||||
GST_DEBUG_OBJECT (trans, " to[%d]: %" GST_PTR_FORMAT, i, temp);
|
||||
if (gst_caps_is_any (caps)) {
|
||||
/* for any caps we still have to call the transform function */
|
||||
GST_DEBUG_OBJECT (trans, "from ANY:");
|
||||
temp = klass->transform_caps (trans, pad, caps);
|
||||
GST_DEBUG_OBJECT (trans, " to: %" GST_PTR_FORMAT, temp);
|
||||
|
||||
gst_caps_append (ret, temp);
|
||||
} else {
|
||||
/* we send caps with just one structure to the transform
|
||||
* function as this is easier for the element */
|
||||
for (i = 0; i < gst_caps_get_size (caps); i++) {
|
||||
GstCaps *nth;
|
||||
|
||||
nth = gst_caps_copy_nth (caps, i);
|
||||
GST_DEBUG_OBJECT (trans, "from[%d]: %" GST_PTR_FORMAT, i, nth);
|
||||
temp = klass->transform_caps (trans, pad, nth);
|
||||
gst_caps_unref (nth);
|
||||
GST_DEBUG_OBJECT (trans, " to[%d]: %" GST_PTR_FORMAT, i, temp);
|
||||
|
||||
gst_caps_append (ret, temp);
|
||||
}
|
||||
}
|
||||
gst_caps_do_simplify (ret);
|
||||
} else {
|
||||
|
@ -620,6 +629,7 @@ gst_base_transform_handle_buffer (GstBaseTransform * trans, GstBuffer * inbuf,
|
|||
|
||||
if (trans->in_place) {
|
||||
if (bclass->transform_ip) {
|
||||
/* we do not call make writable here */
|
||||
gst_buffer_ref (inbuf);
|
||||
|
||||
/* in place transform and subclass supports method */
|
||||
|
|
Loading…
Reference in a new issue