diff options
Diffstat (limited to 'gstcs/mm_util_gstcs.c')
-rwxr-xr-x | gstcs/mm_util_gstcs.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/gstcs/mm_util_gstcs.c b/gstcs/mm_util_gstcs.c index 8cdc877..ab10568 100755 --- a/gstcs/mm_util_gstcs.c +++ b/gstcs/mm_util_gstcs.c @@ -262,8 +262,6 @@ static void _mm_set_capabilities(image_format_s* __format) 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", @@ -497,14 +495,14 @@ _mm_imgp_gstcs_processing(gstreamer_s* pGstreamer_s, unsigned char *src, unsigne 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); @@ -556,13 +554,9 @@ _mm_imgp_gstcs_processing(gstreamer_s* pGstreamer_s, unsigned char *src, unsigne 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"); |