registry.hpp 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. // This file is part of OpenCV project.
  2. // It is subject to the license terms in the LICENSE file found in the top-level directory
  3. // of this distribution and at http://opencv.org/license.html.
  4. #ifndef OPENCV_VIDEOIO_REGISTRY_HPP
  5. #define OPENCV_VIDEOIO_REGISTRY_HPP
  6. #include <opencv2/videoio.hpp>
  7. namespace cv { namespace videoio_registry {
  8. /** @addtogroup videoio_registry
  9. This section contains API description how to query/configure available Video I/O backends.
  10. Runtime configuration options:
  11. - enable debug mode: `OPENCV_VIDEOIO_DEBUG=1`
  12. - change backend priority: `OPENCV_VIDEOIO_PRIORITY_<backend>=9999`
  13. - disable backend: `OPENCV_VIDEOIO_PRIORITY_<backend>=0`
  14. - specify list of backends with high priority (>100000): `OPENCV_VIDEOIO_PRIORITY_LIST=FFMPEG,GSTREAMER`
  15. @{
  16. */
  17. /** @brief Returns backend API name or "UnknownVideoAPI(xxx)"
  18. @param api backend ID (#VideoCaptureAPIs)
  19. */
  20. CV_EXPORTS_W cv::String getBackendName(VideoCaptureAPIs api);
  21. /** @brief Returns list of all available backends */
  22. CV_EXPORTS_W std::vector<VideoCaptureAPIs> getBackends();
  23. /** @brief Returns list of available backends which works via `cv::VideoCapture(int index)` */
  24. CV_EXPORTS_W std::vector<VideoCaptureAPIs> getCameraBackends();
  25. /** @brief Returns list of available backends which works via `cv::VideoCapture(filename)` */
  26. CV_EXPORTS_W std::vector<VideoCaptureAPIs> getStreamBackends();
  27. /** @brief Returns list of available backends which works via `cv::VideoWriter()` */
  28. CV_EXPORTS_W std::vector<VideoCaptureAPIs> getWriterBackends();
  29. /** @brief Returns true if backend is available */
  30. CV_EXPORTS_W bool hasBackend(VideoCaptureAPIs api);
  31. /** @brief Returns true if backend is built in (false if backend is used as plugin) */
  32. CV_EXPORTS_W bool isBackendBuiltIn(VideoCaptureAPIs api);
  33. /** @brief Returns description and ABI/API version of videoio plugin's camera interface */
  34. CV_EXPORTS_W std::string getCameraBackendPluginVersion(
  35. VideoCaptureAPIs api,
  36. CV_OUT int& version_ABI,
  37. CV_OUT int& version_API
  38. );
  39. /** @brief Returns description and ABI/API version of videoio plugin's stream capture interface */
  40. CV_EXPORTS_W std::string getStreamBackendPluginVersion(
  41. VideoCaptureAPIs api,
  42. CV_OUT int& version_ABI,
  43. CV_OUT int& version_API
  44. );
  45. /** @brief Returns description and ABI/API version of videoio plugin's writer interface */
  46. CV_EXPORTS_W std::string getWriterBackendPluginVersion(
  47. VideoCaptureAPIs api,
  48. CV_OUT int& version_ABI,
  49. CV_OUT int& version_API
  50. );
  51. //! @}
  52. }} // namespace
  53. #endif // OPENCV_VIDEOIO_REGISTRY_HPP