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.

FVID_CONTROL suggestion

HI,

I need help for this setting: we use without problem dm648 min-driver in our application, in which acquiring a fixed image of 1024x219 pixel, but now we have to change dynamically the image size and so we follow these step :

    we STOP video port driver with: status =FVID_control(vport2.chanHandle, VPORT_CMD_STOP, NULL);

    we DEQUEUE all buffers and  deallocate them: status =FVID_dequeue(vport2.chanHandle, &(vport2.frame));

                                                                                           status |=FVID_freeBuffer(vport2.chanHandle, &(vport2.frame));

    then we set the new parameters and we intialize the video port:               vport2.chanHandle =FVID_create("/VP2CAPTURE/A", IOM_INPUT,
                                                                                                                                    &status, (Ptr)&vCapParamsChanRaw, NULL);

and finally we allocate and queue buffer and start video port:       FVID_control(vport2.chanHandle, VPORT_CMD_START, NULL);

 

Now what we see is after some loops of these reinitialization operations the video port send black image and  FVID_CONTROL  result is not IOM_COMPLTED and the video port finally don't answer.

What we have to change in the using of the driver if we want to change video port parameter as image lines? for example to pass from 1024x219 image to 1024x1000?

Regards,

    David

 

  • I have debug the problem and this happens because sometimes when I reinitialize the video port it allocates 4 buffers with addresses like 0xe00xxxxx, but later when I ask a  frame with the FVID_DEQUEUE, the video port brings to me a frame with address 0x00000017 or 0xf0f0f0f0 or etc that are not the correct addresses of 4 buffers! Why this is happen? what I do wrong? It's possible to manage this situation (ask another frame or reinitialize another time the video port)? Which is the correct way?

    Regards,

         David