Forums - qtiqmmfsrc issues

1 post / 0 new
qtiqmmfsrc issues
ricardo.juarez
Join Date: 13 Feb 23
Posts: 1
Posted: Mon, 2023-02-13 07:05

Hello,

I have been testing the qtiqmmfsrc and have some questions/issues with it. My main use case is to use appsink gstreamer plug-in to obtain frames from the camera to later use them for some third-party machine vision software. I

The first and most important one is that it seems that the qtiqmmfsrc is not able to handle a restart of the pipeline. That means that if I initialize the pipeline and set it to PLAYING it works, but if I do the following transitions NULL->PLAYING-> NULL ->PLAYING, the qtiqmmfsrc seems to fail to start again.  I am using the following pipeline that should theoretically work.

qtiqmmfsrc name=video_%u ! video/x-raw,format=NV12,width=1600,height=1200,framerate=60/1 ! qtivtransform ! video/x-raw,format=BGR !  appsink

When debugging for the possible causes I notice that the qtiqmmfsrc  does seem to show some "errors" but they are not mark as errors in gstreamer, they are mark as "INFO" which makes them harder to find if using gstreamer logging.   Some of the errors I got are :

____________

[335m28516[00m 0x2c44e400 [37mDEBUG [00m [00m dataqueue gstdataqueue.c:329:gst_data_queue_flush:[00m queue:0x2e2a52f0 0:00:00.675165624 [335m28516[00m 0x2c44e400 [31;01mERROR [00m [00m qtiqmmfsrc qmmf_source_context.cc:516:initialize_camera_param:[00m QMMF Recorder GetCameraParam Failed! 0:00:00.675249687 [335m28516[00m 0x2c44e400 [31;01mERROR [00m [00m qtiqmmfsrc *qmmf_source_context.cc:1535:gst_qmmf_context_start_session:[00m Failed to initialize camera parameters! 0:00:00.675290676 [335m28516[00m* 0x2c44e400 [31;01mERROR [00m [00m qtiqmmfsrc qmmf_source.c:512:qmmfsrc_start_session:<image_%u>[00m Session start failed! 0:00:00.675328020 [335m28516[00m 0x2c44e400 [31;01mERROR [00m [00m qtiqmmfsrc qmmf_source.c:619:qmmfsrc_change_state:<image_%u>[00m Failed to start session! 0:00:00.675365781 [335m28516[00m 0x2c44e400 [36mINFO [00m [00;01;31m GST_STATES gstelement.c:2961:gst_element_change_state:<image_%u>[00m have FAILURE change_state return 0:00:00.675417968 [335m28516[00m 0x2c44e400 [36mINFO [00m [00;01;31m GST_STATES gstelement.c:2549:gst_element_abort_state:<image_%u>[00m aborting state from PAUSED to PLAYING 0:00:00.675458072 [335m28516[00m 0x2c44e400 [37mDEBUG [00m [00;01;31m GST_STATES gstelement.c:2911:gst_element_set_state_func:<image_%u>[00m returned FAILURE 0:00:00.67549968

____________

After this change of state the pipeline just stops working and am left waiting for the change of state that never comes and I have to abort my application.  Stopping and restarting a pipeline is common gstreamer behavior and considering that this is the recommended way to access the camera by your documentation I find it strange that is not able to perform the changes.

https://gstreamer.freedesktop.org/documentation/additional/design/states...

It seems that after aborting my application the camera is not correctly released and as such when I try to run the pipeline again it fails by telling me that the camera is already "in use".  If I then run the pipeline a third time then it works again until the change of state is reached again.

If possible I would like to have a fix for the change of state problem.

Next, are just some comments of things that I find strange but are not necessarily a problem. The effect=mono property in qtiqmmfsrc it seems to be use to request/generate a mono image from the camera, but I was wondering.. wouldn't it be better to just add the GRAY8 format to the x-video/raw? That way it is easier for an application to automatically identify the pixel format instead of having to do strange things. Additionally, it would be appreciated that qtivtransform would be able to return a mono image using GRAY8.

Lastly, additional clarity in the documentation about which capabilities enable base on the camera on your board would be appreciated, instead of having to figure out by trail an error, even just a note or an error message to go read the table with the different cameras that are available would be nice instead of wondering why the gstreamer plug-in tells you that you can use bayer format and then fails to initialize the pipeline.

https://developer.qualcomm.com/qualcomm-robotics-rb5-kit/software-refere...

 

  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.