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 set the roi during pipeline running by using tiscaler element

Part Number: AM62A7


Tool/software:

using g_object_set to set the tiscaler roi paramater. when i update the roi area every 1 second.
the roi area will not changed. please share the reason why the problem. the  function will be called every 1 second
here is the code below:

    void updateRoiElement(int x,int y ,int width ,int height){
        // printf("#########################%d\n",y);

        gst_element_set_state(m_pipeline, GST_STATE_PAUSED);
        // gst_element_set_state(elementscaler, 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);

        // GstPad *sink_pad = gst_element_get_static_pad(elementscaler, "sink");
        // if (sink_pad) {
        //     gst_pad_send_event(sink_pad, gst_event_new_reconfigure());
 
        gst_element_set_state(m_pipeline, GST_STATE_PLAYING);
    }