static gboolean gst_validate_ssim_convert (GstValidateSsim * self, SSimConverterInfo * info, GstVideoFrame * frame, GstVideoFrame * converted_frame) { gboolean res = TRUE; GstBuffer *outbuf = NULL; g_return_val_if_fail (info != NULL, FALSE); outbuf = gst_buffer_new_allocate (NULL, info->out_info.size, NULL); if (!gst_video_frame_map (converted_frame, &info->out_info, outbuf, GST_MAP_WRITE)) { GST_VALIDATE_REPORT (self, GENERAL_INPUT_ERROR, "Could not map output converted_frame"); goto fail; } gst_video_converter_frame (info->converter, frame, converted_frame); done: if (outbuf) gst_buffer_unref (outbuf); return res; fail: res = FALSE; goto done; }
static GstFlowReturn gst_video_scale_transform_frame (GstVideoFilter * filter, GstVideoFrame * in_frame, GstVideoFrame * out_frame) { GstVideoScale *videoscale = GST_VIDEO_SCALE_CAST (filter); GstFlowReturn ret = GST_FLOW_OK; GST_CAT_DEBUG_OBJECT (CAT_PERFORMANCE, filter, "doing video scaling"); gst_video_converter_frame (videoscale->convert, in_frame, out_frame); return ret; }
static GstFlowReturn gst_video_convert_transform_frame (GstVideoFilter * filter, GstVideoFrame * in_frame, GstVideoFrame * out_frame) { GstVideoConvert *space; space = GST_VIDEO_CONVERT_CAST (filter); GST_CAT_DEBUG_OBJECT (GST_CAT_PERFORMANCE, filter, "doing colorspace conversion from %s -> to %s", GST_VIDEO_INFO_NAME (&filter->in_info), GST_VIDEO_INFO_NAME (&filter->out_info)); gst_video_converter_frame (space->convert, in_frame, out_frame); return GST_FLOW_OK; }