This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM62A7: How to change roiElement real time?

Part Number: AM62A7


Tool/software:

How to change roiElement real time?

here is my code:

GstElement* elementscaler;
void updateRoiElement(int x,int y ,int width ,int height){
printf("#########################%d\n",y);
gst_element_set_state(m_pipeline, GST_STATE_PAUSED);
g_object_set(elementscaler, "roi-startx", x,NULL);
g_object_set(elementscaler, "roi-starty", y,NULL);
g_object_set(elementscaler, "roi-width", width,NULL);
g_object_set(elementscaler, "roi-height", height,NULL);
gst_element_set_state(m_pipeline, GST_STATE_PLAYING);
}
I create a thread to call this method every second.
"###" string has printed and y value changed every second.
but screen roi postion not changed.
if i do not call this method , screen will not croped,
and if i call this mothod ,screen will croped one time .and after will not change y value
it seem only first ime this method is effective.