From the output, we can see that the value has been shifted forward by 2 units. The guess is that there is an error in the type conversion from c to golang.
According to the documentation, size information is contained in a union. The problem was fixed using the following code.
case FrameSizeTypeStepwise, FrameSizeTypeContinuous:
// Calculate pointer to access stepwise member
frameSize.Size = *(*FrameSize)(unsafe.Pointer(&frmSizeEnum.anon0[0]))
reproduce
Use the following code to view the supported Frame Sizes.
The following error value was returned.
expected behavior
Returned the correct value.
possible reason
From the output, we can see that the value has been shifted forward by 2 units. The guess is that there is an error in the type conversion from c to golang.
https://github.com/vladimirvivien/go4vl/blob/efb35e7d2ec70f6334cad2de3248589117dfec88/v4l2/format_framesizes.go#L70-L72
According to the documentation, size information is contained in a union. The problem was fixed using the following code.