return;
}
- gstcs_debug("colorspace: %s(%d)\n", __format->colorspace, strlen(__format->colorspace));
-
videoFormat = _mm_get_video_format(__format->format_label);
__format->caps = gst_caps_new_simple("video/x-raw",
gst_app_src_set_caps(GST_APP_SRC(pGstreamer_s->appsrc), input_format->caps);
gst_app_sink_set_caps(GST_APP_SINK(pGstreamer_s->appsink), output_format->caps);
- if (((input_format->width != input_format->stride) || (input_format->height != input_format->elevation)) &&
- ((strcmp(input_format->colorspace, "RGB") == 0) || (strcmp(input_format->colorspace, "RGBA") == 0))) {
+ if ((input_format->width != input_format->stride) || (input_format->height != input_format->elevation)) {
gstcs_debug("Start _mm_push_buffer_into_pipeline_new");
ret = _mm_push_buffer_into_pipeline_new(input_format, src, pGstreamer_s);
} else {
gstcs_debug("Start mm_push_buffer_into_pipeline");
ret = _mm_push_buffer_into_pipeline(pImgp_info, src, pGstreamer_s);
}
+
if (ret != GSTCS_ERROR_NONE) {
gstcs_error("ERROR - mm_push_buffer_into_pipeline ");
gst_object_unref(pGstreamer_s->pipeline);
gst_buffer_map(pGstreamer_s->output_buffer, &mapinfo, GST_MAP_READ);
int buffer_size = mapinfo.size;
int calc_buffer_size = 0;
- if (((pImgp_info->dst_width != (unsigned int)(output_format->stride)) || (pImgp_info->dst_height != (unsigned int)(output_format->elevation))) &&
- ((strcmp(input_format->colorspace, "RGB") == 0) || (strcmp(input_format->colorspace, "RGBA") == 0))) {
- gstcs_debug("calculate image size with stride & elevation");
- calc_buffer_size = mm_setup_image_size(pImgp_info->output_format_label, output_format->stride, output_format->elevation);
- } else {
- calc_buffer_size = mm_setup_image_size(pImgp_info->output_format_label, pImgp_info->dst_width, pImgp_info->dst_height);
- }
+
+ calc_buffer_size = mm_setup_image_size(pImgp_info->output_format_label, output_format->stride, output_format->elevation);
+
gstcs_debug("buffer size: %d, calc: %d\n", buffer_size, calc_buffer_size);
if (buffer_size != calc_buffer_size) {
gstcs_debug("Buffer size is different \n");