+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)
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 {
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 */
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);
}
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 {
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 */