Change camera gain from v4l2 program

I could use “v4l2-ctl --set-ctrl=gain=79644600” to change gain of IMX185 from Leopard Imaging,
how can I change gain from v4l2 C/C++ program?

Thanks in advance.

Hi yahoo
This’s the V4l2 framework API, you can reference to v4l2 spec to figure it out. Others you can trace the v4l2-ctl open source to know about.