result = tmp;
}
- GST_DEBUG_OBJECT (trans, "transformed %" GST_PTR_FORMAT " into %"
+ GST_INFO_OBJECT (trans, "transformed %" GST_PTR_FORMAT " into %"
GST_PTR_FORMAT, caps, result);
return result;
break;
case PROP_PASSTHROUGH:
this->passthrough = g_value_get_boolean (value);
+ gst_base_transform_set_passthrough ((GstBaseTransform *)object, this->passthrough);
+ GST_INFO_OBJECT (this, "set passthrough %d ", this->passthrough);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
GstVideo360 *this = GST_VIDEO360 (filter);
gboolean ret = FALSE;
- if (this->passthrough)
+ if (this->passthrough) {
+ GST_DEBUG_OBJECT (this, "skip transform");
return GST_FLOW_OK;
+ }
+
#ifdef GST_TIZEN_USE_TIMING
struct timespec start_time, stop_time;
GST_BUFFER_DURATION (outframe->buffer) = GST_BUFFER_DURATION (inframe->buffer);
GST_BUFFER_OFFSET (outframe->buffer) = GST_BUFFER_OFFSET (inframe->buffer);
GST_BUFFER_OFFSET_END (outframe->buffer) = GST_BUFFER_OFFSET_END (inframe->buffer);
- gst_buffer_ref (outframe->buffer);
/* Here we do the rendering */
pthread_mutex_lock (&this->gl_mutex);
ret = (*this->renderer) (this, inframe, outframe);
pthread_mutex_unlock (&this->gl_mutex);
- if (!ret)
+ if (!ret) {
+ GST_ERROR_OBJECT (this, "transform failed");
return GST_FLOW_ERROR;
+ }
#ifdef GST_TIZEN_USE_TIMING
clock_gettime (CLOCK_THREAD_CPUTIME_ID, &stop_time);
this->frames_nanoseconds += stop_time.tv_nsec - start_time.tv_nsec;
#endif
+ GST_DEBUG_OBJECT (this, "transform done : inbuf %p -> outbuf %p",
+ inframe->buffer, outframe->buffer);
+
return GST_FLOW_OK;
}
static GstFlowReturn
gst_video360_prepare_output_buffer (GstBaseTransform * trans,
- GstBuffer *input, GstBuffer **outbuf)
+ GstBuffer *inbuf, GstBuffer **outbuf)
{
GstBuffer *buf = NULL;
GstVideo360 *this = GST_VIDEO360 (trans);
- if (gst_buffer_pool_acquire_buffer (this->pool, &buf, 0) != GST_FLOW_OK) {
- GST_ERROR("Failed to prepare output buffer.");
+ if (!outbuf) {
+ GST_ERROR_OBJECT (trans, "NULL outbuf");
return GST_FLOW_ERROR;
}
+
+ if (this->passthrough) {
+ buf = inbuf;
+ } else if (gst_buffer_pool_acquire_buffer (this->pool, &buf, 0) != GST_FLOW_OK) {
+ GST_ERROR_OBJECT (trans, "Failed to prepare output buffer.");
+ return GST_FLOW_ERROR;
+ }
+
*outbuf = buf;
+ GST_DEBUG_OBJECT (trans, "passthrough %d, inbuf[%p] outbuf[%p]",
+ this->passthrough, inbuf, *outbuf);
+
return GST_FLOW_OK;
}