i want to enumerate more than one GUID in SS mode,what should i do? dose this just like enumerating multi frames?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
laze_4418921
Level 3
Level 3
25 sign-ins First solution authored 25 replies posted

i want to enumerate more than one GUID in SS mode,what should i do? dose this just like enumerating multi frames?

0 Likes
1 Solution

Hi,

Please refer to the following thread: i want to enumerate more than one GUID in SS mode,what should i do? dose this just like enumerating ...

In order to use two video formats (two GUIDs), the descriptors settings will be as follows:

Class-specific Video Streaming Input Header Descriptor - two format descriptors as follows:

     /* Class-specific Video Streaming Input Header Descriptor */

         0x0F,                               /* Descriptor size */

         CX3_CS_INTRFC_DESCR,                /* Class-specific VS I/f Type */

         0x01,                               /* Descriptor Subtype: Input Header */

         0x02,                               /* 2 format desciptor follows */

         SS_TOTAL_SIZE_CLASS_DSCR_L,         /* Total size of Class specific VS descr -Low Byte*/

         SS_TOTAL_SIZE_CLASS_DSCR_H, /* Total size of Class specific VS descr -High Byte*/

         CX3_EP_VIDEO,                  /* EP address for BULK video data: EP 3 IN */

         0x00,                               /* No dynamic format change supported */

         0x04,                               /* Output terminal ID : 4 */

         0x02,                               /* > Still image capture method supported */

         0x00,                               /* Hardware trigger NOT supported */

         0x00,                               /* Hardware to initiate still image capture not supported */

         0x01,                               /* Size of controls field : 1 byte */

         0x00,                               /* D2 : Compression quality supported - No compression*/

         0x00,

     1.  /* Class specific Uncompressed VS format descriptor */

              0x1B,                               /* Descriptor size */

              CX3_CS_INTRFC_DESCR,                /* Class-specific VS interface Type */

              0x04,                               /* Subtype : VS_FORMAT */

              0x01,                               /* Format desciptor index */

              SS_YUY2_TOTAL_NO_OF_RES,//0x01,                               /* Number of Frame Descriptors that follow this descriptor: 01 */

              /* GUID, globally unique identifier used to identify streaming-encoding format: UYVY  */

              0x59, 0x55, 0x59, 0x32,             /*MEDIASUBTYPE_YUY2 GUID: 59555932-0000-0010-8000-00AA00389B71 */

               /*MEDIASUBTYPE_UYVY GUID: 55595659-0000-0010-8000-00AA00389B71 */

               /*'Y' = 0x59, 'U' = 0x55, 'V' = 0x56,'2' = 0x32 */

              /* Y16 GUID: 0x59, 0x31, 0x36, 0x20 */

               0x00, 0x00, 0x10, 0x00,

               0x80, 0x00, 0x00, 0xAA,

               0x00, 0x38, 0x9B, 0x71,

              0x10,                               /* Number of bits per pixel: 16*/

              SS_YUY2_OPTIMUM_FRAME_INDEX,        /* Optimum Frame Index for this stream: 9 1080p */

              0x00,                               /* X dimension of the picture aspect ratio; Non-interlaced */

              0x00,                               /* Y dimension of the pictuer aspect ratio: Non-interlaced */

              0x00,                               /* Interlace Flags: Progressive scanning, no interlace */

              0x00,                               /* duplication of the video stream restriction: 0 - no restriction */

          --->   /* Class specific Uncompressed VS Frame Descriptor 9 - YUY2_1080p at 30 and 60 FPS*/

                   0x22,                               /* Descriptor size */

                   CX3_CS_INTRFC_DESCR,                /* Descriptor type*/

                   0x05,                               /* Subtype:  frame interface*/

                   SS_YUY2_1920x1080_INDEX,            /* Frame Descriptor Index: SS_YUY2_1920x1080_INDEX  = 1*/

                   0x00,                               /* No Still image capture method supported */

                   0x80,0x07,                          /* Width in pixel:  1920 */

                   0x38,0x04,                          /* Height in pixel: 1080 */

                   0x00,0x80,0x53,0x3B,              /* Min bit rate (bits/s): 1920 x 1080 x No Of Bits per Pixel x FrameRate = 995328000 */

                   0x00,0x00,0xA7,0x76,              /* Max bit rate (bits/s): 1920 x 1080 x No Of Bits per Pixel x FrameRate = 1990656000 */

                   0x00,0x48,0x3F,0x00,              /* Maximum video or still frame size in bytes(Deprecated): 1920 x 1080 x 2 */

                   0x15,0x16,0x05,0x00,              /* Default frame interval (in 100ns units): (1/30)x10^7 */

                   0x02,                            /* Frame interval type : No of discrete intervals */

                   0x0A,0x8B,0x02,0x00,

                   0x15,0x16,0x05,0x00,              /* Frame interval 3: Same as Default frame interval */

    2. Add second   /* Class specific Uncompressed VS format descriptor */

             Add frame descriptor----> /* Class specific Uncompressed VS Frame Descriptor */

Once the descriptors are set. You need to handle the class specifis requests for both the format indices in uvc.c file


Regards,

Yashwant

View solution in original post

0 Likes
5 Replies
YashwantK_46
Moderator
Moderator
Moderator
100 solutions authored 50 solutions authored 50 likes received

Hi,


Can you please elaborate the application that you are trying to implement?

Like, what is need to have 2 GUID's in the same application?


Can you please explain what you are trying to acheive?

