Skip to content
Snippets Groups Projects
c_cpp_api.rst 6.33 KiB

C++ API

The C++ API of xbob.io allows users to leverage from automatic converters for classes in :py:class:`xbob.io`. To use the C API, clients should first, include the header file <xbob.io/api.h> on their compilation units and then, make sure to call once import_xbob_io() at their module instantiation, as explained at the Python manual.

Here is a dummy C example showing how to include the header and where to call the import function:

#include <xbob.io/api.h>

PyMODINIT_FUNC initclient(void) {

  PyObject* m Py_InitModule("client", ClientMethods);

  if (!m) return;

  // imports the NumPy C-API
  import_array();

  // imports blitz.array C-API
  import_xbob_blitz();

  // imports xbob.io C-API
  import_xbob_io();

}

Note

The include directory can be discovered using :py:func:`xbob.io.get_include`.

Generic Functions

Bob File Support

Bob HDF5 Support

Bob VideoReader Support

Note

The video C-API (and Python) is only available if the package was compiled with FFMPEG or LibAV support.