Swift calls c interface problem

  c++, question

I am now a demo, which saves the camera data as a h.264 video data file, ready to be implemented by swift.
After searching the data, we found the relevant interface for swift to obtain the camera data, but we did not find the interface for encoding the camera data. After searching, ios hard-coded interface is a lower-level C interface, belonging to videotoolbox module, so I want to ask, can swift call this interface directly? What should I do?

After you can directly adjust C, 2.x, another way is to write an OC code, adjust C in the OC code, and then bridge OC to Swift.