Regards,

Yashwant

0 Likes

Hello,

Happy for your kindly reply.And it's what the virtualdub shows that gave me the idea to do this.In the attribute page of virtualdub,i found there are  option menus for both frame and GUID.

0 Likes

Hello,

Happy for your kindly reply.And it's what the virtualdub shows that gave me the idea to do this.In the attribute page of virtualdub,i found there are  option menus for both frame and GUID. So i think there shoud be some thing i can do to Implement the same functionality like the multi-frame fromat.

0 Likes

And the sensor i choose can also support two GUIDs. Do you have any useful suggestions? Thanks a lot!

0 Likes

Hi,

Please refer to the following thread: i want to enumerate more than one GUID in SS mode,what should i do? dose this just like enumerating ...

In order to use two video formats (two GUIDs), the descriptors settings will be as follows:

Class-specific Video Streaming Input Header Descriptor - two format descriptors as follows:

     /* Class-specific Video Streaming Input Header Descriptor */

         0x0F,                               /* Descriptor size */

         CX3_CS_INTRFC_DESCR,                /* Class-specific VS I/f Type */

         0x01,                               /* Descriptor Subtype: Input Header */

         0x02,                               /* 2 format desciptor follows */

         SS_TOTAL_SIZE_CLASS_DSCR_L,         /* Total size of Class specific VS descr -Low Byte*/

         SS_TOTAL_SIZE_CLASS_DSCR_H, /* Total size of Class specific VS descr -High Byte*/

         CX3_EP_VIDEO,                  /* EP address for BULK video data: EP 3 IN */

         0x00,                               /* No dynamic format change supported */

         0x04,                               /* Output terminal ID : 4 */

         0x02,                               /* > Still image capture method supported */

         0x00,                               /* Hardware trigger NOT supported */

         0x00,                               /* Hardware to initiate still image capture not supported */

         0x01,                               /* Size of controls field : 1 byte */

         0x00,                               /* D2 : Compression quality supported - No compression*/

         0x00,

     1.  /* Class specific Uncompressed VS format descriptor */

              0x1B,                               /* Descriptor size */

              CX3_CS_INTRFC_DESCR,                /* Class-specific VS interface Type */

              0x04,                               /* Subtype : VS_FORMAT */

              0x01,                               /* Format desciptor index */

              SS_YUY2_TOTAL_NO_OF_RES,//0x01,                               /* Number of Frame Descriptors that follow this descriptor: 01 */

              /* GUID, globally unique identifier used to identify streaming-encoding format: UYVY  */

              0x59, 0x55, 0x59, 0x32,             /*MEDIASUBTYPE_YUY2 GUID: 59555932-0000-0010-8000-00AA00389B71 */

               /*MEDIASUBTYPE_UYVY GUID: 55595659-0000-0010-8000-00AA00389B71 */

               /*'Y' = 0x59, 'U' = 0x55, 'V' = 0x56,'2' = 0x32 */

              /* Y16 GUID: 0x59, 0x31, 0x36, 0x20 */

               0x00, 0x00, 0x10, 0x00,

               0x80, 0x00, 0x00, 0xAA,

               0x00, 0x38, 0x9B, 0x71,

              0x10,                               /* Number of bits per pixel: 16*/

              SS_YUY2_OPTIMUM_FRAME_INDEX,        /* Optimum Frame Index for this stream: 9 1080p */

              0x00,                               /* X dimension of the picture aspect ratio; Non-interlaced */

              0x00,                               /* Y dimension of the pictuer aspect ratio: Non-interlaced */

              0x00,                               /* Interlace Flags: Progressive scanning, no interlace */

              0x00,                               /* duplication of the video stream restriction: 0 - no restriction */

          --->   /* Class specific Uncompressed VS Frame Descriptor 9 - YUY2_1080p at 30 and 60 FPS*/

                   0x22,                               /* Descriptor size */

                   CX3_CS_INTRFC_DESCR,                /* Descriptor type*/

                   0x05,                               /* Subtype:  frame interface*/

                   SS_YUY2_1920x1080_INDEX,            /* Frame Descriptor Index: SS_YUY2_1920x1080_INDEX  = 1*/

                   0x00,                               /* No Still image capture method supported */

                   0x80,0x07,                          /* Width in pixel:  1920 */

                   0x38,0x04,                          /* Height in pixel: 1080 */

                   0x00,0x80,0x53,0x3B,              /* Min bit rate (bits/s): 1920 x 1080 x No Of Bits per Pixel x FrameRate = 995328000 */

                   0x00,0x00,0xA7,0x76,              /* Max bit rate (bits/s): 1920 x 1080 x No Of Bits per Pixel x FrameRate = 1990656000 */

                   0x00,0x48,0x3F,0x00,              /* Maximum video or still frame size in bytes(Deprecated): 1920 x 1080 x 2 */

                   0x15,0x16,0x05,0x00,              /* Default frame interval (in 100ns units): (1/30)x10^7 */

                   0x02,                            /* Frame interval type : No of discrete intervals */

                   0x0A,0x8B,0x02,0x00,

                   0x15,0x16,0x05,0x00,              /* Frame interval 3: Same as Default frame interval */

    2. Add second   /* Class specific Uncompressed VS format descriptor */

             Add frame descriptor----> /* Class specific Uncompressed VS Frame Descriptor */

Once the descriptors are set. You need to handle the class specifis requests for both the format indices in uvc.c file


Regards,

Yashwant

0 Likes