12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #pragma once
- #ifdef _WIN32
- #ifdef LIBMEDIADEVICEINFO_EXPORTS
- #define LIBMEDIADEVICEINFO_API __declspec(dllexport)
- #else
- #define LIBMEDIADEVICEINFO_API __declspec(dllimport)
- #endif
- # elif ( defined(__GNUC__) && __GNUC__ >= 4 )
- #define LIBMEDIADEVICEINFO_API __attribute__((visibility("default")))
- #else // RVC_OS_WIN
- #define LIBMEDIADEVICEINFO_API
- #endif // RVC_OS_WIN
- /**
- * get video camera devices count, return device count numbers
- */
- extern "C" LIBMEDIADEVICEINFO_API int rvc_videocap_get_device_count();
- /**
- * get video camera name, buf length should not be larger than 255,
- * return -1 if error
- * if buf == null, len is ignored, return value is the required buffer size
- * else return value is copy to buf, including null-terminated char
- */
- extern "C" LIBMEDIADEVICEINFO_API int rvc_videocap_get_device_name(int device_id, char* buf, int len);
- /**
- * get video device path string, buf length should not be larger than 255,
- * return -1 on error, if buf == null, len is ignored, return value is the required buffer size
- */
- extern "C" LIBMEDIADEVICEINFO_API int rvc_videocap_get_device_path(int device_id, char* buf, int len);
- /**
- * get video camera name and path, buf length should not be larger than 255,
- * return -1 if error
- */
- extern "C" LIBMEDIADEVICEINFO_API int rvc_videocap_get_device_info(int device_id, char* namebuf, int namelen, char* pathbuf, int pathlen);
- /**
- * get video camera recognise name, buf length should not be larger than 255,
- * return -1 if error
- */
- extern "C" LIBMEDIADEVICEINFO_API int rvc_videocap_get_device_fullpathname(int device_id, char* fullnamebuf, int fulllen);
- /**
- * get video device id
- * return -1 if error
- */
- extern "C" LIBMEDIADEVICEINFO_API int rvc_videocap_get_video_device_id(const char* dev_name);
|