Misleading Log Message "set rotate failed" from gstimxcompositor.c

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Misleading Log Message "set rotate failed" from gstimxcompositor.c

364 Views
weidongzhou
Contributor I

imxcompositor_pxp plugin floods misleading warning whenever it aggregates a frame . Software release involved:v5.10.9_1.0.0 and v5.10.35_2.0.0. 

 

 

 

0:00:53.950391007   325 0x72d71b30 WARN           imxcompositor gstimxcompositor.c:1530:gst_imxcompositor_aggregate_frames:<comp:sink_0> set rotate failed 0x6d1378a8

 

 

 

This message hints to some errors happened but actually it is only a debug purpose log.

 

 

 

static GstFlowReturn
gst_imxcompositor_aggregate_frames (GstVideoAggregator * vagg,
                                    GstBuffer * outbuf)
{
  GList *l;
  GstImxCompositor *imxcomp = (GstImxCompositor *) (vagg);
  Imx2DDevice *device = imxcomp->device;
  GstFlowReturn ret;
  Imx2DFrame src={0}, dst = {0};
  PhyMemBlock src_mem = {0}, dst_mem = {0};
  guint aggregated = 0;

  if (!device)
    return GST_FLOW_ERROR;

  dst.mem = &dst_mem;
  if (gst_imxcompositor_config_dst(imxcomp, outbuf, &dst) < 0)
    return GST_FLOW_ERROR;

  GST_OBJECT_LOCK (vagg);

  /* TODO: If the frames to be composited completely obscure the background,
   * don't bother drawing the background at all. */
  if (imxcomp->background_enable) {
    if (device->fill) {
      if(device->fill (device, &dst, imxcomp->background) < 0) {
        GST_LOG("fill color background by device failed");
        gst_imxcompositor_fill_background(&dst, imxcomp->background);
      }
    } else {
      GST_LOG("device has no fill interface");
      gst_imxcompositor_fill_background(&dst, imxcomp->background);
    }
  } else {
    //gst_imxcompositor_fill_background(&dst, DEFAULT_IMXCOMPOSITOR_BACKGROUND);
  }

  //re-order by zorder of pad
  GList *pads = g_list_copy(GST_ELEMENT (vagg)->sinkpads);
#if !GST_CHECK_VERSION(1, 16, 0)
  pads = g_list_sort(pads, imxcompositor_pad_zorder_compare);
#endif

  for (l = pads; l; l = l->next) {
    GstVideoAggregatorPad *ppad = l->data;
    GstImxCompositorPad *pad = GST_IMXCOMPOSITOR_PAD (ppad);
    GstBuffer *pad_buffer = NULL;

#if GST_CHECK_VERSION(1, 16, 0)
    GstVideoFrame * aggregated_frame = gst_video_aggregator_pad_get_prepared_frame (ppad);
    if (!aggregated_frame) {
      pad_buffer = gst_video_aggregator_pad_get_current_buffer (ppad);
    } else {
      pad_buffer = aggregated_frame->buffer;
    }
#else
    GstVideoFrame * aggregated_frame = ppad->aggregated_frame;
    pad_buffer = aggregated_frame->buffer;
#endif

    if (pad_buffer != NULL && !pad->ignore_composite) {
      src.mem = &src_mem;
      memset (src.mem, 0, sizeof(PhyMemBlock));
        GST_WARNING_OBJECT (pad, "set rotate failed %p\n", pad_buffer);
      if (gst_imxcompositor_config_src(imxcomp, pad, &src) < 0) {
        continue;
      }

      if (device->set_rotate(device, src.rotate) < 0) {
        GST_WARNING_OBJECT (pad, "set rotate failed");
        continue;
      }
      if (device->set_deinterlace(device, IMX_2D_DEINTERLACE_NONE) < 0) {
        GST_WARNING_OBJECT (pad, "set deinterlace mode failed");
        continue;
      }

 

 

 

   

I suggest NXP developers to downgrade this message to debug or info level and change the log texts "set rotate failed" to something like "device settings start". This will reduce unnecessary debug efforts out of NXP develop teams.

Labels (2)
0 Kudos
1 Reply

327 Views
joanxie
NXP TechSupport
NXP TechSupport

this is warning message not error, but thanks for your suggestion

0 Kudos