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.

capture device creation performance on dm365

Hello,

We encounter a problem with capture device creation performance while working with DM365 platform & dvsdk2_10_00_17(dmai_1_21_00_10) & kernel  of montavista 2.6.18

 

During initialization (and then in case of disconnect/connect video) we use next sequence of APIs:

Capture_delete(handle); //only in case of video disconnection

 attrs.VideoInput = Capture_Input_Composite;

Capture_detectVideoStd(NULL,&videoStd,&attrs);

attrs.VideoStd=VideoStdAUTO;

Capture_create(NULL,&attrs);

 

After profiling we see that each of  API calls Capture_detectVideoStd and Capture_create  takes more than 3.5 sec (up to 4.8 sec) and so capture device creation takes about 10 sec. What are the reasons of this low performance and is there any way to reduce this time?

  • Hello,

    The Capture_detectVideoStd() actually probes which type of signal is connected, which can be time consuming. If you know what is connected to your composite input you can set up the Capture_Attrs accordingly and not call Capture_detectVideoStd().

    Regards, Niclas

  • Nicolas,

    thank you for your reply. First of all I don't know if PAL or NTSC source is connected to video input. But even if yes (it is place for workaround), we have issue of connect/disconnect video and I use Capture_detectVideoStd() to know if video is connected. Is there another way to know if video is connected? And what about Capture_create, it also takes about 4 seconds?

     

    Regards,

    Julia

  • Hi Julia,

    I would look at the Capture_create() source code, it may be calling Capture_detectVideoStd() as well. There may be short cuts you can take in the Capture module as well as the device driver to get the detection time down, since you may not need to probe for everything in your specific case. All the source code is available.

    Regards, Niclas

  • Hi Niclas,

    you are right, Capture_detectVideoStd() is called inside Capture_create() and it is the reason of time consuming of this API. I will try to investigate the issue of video standard detection and let you know.

     

    Regards,

    Julia