registry.hpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 bool hasBackend(VideoCaptureAPIs api);
  31. //! @}
  32. }} // namespace
  33. #endif // OPENCV_VIDEOIO_REGISTRY_HPP