Merge pull request #19320 from alalek:videoio_plugins_api_split_capture_write
videoio(plugins): split capture and writer APIspull/19353/head
commit
5e5f47321b
7 changed files with 865 additions and 86 deletions
@ -0,0 +1,199 @@ |
||||
// This file is part of OpenCV project.
|
||||
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
||||
// of this distribution and at http://opencv.org/license.html.
|
||||
|
||||
//
|
||||
// Not a standalone header.
|
||||
//
|
||||
|
||||
namespace cv { namespace impl { namespace legacy { |
||||
|
||||
//==================================================================================================
|
||||
|
||||
class PluginCapture : public cv::IVideoCapture |
||||
{ |
||||
const OpenCV_VideoIO_Plugin_API_preview* plugin_api_; |
||||
CvPluginCapture capture_; |
||||
|
||||
public: |
||||
static |
||||
Ptr<PluginCapture> create(const OpenCV_VideoIO_Plugin_API_preview* plugin_api, |
||||
const std::string &filename, int camera) |
||||
{ |
||||
CV_Assert(plugin_api); |
||||
CvPluginCapture capture = NULL; |
||||
if (plugin_api->v0.Capture_open) |
||||
{ |
||||
CV_Assert(plugin_api->v0.Capture_release); |
||||
if (CV_ERROR_OK == plugin_api->v0.Capture_open(filename.empty() ? 0 : filename.c_str(), camera, &capture)) |
||||
{ |
||||
CV_Assert(capture); |
||||
return makePtr<PluginCapture>(plugin_api, capture); |
||||
} |
||||
} |
||||
return Ptr<PluginCapture>(); |
||||
} |
||||
|
||||
PluginCapture(const OpenCV_VideoIO_Plugin_API_preview* plugin_api, CvPluginCapture capture) |
||||
: plugin_api_(plugin_api), capture_(capture) |
||||
{ |
||||
CV_Assert(plugin_api_); CV_Assert(capture_); |
||||
} |
||||
|
||||
~PluginCapture() |
||||
{ |
||||
CV_DbgAssert(plugin_api_->v0.Capture_release); |
||||
if (CV_ERROR_OK != plugin_api_->v0.Capture_release(capture_)) |
||||
CV_LOG_ERROR(NULL, "Video I/O: Can't release capture by plugin '" << plugin_api_->api_header.api_description << "'"); |
||||
capture_ = NULL; |
||||
} |
||||
double getProperty(int prop) const CV_OVERRIDE |
||||
{ |
||||
double val = -1; |
||||
if (plugin_api_->v0.Capture_getProperty) |
||||
if (CV_ERROR_OK != plugin_api_->v0.Capture_getProperty(capture_, prop, &val)) |
||||
val = -1; |
||||
return val; |
||||
} |
||||
bool setProperty(int prop, double val) CV_OVERRIDE |
||||
{ |
||||
if (plugin_api_->v0.Capture_setProperty) |
||||
if (CV_ERROR_OK == plugin_api_->v0.Capture_setProperty(capture_, prop, val)) |
||||
return true; |
||||
return false; |
||||
} |
||||
bool grabFrame() CV_OVERRIDE |
||||
{ |
||||
if (plugin_api_->v0.Capture_grab) |
||||
if (CV_ERROR_OK == plugin_api_->v0.Capture_grab(capture_)) |
||||
return true; |
||||
return false; |
||||
} |
||||
static CvResult CV_API_CALL retrieve_callback(int stream_idx, const unsigned char* data, int step, int width, int height, int cn, void* userdata) |
||||
{ |
||||
CV_UNUSED(stream_idx); |
||||
cv::_OutputArray* dst = static_cast<cv::_OutputArray*>(userdata); |
||||
if (!dst) |
||||
return CV_ERROR_FAIL; |
||||
cv::Mat(cv::Size(width, height), CV_MAKETYPE(CV_8U, cn), (void*)data, step).copyTo(*dst); |
||||
return CV_ERROR_OK; |
||||
} |
||||
bool retrieveFrame(int idx, cv::OutputArray img) CV_OVERRIDE |
||||
{ |
||||
bool res = false; |
||||
if (plugin_api_->v0.Capture_retreive) |
||||
if (CV_ERROR_OK == plugin_api_->v0.Capture_retreive(capture_, idx, retrieve_callback, (cv::_OutputArray*)&img)) |
||||
res = true; |
||||
return res; |
||||
} |
||||
bool isOpened() const CV_OVERRIDE |
||||
{ |
||||
return capture_ != NULL; // TODO always true
|
||||
} |
||||
int getCaptureDomain() CV_OVERRIDE |
||||
{ |
||||
return plugin_api_->v0.captureAPI; |
||||
} |
||||
}; |
||||
|
||||
|
||||
//==================================================================================================
|
||||
|
||||
class PluginWriter : public cv::IVideoWriter |
||||
{ |
||||
const OpenCV_VideoIO_Plugin_API_preview* plugin_api_; |
||||
CvPluginWriter writer_; |
||||
|
||||
public: |
||||
static |
||||
Ptr<PluginWriter> create(const OpenCV_VideoIO_Plugin_API_preview* plugin_api, |
||||
const std::string& filename, int fourcc, double fps, const cv::Size& sz, |
||||
const VideoWriterParameters& params) |
||||
{ |
||||
CV_Assert(plugin_api); |
||||
CvPluginWriter writer = NULL; |
||||
if (plugin_api->api_header.api_version >= 1 && plugin_api->v1.Writer_open_with_params) |
||||
{ |
||||
CV_Assert(plugin_api->v0.Writer_release); |
||||
CV_Assert(!filename.empty()); |
||||
std::vector<int> vint_params = params.getIntVector(); |
||||
int* c_params = &vint_params[0]; |
||||
unsigned n_params = (unsigned)(vint_params.size() / 2); |
||||
|
||||
if (CV_ERROR_OK == plugin_api->v1.Writer_open_with_params(filename.c_str(), fourcc, fps, sz.width, sz.height, c_params, n_params, &writer)) |
||||
{ |
||||
CV_Assert(writer); |
||||
return makePtr<PluginWriter>(plugin_api, writer); |
||||
} |
||||
} |
||||
else if (plugin_api->v0.Writer_open) |
||||
{ |
||||
CV_Assert(plugin_api->v0.Writer_release); |
||||
CV_Assert(!filename.empty()); |
||||
const bool isColor = params.get(VIDEOWRITER_PROP_IS_COLOR, true); |
||||
const int depth = params.get(VIDEOWRITER_PROP_DEPTH, CV_8U); |
||||
if (depth != CV_8U) |
||||
{ |
||||
CV_LOG_WARNING(NULL, "Video I/O plugin doesn't support (due to lower API level) creation of VideoWriter with depth != CV_8U"); |
||||
return Ptr<PluginWriter>(); |
||||
} |
||||
if (CV_ERROR_OK == plugin_api->v0.Writer_open(filename.c_str(), fourcc, fps, sz.width, sz.height, isColor, &writer)) |
||||
{ |
||||
CV_Assert(writer); |
||||
return makePtr<PluginWriter>(plugin_api, writer); |
||||
} |
||||
} |
||||
return Ptr<PluginWriter>(); |
||||
} |
||||
|
||||
PluginWriter(const OpenCV_VideoIO_Plugin_API_preview* plugin_api, CvPluginWriter writer) |
||||
: plugin_api_(plugin_api), writer_(writer) |
||||
{ |
||||
CV_Assert(plugin_api_); CV_Assert(writer_); |
||||
} |
||||
|
||||
~PluginWriter() |
||||
{ |
||||
CV_DbgAssert(plugin_api_->v0.Writer_release); |
||||
if (CV_ERROR_OK != plugin_api_->v0.Writer_release(writer_)) |
||||
CV_LOG_ERROR(NULL, "Video I/O: Can't release writer by plugin '" << plugin_api_->api_header.api_description << "'"); |
||||
writer_ = NULL; |
||||
} |
||||
double getProperty(int prop) const CV_OVERRIDE |
||||
{ |
||||
double val = -1; |
||||
if (plugin_api_->v0.Writer_getProperty) |
||||
if (CV_ERROR_OK != plugin_api_->v0.Writer_getProperty(writer_, prop, &val)) |
||||
val = -1; |
||||
return val; |
||||
} |
||||
bool setProperty(int prop, double val) CV_OVERRIDE |
||||
{ |
||||
if (plugin_api_->v0.Writer_setProperty) |
||||
if (CV_ERROR_OK == plugin_api_->v0.Writer_setProperty(writer_, prop, val)) |
||||
return true; |
||||
return false; |
||||
} |
||||
bool isOpened() const CV_OVERRIDE |
||||
{ |
||||
return writer_ != NULL; // TODO always true
|
||||
} |
||||
void write(cv::InputArray arr) CV_OVERRIDE |
||||
{ |
||||
cv::Mat img = arr.getMat(); |
||||
CV_DbgAssert(writer_); |
||||
CV_Assert(plugin_api_->v0.Writer_write); |
||||
if (CV_ERROR_OK != plugin_api_->v0.Writer_write(writer_, img.data, (int)img.step[0], img.cols, img.rows, img.channels())) |
||||
{ |
||||
CV_LOG_DEBUG(NULL, "Video I/O: Can't write frame by plugin '" << plugin_api_->api_header.api_description << "'"); |
||||
} |
||||
// TODO return bool result?
|
||||
} |
||||
int getCaptureDomain() const CV_OVERRIDE |
||||
{ |
||||
return plugin_api_->v0.captureAPI; |
||||
} |
||||
}; |
||||
|
||||
|
||||
}}} // namespace
|
@ -0,0 +1,166 @@ |
||||
// This file is part of OpenCV project.
|
||||
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
||||
// of this distribution and at http://opencv.org/license.html.
|
||||
|
||||
#ifndef PLUGIN_CAPTURE_API_HPP |
||||
#define PLUGIN_CAPTURE_API_HPP |
||||
|
||||
#include <opencv2/core/cvdef.h> |
||||
#include <opencv2/core/llapi/llapi.h> |
||||
|
||||
#if !defined(BUILD_PLUGIN) |
||||
|
||||
/// increased for backward-compatible changes, e.g. add new function
|
||||
/// Caller API <= Plugin API -> plugin is fully compatible
|
||||
/// Caller API > Plugin API -> plugin is not fully compatible, caller should use extra checks to use plugins with older API
|
||||
#define CAPTURE_API_VERSION 0 |
||||
|
||||
/// increased for incompatible changes, e.g. remove function argument
|
||||
/// Caller ABI == Plugin ABI -> plugin is compatible
|
||||
/// Caller ABI > Plugin ABI -> plugin is not compatible, caller should use shim code to use old ABI plugins (caller may know how lower ABI works, so it is possible)
|
||||
/// Caller ABI < Plugin ABI -> plugin can't be used (plugin should provide interface with lower ABI to handle that)
|
||||
#define CAPTURE_ABI_VERSION 1 |
||||
|
||||
#else // !defined(BUILD_PLUGIN)
|
||||
|
||||
#if !defined(CAPTURE_ABI_VERSION) || !defined(CAPTURE_API_VERSION) |
||||
#error "Plugin must define CAPTURE_ABI_VERSION and CAPTURE_API_VERSION before including plugin_capture_api.hpp" |
||||
#endif |
||||
|
||||
#endif // !defined(BUILD_PLUGIN)
|
||||
|
||||
|
||||
#ifdef __cplusplus |
||||
extern "C" { |
||||
#endif |
||||
|
||||
typedef CvResult (CV_API_CALL *cv_videoio_capture_retrieve_cb_t)(int stream_idx, unsigned const char* data, int step, int width, int height, int type, void* userdata); |
||||
|
||||
typedef struct CvPluginCapture_t* CvPluginCapture; |
||||
|
||||
struct OpenCV_VideoIO_Capture_Plugin_API_v1_0_api_entries |
||||
{ |
||||
/** OpenCV capture ID (VideoCaptureAPIs)
|
||||
@note API-ENTRY 1, API-Version == 0 |
||||
*/ |
||||
int id; |
||||
|
||||
/** @brief Open video capture
|
||||
|
||||
@param filename File name or NULL to use camera_index instead |
||||
@param camera_index Camera index (used if filename == NULL) |
||||
@param[out] handle pointer on Capture handle |
||||
|
||||
@note API-CALL 2, API-Version == 0 |
||||
*/ |
||||
CvResult (CV_API_CALL *Capture_open)(const char* filename, int camera_index, CV_OUT CvPluginCapture* handle); |
||||
|
||||
/** @brief Release Capture handle
|
||||
|
||||
@param handle Capture handle |
||||
|
||||
@note API-CALL 3, API-Version == 0 |
||||
*/ |
||||
CvResult (CV_API_CALL *Capture_release)(CvPluginCapture handle); |
||||
|
||||
/** @brief Get property value
|
||||
|
||||
@param handle Capture handle |
||||
@param prop Property index |
||||
@param[out] val property value |
||||
|
||||
@note API-CALL 4, API-Version == 0 |
||||
*/ |
||||
CvResult (CV_API_CALL *Capture_getProperty)(CvPluginCapture handle, int prop, CV_OUT double* val); |
||||
|
||||
/** @brief Set property value
|
||||
|
||||
@param handle Capture handle |
||||
@param prop Property index |
||||
@param val property value |
||||
|
||||
@note API-CALL 5, API-Version == 0 |
||||
*/ |
||||
CvResult (CV_API_CALL *Capture_setProperty)(CvPluginCapture handle, int prop, double val); |
||||
|
||||
/** @brief Grab frame
|
||||
|
||||
@param handle Capture handle |
||||
|
||||
@note API-CALL 6, API-Version == 0 |
||||
*/ |
||||
CvResult (CV_API_CALL *Capture_grab)(CvPluginCapture handle); |
||||
|
||||
/** @brief Retrieve frame
|
||||
|
||||
@param handle Capture handle |
||||
@param stream_idx stream index to retrieve (BGR/IR/depth data) |
||||
@param callback retrieve callback (synchronous) |
||||
@param userdata callback context data |
||||
|
||||
@note API-CALL 7, API-Version == 0 |
||||
*/ |
||||
CvResult (CV_API_CALL *Capture_retreive)(CvPluginCapture handle, int stream_idx, cv_videoio_capture_retrieve_cb_t callback, void* userdata); |
||||
}; // OpenCV_VideoIO_Capture_Plugin_API_v1_0_api_entries
|
||||
|
||||
#if 0 |
||||
struct OpenCV_VideoIO_Capture_Plugin_API_v1_1_api_entries |
||||
{ |
||||
/** @brief TBD
|
||||
|
||||
@note API-CALL XXX, API-Version == YYY |
||||
*/ |
||||
CvResult (CV_API_CALL* zzz)( |
||||
... |
||||
); |
||||
}; // OpenCV_VideoIO_Capture_Plugin_API_v1_1_api_entries
|
||||
#endif |
||||
|
||||
typedef struct OpenCV_VideoIO_Capture_Plugin_API_v1_0 |
||||
{ |
||||
OpenCV_API_Header api_header; |
||||
struct OpenCV_VideoIO_Capture_Plugin_API_v1_0_api_entries v0; |
||||
} OpenCV_VideoIO_Capture_Plugin_API_v1_0; |
||||
|
||||
#if 0 |
||||
typedef struct OpenCV_VideoIO_Capture_Plugin_API_v1_1 |
||||
{ |
||||
OpenCV_API_Header api_header; |
||||
struct OpenCV_VideoIO_Capture_Plugin_API_v1_0_api_entries v0; |
||||
struct OpenCV_VideoIO_Capture_Plugin_API_v1_1_api_entries v1; |
||||
} OpenCV_VideoIO_Capture_Plugin_API_v1_1; |
||||
#endif |
||||
|
||||
#if 0 //CAPTURE_ABI_VERSION == 1 && CAPTURE_API_VERSION == 1
|
||||
typedef struct OpenCV_VideoIO_Capture_Plugin_API_v1_1 OpenCV_VideoIO_Capture_Plugin_API; |
||||
#elif CAPTURE_ABI_VERSION == 1 && CAPTURE_API_VERSION == 0 |
||||
typedef struct OpenCV_VideoIO_Capture_Plugin_API_v1_0 OpenCV_VideoIO_Capture_Plugin_API; |
||||
#else |
||||
#error "Not supported configuration: check CAPTURE_ABI_VERSION/CAPTURE_API_VERSION" |
||||
#endif |
||||
|
||||
#ifdef BUILD_PLUGIN |
||||
|
||||
#ifndef CV_PLUGIN_EXPORTS |
||||
#if (defined _WIN32 || defined WINCE || defined __CYGWIN__) |
||||
# define CV_PLUGIN_EXPORTS __declspec(dllexport) |
||||
#elif defined __GNUC__ && __GNUC__ >= 4 |
||||
# define CV_PLUGIN_EXPORTS __attribute__ ((visibility ("default"))) |
||||
#endif |
||||
#endif |
||||
|
||||
CV_PLUGIN_EXPORTS |
||||
const OpenCV_VideoIO_Capture_Plugin_API* CV_API_CALL opencv_videoio_capture_plugin_init_v1 |
||||
(int requested_abi_version, int requested_api_version, void* reserved /*NULL*/) CV_NOEXCEPT; |
||||
|
||||
#else // BUILD_PLUGIN
|
||||
typedef const OpenCV_VideoIO_Capture_Plugin_API* (CV_API_CALL *FN_opencv_videoio_capture_plugin_init_t) |
||||
(int requested_abi_version, int requested_api_version, void* reserved /*NULL*/); |
||||
#endif // BUILD_PLUGIN
|
||||
|
||||
|
||||
#ifdef __cplusplus |
||||
} |
||||
#endif |
||||
|
||||
#endif // PLUGIN_CAPTURE_API_HPP
|
@ -0,0 +1,171 @@ |
||||
// This file is part of OpenCV project.
|
||||
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
||||
// of this distribution and at http://opencv.org/license.html.
|
||||
|
||||
#ifndef PLUGIN_WRITER_API_HPP |
||||
#define PLUGIN_WRITER_API_HPP |
||||
|
||||
#include <opencv2/core/cvdef.h> |
||||
#include <opencv2/core/llapi/llapi.h> |
||||
|
||||
#if !defined(BUILD_PLUGIN) |
||||
|
||||
/// increased for backward-compatible changes, e.g. add new function
|
||||
/// Caller API <= Plugin API -> plugin is fully compatible
|
||||
/// Caller API > Plugin API -> plugin is not fully compatible, caller should use extra checks to use plugins with older API
|
||||
#define WRITER_API_VERSION 1 |
||||
|
||||
/// increased for incompatible changes, e.g. remove function argument
|
||||
/// Caller ABI == Plugin ABI -> plugin is compatible
|
||||
/// Caller ABI > Plugin ABI -> plugin is not compatible, caller should use shim code to use old ABI plugins (caller may know how lower ABI works, so it is possible)
|
||||
/// Caller ABI < Plugin ABI -> plugin can't be used (plugin should provide interface with lower ABI to handle that)
|
||||
#define WRITER_ABI_VERSION 1 |
||||
|
||||
#else // !defined(BUILD_PLUGIN)
|
||||
|
||||
#if !defined(WRITER_ABI_VERSION) || !defined(WRITER_API_VERSION) |
||||
#error "Plugin must define WRITER_ABI_VERSION and WRITER_API_VERSION before including plugin_writer_api.hpp" |
||||
#endif |
||||
|
||||
#endif // !defined(BUILD_PLUGIN)
|
||||
|
||||
|
||||
#ifdef __cplusplus |
||||
extern "C" { |
||||
#endif |
||||
|
||||
typedef struct CvPluginWriter_t* CvPluginWriter; |
||||
|
||||
struct OpenCV_VideoIO_Writer_Plugin_API_v1_0_api_entries |
||||
{ |
||||
/** OpenCV capture ID (VideoCaptureAPIs)
|
||||
@note API-ENTRY 1, API-Version == 0 |
||||
*/ |
||||
int id; |
||||
|
||||
/** @brief Try to open video writer
|
||||
|
||||
@param filename Destination location |
||||
@param fourcc FOURCC code |
||||
@param fps FPS |
||||
@param width frame width |
||||
@param height frame height |
||||
@param isColor true if video stream should save color frames |
||||
@param[out] handle pointer on Writer handle |
||||
|
||||
@note API-CALL 2, API-Version == 0 |
||||
*/ |
||||
CvResult (CV_API_CALL *Writer_open)(const char* filename, int fourcc, double fps, int width, int height, int isColor, |
||||
CV_OUT CvPluginWriter* handle); |
||||
|
||||
/** @brief Release Writer handle
|
||||
|
||||
@param handle Writer handle |
||||
|
||||
@note API-CALL 3, API-Version == 0 |
||||
*/ |
||||
CvResult (CV_API_CALL *Writer_release)(CvPluginWriter handle); |
||||
|
||||
/** @brief Get property value
|
||||
|
||||
@param handle Writer handle |
||||
@param prop Property index |
||||
@param[out] val property value |
||||
|
||||
@note API-CALL 4, API-Version == 0 |
||||
*/ |
||||
CvResult (CV_API_CALL *Writer_getProperty)(CvPluginWriter handle, int prop, CV_OUT double* val); |
||||
|
||||
/** @brief Set property value
|
||||
|
||||
@param handle Writer handle |
||||
@param prop Property index |
||||
@param val property value |
||||
|
||||
@note API-CALL 5, API-Version == 0 |
||||
*/ |
||||
CvResult (CV_API_CALL *Writer_setProperty)(CvPluginWriter handle, int prop, double val); |
||||
|
||||
/** @brief Write frame
|
||||
|
||||
@param handle Writer handle |
||||
@param data frame data |
||||
@param step step in bytes |
||||
@param width frame width in pixels |
||||
@param height frame height |
||||
@param cn number of channels per pixel |
||||
|
||||
@note API-CALL 6, API-Version == 0 |
||||
*/ |
||||
CvResult (CV_API_CALL *Writer_write)(CvPluginWriter handle, const unsigned char *data, int step, int width, int height, int cn); |
||||
}; // OpenCV_VideoIO_Writer_Plugin_API_v1_0_api_entries
|
||||
|
||||
struct OpenCV_VideoIO_Writer_Plugin_API_v1_1_api_entries |
||||
{ |
||||
/** @brief Try to open video writer
|
||||
|
||||
@param filename Destination location |
||||
@param fourcc FOURCC code |
||||
@param fps FPS |
||||
@param width frame width |
||||
@param height frame height |
||||
@param params pointer on 2*n_params array of 'key,value' pairs |
||||
@param n_params number of passed parameters |
||||
@param[out] handle pointer on Writer handle |
||||
|
||||
@note API-CALL 7, API-Version == 1 |
||||
*/ |
||||
CvResult (CV_API_CALL* Writer_open_with_params)( |
||||
const char* filename, int fourcc, double fps, int width, int height, |
||||
int* params, unsigned n_params, |
||||
CV_OUT CvPluginWriter* handle |
||||
); |
||||
}; // OpenCV_VideoIO_Writer_Plugin_API_v1_1_api_entries
|
||||
|
||||
typedef struct OpenCV_VideoIO_Writer_Plugin_API_v1_0 |
||||
{ |
||||
OpenCV_API_Header api_header; |
||||
struct OpenCV_VideoIO_Writer_Plugin_API_v1_0_api_entries v0; |
||||
} OpenCV_VideoIO_Writer_Plugin_API_v1_0; |
||||
|
||||
typedef struct OpenCV_VideoIO_Writer_Plugin_API_v1_1 |
||||
{ |
||||
OpenCV_API_Header api_header; |
||||
struct OpenCV_VideoIO_Writer_Plugin_API_v1_0_api_entries v0; |
||||
struct OpenCV_VideoIO_Writer_Plugin_API_v1_1_api_entries v1; |
||||
} OpenCV_VideoIO_Writer_Plugin_API_v1_1; |
||||
|
||||
|
||||
#if WRITER_ABI_VERSION == 1 && WRITER_API_VERSION == 1 |
||||
typedef struct OpenCV_VideoIO_Writer_Plugin_API_v1_1 OpenCV_VideoIO_Writer_Plugin_API; |
||||
#elif WRITER_ABI_VERSION == 1 && WRITER_API_VERSION == 0 |
||||
typedef struct OpenCV_VideoIO_Writer_Plugin_API_v1_0 OpenCV_VideoIO_Writer_Plugin_API; |
||||
#else |
||||
#error "Not supported configuration: check WRITER_ABI_VERSION/WRITER_API_VERSION" |
||||
#endif |
||||
|
||||
#ifdef BUILD_PLUGIN |
||||
|
||||
#ifndef CV_PLUGIN_EXPORTS |
||||
#if (defined _WIN32 || defined WINCE || defined __CYGWIN__) |
||||
# define CV_PLUGIN_EXPORTS __declspec(dllexport) |
||||
#elif defined __GNUC__ && __GNUC__ >= 4 |
||||
# define CV_PLUGIN_EXPORTS __attribute__ ((visibility ("default"))) |
||||
#endif |
||||
#endif |
||||
|
||||
CV_PLUGIN_EXPORTS |
||||
const OpenCV_VideoIO_Writer_Plugin_API* CV_API_CALL opencv_videoio_writer_plugin_init_v1 |
||||
(int requested_abi_version, int requested_api_version, void* reserved /*NULL*/) CV_NOEXCEPT; |
||||
|
||||
#else // BUILD_PLUGIN
|
||||
typedef const OpenCV_VideoIO_Writer_Plugin_API* (CV_API_CALL *FN_opencv_videoio_writer_plugin_init_t) |
||||
(int requested_abi_version, int requested_api_version, void* reserved /*NULL*/); |
||||
#endif // BUILD_PLUGIN
|
||||
|
||||
|
||||
#ifdef __cplusplus |
||||
} |
||||
#endif |
||||
|
||||
#endif // PLUGIN_WRITER_API_HPP
|
Loading…
Reference in new issue