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.

failed to create capture device

Hi,

I am trying to run  video_loopback in the apps of dmai_2_10_00_17 for dm365,but it couldn't work,the problem is as follows:

vpfe ccdc capture vpfe ccdc capture.1: hpitch = 720, vpitch = 576, bpp=2                                                                    

[DMAI][capture.cvpfe ccdc capture vpfe ccdc capture.1: hpitch=720,vpitch=576,bpp=2] videoStd=6,width=720,height=576                                                                                                          

[DMAI][capture.c] 2 videoStd=6, width=720, height=576                                                                                        

pixelFormat 1=842094158, 2=1498831189                                                                                                        

[DMAI][CAP]                     12                                                                                                            

Failed to create capture device

the problem seems to be the different of the pixelFormat ,so i try to change the Capture_create() in the Capture.c ,but no matter how

i change or add  the  messages to print, no response to me.So i am puzzled whether the Capture.c links to the appmain.c .Anyone can tell me how to fix it?

Thank you !

  • Hello,

    You should set the DMAI_DEBUG environment variable while executing your application to get the DMAI log messages, e.g.:

    DMAI_DEBUG=2 ./myapp

    You can read this and more in the DMAI user's guide shipped in the docs/ folder of the product.

    Regards, Niclas

  • Hi,

    I did it as your suggest,the messages like this:


    @0x000eaf5e:[T:0x4001ee20] ti.sdo.dmai - [Dmai] Dmai log level set to '2'. Note that calling CERuntime_init after this point may cause unexpected change to DMAI tracing.
    @0x00153964:[T:0x4001ee20] ti.sdo.dmai - [Capture] COMPOSITE input selected                                                                                             
    @0x001a57eb:[T:0x4001ee20] ti.sdo.dmai - [Capture] Checking video standard                                                                                              
    @0x001a5b54:[T:0x4001ee20] ti.sdo.dmai - [Capture] Capture input set to COMPOSITE                                                                                       
    @0x001a5cfc:[T:0x4001ee20] ti.sdo.dmai - [BufTab] Allocating BufTab for 6 buffers                                                                                       
    @0x001a5f80:[T:0x4001ee20] ti.sdo.dmai - [Buffer] Alloc Buffer of size 529920 at 0x402f2000 (0x871d6000 phys)                                                           
    @0x001a61b5:[T:0x4001ee20] ti.sdo.dmai - [Buffer] Alloc Buffer of size 529920 at 0x4046c000 (0x8705c000 phys)                                                           
    @0x001a6449:[T:0x4001ee20] ti.sdo.dmai - [Buffer] Alloc Buffer of size 529920 at 0x405e6000 (0x86ee2000 phys)                                                           
    @0x001a6656:[T:0x4001ee20] ti.sdo.dmai - [Buffer] Alloc Buffer of size 529920 at 0x40760000 (0x86d68000 phys)                                                           
    @0x001a6852:[T:0x4001ee20] ti.sdo.dmai - [Buffer] Alloc Buffer of size 529920 at 0x408da000 (0x86bee000 phys)                                                           
    @0x001a6a35:[T:0x4001ee20] ti.sdo.dmai - [Buffer] Alloc Buffer of size 529920 at 0x40a54000 (0x86a74000 phys)                                                           
    -------------------===================1=======================                                                                                                          
    @0x0020d2e3:[T:0x4001ee20] ti.sdo.dmai - [Capture] COMPOSITE input selected                                                                                             
    vpfe ccdc capture vpfe ccdc capture.1: hpitch = 720, vpitch = 480, bpp = 2                                                                                              
    @0x0025edba:[T:0vpfe ccdc capture vpfe ccdc capture.1: hpitch = 720, vpitch = 480, bpp = 2                                                                              
    x4001ee20] ti.sdo.dmai - [Capture] Checking video standard                                                                                                              
    @0x0025ef26:[T:0x4001ee20] ti.sdo.dmai - [Capture] Capture input set to COMPOSITE                                                                                       
    [DMAI][capture.c] videoStd=5, width=720, height=480                                                                                                                     
    [DMAI][capture.c] 2 videoStd=5, width=720, height=480                                                                                                                   
    @0x0025f05f:[T:0x4001ee20] ti.sdo.dmai - [Capture] Capture dimention is set to 480x720                                                                                  
    @0x00262bfd:[T:0x4001ee20] ti.sdo.dmai - [Capture] Video input connected size 720x480 pitch 1440                                                                        
    pixelFormat 1=842094158, 2=1498831189                                                                                                                                   
    [DMAI][CAP]                     12                                                                                                                                      
    @0x00262d77:[T:0x4001ee20] ti.sdo.dmai - [Capture] Pixel format 0x3231564e not supported. Received 59565955                                                             
    Failed to create capture device                                                                                                                                         
    @0x002630ba:[T:0x4001ee20] ti.sdo.dmai - [Buffer] Free Buffer of size 529920 at 0x402f2000 (0x871d6000 phys)                                                            
    @0x00263bc2:[T:0x4001ee20] ti.sdo.dmai - [Buffer] Free Buffer of size 529920 at 0x4046c000 (0x8705c000 phys)                                                            
    @0x00264660:[T:0x4001ee20] ti.sdo.dmai - [Buffer] Free Buffer of size 529920 at 0x405e6000 (0x86ee2000 phys)                                                            
    @0x00265191:[T:0x4001ee20] ti.sdo.dmai - [Buffer] Free Buffer of size 529920 at 0x40760000 (0x86d68000 phys)                                                            
    @0x00265c3c:[T:0x4001ee20] ti.sdo.dmai - [Buffer] Free Buffer of size 529920 at 0x408da000 (0x86bee000 phys)                                                            
    @0x002666d8:[T:0x4001ee20] ti.sdo.dmai - [Buffer] Free Buffer of size 529920 at 0x40a54000 (0x86a74000 phys)

    the problem is Pixel format not supported, i try to change the Capture.c ,because souce code in Capture.c have these sentence

     printf("pixelFormat 1=%d, 2=%d\n", (int)pixelFormat, (int)fmt.fmt.pix.pixelformat);
    #if 1           printf("[DMAI][CAP]   12  \n");
        if (pixelFormat != fmt.fmt.pix.pixelformat) {
            Dmai_err2("Pixel format 0x%x not supported. Received %x\n",
                pixelFormat, fmt.fmt.pix.pixelformat);
            cleanup(hCapture);
            return NULL; 

    from the [dmai] message       "  pixelFormat 1=842094158, 2=1498831189  "    ,we know 1 not equal to 2  ,so will return Null.Maybe this is the problem.

    So i try to change them to be equal ,but there is no response to me.And i add some sentences (e.g printf(“???????”)),i can't see  "??????" is printed.

    I don't know why . Do you have any  suggestion?

    Thank you!