mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
VideoCapture: add exception error mode similar to fstream + test
This commit is contained in:
@@ -782,9 +782,18 @@ public:
|
||||
*/
|
||||
CV_WRAP String getBackendName() const;
|
||||
|
||||
/** Switches exceptions mode
|
||||
*
|
||||
* methods raise exceptions if not successful instead of returning an error code
|
||||
*/
|
||||
CV_WRAP void setExceptionMode(bool enable) { throwOnFail = enable; }
|
||||
|
||||
/// query if exception mode is active
|
||||
CV_WRAP bool getExceptionMode() { return throwOnFail; }
|
||||
protected:
|
||||
Ptr<CvCapture> cap;
|
||||
Ptr<IVideoCapture> icap;
|
||||
bool throwOnFail;
|
||||
};
|
||||
|
||||
class IVideoWriter;
|
||||
|
||||
Reference in New Issue
Block a user