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 
5 #ifndef OPENCV_VIDEOIO_REGISTRY_HPP
6 #define OPENCV_VIDEOIO_REGISTRY_HPP
7 
8 #include <opencv2/videoio.hpp>
9 
10 namespace cv { namespace videoio_registry {
11 /** @addtogroup videoio_registry
12 This section contains API description how to query/configure available Video I/O backends.
13 
14 Runtime configuration options:
15 - enable debug mode: `OPENCV_VIDEOIO_DEBUG=1`
16 - change backend priority: `OPENCV_VIDEOIO_PRIORITY_<backend>=9999`
17 - disable backend: `OPENCV_VIDEOIO_PRIORITY_<backend>=0`
18 - specify list of backends with high priority (>100000): `OPENCV_VIDEOIO_PRIORITY_LIST=FFMPEG,GSTREAMER`
19 
20 @{
21  */
22 
23 
24 /** @brief Returns backend API name or "UnknownVideoAPI(xxx)"
25 @param api backend ID (#VideoCaptureAPIs)
26 */
27 CV_EXPORTS_W cv::String getBackendName(VideoCaptureAPIs api);
28 
29 /** @brief Returns list of all available backends */
30 CV_EXPORTS_W std::vector<VideoCaptureAPIs> getBackends();
31 
32 /** @brief Returns list of available backends which works via `cv::VideoCapture(int index)` */
33 CV_EXPORTS_W std::vector<VideoCaptureAPIs> getCameraBackends();
34 
35 /** @brief Returns list of available backends which works via `cv::VideoCapture(filename)` */
36 CV_EXPORTS_W std::vector<VideoCaptureAPIs> getStreamBackends();
37 
38 /** @brief Returns list of available backends which works via `cv::VideoWriter()` */
39 CV_EXPORTS_W std::vector<VideoCaptureAPIs> getWriterBackends();
40 
41 /** @brief Returns true if backend is available */
42 CV_EXPORTS_W bool hasBackend(VideoCaptureAPIs api);
43 
44 /** @brief Returns true if backend is built in (false if backend is used as plugin) */
45 CV_EXPORTS_W bool isBackendBuiltIn(VideoCaptureAPIs api);
46 
47 /** @brief Returns description and ABI/API version of videoio plugin's camera interface */
48 CV_EXPORTS_W std::string getCameraBackendPluginVersion(
49     VideoCaptureAPIs api,
50     CV_OUT int& version_ABI,
51     CV_OUT int& version_API
52 );
53 
54 /** @brief Returns description and ABI/API version of videoio plugin's stream capture interface */
55 CV_EXPORTS_W std::string getStreamBackendPluginVersion(
56     VideoCaptureAPIs api,
57     CV_OUT int& version_ABI,
58     CV_OUT int& version_API
59 );
60 
61 /** @brief Returns description and ABI/API version of videoio plugin's writer interface */
62 CV_EXPORTS_W std::string getWriterBackendPluginVersion(
63     VideoCaptureAPIs api,
64     CV_OUT int& version_ABI,
65     CV_OUT int& version_API
66 );
67 
68 
69 //! @}
70 }} // namespace
71 
72 #endif // OPENCV_VIDEOIO_REGISTRY_HPP
73