VideoWriter.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  1. using OpenCVForUnity.CoreModule;
  2. using OpenCVForUnity.UtilsModule;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Runtime.InteropServices;
  6. namespace OpenCVForUnity.VideoioModule
  7. {
  8. // C++: class VideoWriter
  9. /**
  10. * Video writer class.
  11. *
  12. * The class provides C++ API for writing video files or image sequences.
  13. */
  14. public class VideoWriter : DisposableOpenCVObject
  15. {
  16. protected override void Dispose(bool disposing)
  17. {
  18. try
  19. {
  20. if (disposing)
  21. {
  22. }
  23. if (IsEnabledDispose)
  24. {
  25. if (nativeObj != IntPtr.Zero)
  26. videoio_VideoWriter_delete(nativeObj);
  27. nativeObj = IntPtr.Zero;
  28. }
  29. }
  30. finally
  31. {
  32. base.Dispose(disposing);
  33. }
  34. }
  35. protected internal VideoWriter(IntPtr addr) : base(addr) { }
  36. public IntPtr getNativeObjAddr() { return nativeObj; }
  37. // internal usage only
  38. public static VideoWriter __fromPtr__(IntPtr addr) { return new VideoWriter(addr); }
  39. //
  40. // C++: cv::VideoWriter::VideoWriter()
  41. //
  42. /**
  43. * Default constructors
  44. *
  45. * The constructors/functions initialize video writers.
  46. * <ul>
  47. * <li>
  48. * On Linux FFMPEG is used to write videos;
  49. * </li>
  50. * <li>
  51. * On Windows FFMPEG or MSWF or DSHOW is used;
  52. * </li>
  53. * <li>
  54. * On MacOSX AVFoundation is used.
  55. * </li>
  56. * </ul>
  57. */
  58. public VideoWriter()
  59. {
  60. nativeObj = DisposableObject.ThrowIfNullIntPtr(videoio_VideoWriter_VideoWriter_10());
  61. }
  62. //
  63. // C++: cv::VideoWriter::VideoWriter(String filename, int fourcc, double fps, Size frameSize, bool isColor = true)
  64. //
  65. /**
  66. *
  67. * param filename Name of the output video file.
  68. * param fourcc 4-character code of codec used to compress the frames. For example,
  69. * VideoWriter::fourcc('P','I','M','1') is a MPEG-1 codec, VideoWriter::fourcc('M','J','P','G')
  70. * is a motion-jpeg codec etc. List of codes can be obtained at
  71. * [MSDN](https://docs.microsoft.com/en-us/windows/win32/medfound/video-fourccs) page
  72. * or with this [archived page](https://web.archive.org/web/20220316062600/http://www.fourcc.org/codecs.php)
  73. * of the fourcc site for a more complete list). FFMPEG backend with MP4 container natively uses
  74. * other values as fourcc code: see [ObjectType](http://mp4ra.org/#/codecs),
  75. * so you may receive a warning message from OpenCV about fourcc code conversion.
  76. * param fps Framerate of the created video stream.
  77. * param frameSize Size of the video frames.
  78. * param isColor If it is not zero, the encoder will expect and encode color frames, otherwise it
  79. * will work with grayscale frames.
  80. *
  81. * <b>Tips</b>:
  82. * <ul>
  83. * <li>
  84. * With some backends {code fourcc=-1} pops up the codec selection dialog from the system.
  85. * </li>
  86. * <li>
  87. * To save image sequence use a proper filename (eg. {code img_%02d.jpg}) and {code fourcc=0}
  88. * OR {code fps=0}. Use uncompressed image format (eg. {code img_%02d.BMP}) to save raw frames.
  89. * </li>
  90. * <li>
  91. * Most codecs are lossy. If you want lossless video file you need to use a lossless codecs
  92. * (eg. FFMPEG FFV1, Huffman HFYU, Lagarith LAGS, etc...)
  93. * </li>
  94. * <li>
  95. * If FFMPEG is enabled, using {code codec=0; fps=0;} you can create an uncompressed (raw) video file.
  96. * </li>
  97. * </ul>
  98. */
  99. public VideoWriter(string filename, int fourcc, double fps, Size frameSize, bool isColor)
  100. {
  101. nativeObj = DisposableObject.ThrowIfNullIntPtr(videoio_VideoWriter_VideoWriter_11(filename, fourcc, fps, frameSize.width, frameSize.height, isColor));
  102. }
  103. /**
  104. *
  105. * param filename Name of the output video file.
  106. * param fourcc 4-character code of codec used to compress the frames. For example,
  107. * VideoWriter::fourcc('P','I','M','1') is a MPEG-1 codec, VideoWriter::fourcc('M','J','P','G')
  108. * is a motion-jpeg codec etc. List of codes can be obtained at
  109. * [MSDN](https://docs.microsoft.com/en-us/windows/win32/medfound/video-fourccs) page
  110. * or with this [archived page](https://web.archive.org/web/20220316062600/http://www.fourcc.org/codecs.php)
  111. * of the fourcc site for a more complete list). FFMPEG backend with MP4 container natively uses
  112. * other values as fourcc code: see [ObjectType](http://mp4ra.org/#/codecs),
  113. * so you may receive a warning message from OpenCV about fourcc code conversion.
  114. * param fps Framerate of the created video stream.
  115. * param frameSize Size of the video frames.
  116. * will work with grayscale frames.
  117. *
  118. * <b>Tips</b>:
  119. * <ul>
  120. * <li>
  121. * With some backends {code fourcc=-1} pops up the codec selection dialog from the system.
  122. * </li>
  123. * <li>
  124. * To save image sequence use a proper filename (eg. {code img_%02d.jpg}) and {code fourcc=0}
  125. * OR {code fps=0}. Use uncompressed image format (eg. {code img_%02d.BMP}) to save raw frames.
  126. * </li>
  127. * <li>
  128. * Most codecs are lossy. If you want lossless video file you need to use a lossless codecs
  129. * (eg. FFMPEG FFV1, Huffman HFYU, Lagarith LAGS, etc...)
  130. * </li>
  131. * <li>
  132. * If FFMPEG is enabled, using {code codec=0; fps=0;} you can create an uncompressed (raw) video file.
  133. * </li>
  134. * </ul>
  135. */
  136. public VideoWriter(string filename, int fourcc, double fps, Size frameSize)
  137. {
  138. nativeObj = DisposableObject.ThrowIfNullIntPtr(videoio_VideoWriter_VideoWriter_12(filename, fourcc, fps, frameSize.width, frameSize.height));
  139. }
  140. //
  141. // C++: cv::VideoWriter::VideoWriter(String filename, int apiPreference, int fourcc, double fps, Size frameSize, bool isColor = true)
  142. //
  143. /**
  144. *
  145. * The {code apiPreference} parameter allows to specify API backends to use. Can be used to enforce a specific reader implementation
  146. * if multiple are available: e.g. cv::CAP_FFMPEG or cv::CAP_GSTREAMER.
  147. * param filename automatically generated
  148. * param apiPreference automatically generated
  149. * param fourcc automatically generated
  150. * param fps automatically generated
  151. * param frameSize automatically generated
  152. * param isColor automatically generated
  153. */
  154. public VideoWriter(string filename, int apiPreference, int fourcc, double fps, Size frameSize, bool isColor)
  155. {
  156. nativeObj = DisposableObject.ThrowIfNullIntPtr(videoio_VideoWriter_VideoWriter_13(filename, apiPreference, fourcc, fps, frameSize.width, frameSize.height, isColor));
  157. }
  158. /**
  159. *
  160. * The {code apiPreference} parameter allows to specify API backends to use. Can be used to enforce a specific reader implementation
  161. * if multiple are available: e.g. cv::CAP_FFMPEG or cv::CAP_GSTREAMER.
  162. * param filename automatically generated
  163. * param apiPreference automatically generated
  164. * param fourcc automatically generated
  165. * param fps automatically generated
  166. * param frameSize automatically generated
  167. */
  168. public VideoWriter(string filename, int apiPreference, int fourcc, double fps, Size frameSize)
  169. {
  170. nativeObj = DisposableObject.ThrowIfNullIntPtr(videoio_VideoWriter_VideoWriter_14(filename, apiPreference, fourcc, fps, frameSize.width, frameSize.height));
  171. }
  172. //
  173. // C++: cv::VideoWriter::VideoWriter(String filename, int fourcc, double fps, Size frameSize, vector_int _params)
  174. //
  175. /**
  176. *
  177. * The {code params} parameter allows to specify extra encoder parameters encoded as pairs (paramId_1, paramValue_1, paramId_2, paramValue_2, ... .)
  178. * see cv::VideoWriterProperties
  179. * param filename automatically generated
  180. * param fourcc automatically generated
  181. * param fps automatically generated
  182. * param frameSize automatically generated
  183. * param _params automatically generated
  184. */
  185. public VideoWriter(string filename, int fourcc, double fps, Size frameSize, MatOfInt _params)
  186. {
  187. if (_params != null) _params.ThrowIfDisposed();
  188. Mat _params_mat = _params;
  189. nativeObj = DisposableObject.ThrowIfNullIntPtr(videoio_VideoWriter_VideoWriter_15(filename, fourcc, fps, frameSize.width, frameSize.height, _params_mat.nativeObj));
  190. }
  191. //
  192. // C++: cv::VideoWriter::VideoWriter(String filename, int apiPreference, int fourcc, double fps, Size frameSize, vector_int _params)
  193. //
  194. public VideoWriter(string filename, int apiPreference, int fourcc, double fps, Size frameSize, MatOfInt _params)
  195. {
  196. if (_params != null) _params.ThrowIfDisposed();
  197. Mat _params_mat = _params;
  198. nativeObj = DisposableObject.ThrowIfNullIntPtr(videoio_VideoWriter_VideoWriter_16(filename, apiPreference, fourcc, fps, frameSize.width, frameSize.height, _params_mat.nativeObj));
  199. }
  200. //
  201. // C++: bool cv::VideoWriter::open(String filename, int fourcc, double fps, Size frameSize, bool isColor = true)
  202. //
  203. /**
  204. * Initializes or reinitializes video writer.
  205. *
  206. * The method opens video writer. Parameters are the same as in the constructor
  207. * VideoWriter::VideoWriter.
  208. * return {code true} if video writer has been successfully initialized
  209. *
  210. * The method first calls VideoWriter::release to close the already opened file.
  211. * param filename automatically generated
  212. * param fourcc automatically generated
  213. * param fps automatically generated
  214. * param frameSize automatically generated
  215. * param isColor automatically generated
  216. */
  217. public bool open(string filename, int fourcc, double fps, Size frameSize, bool isColor)
  218. {
  219. ThrowIfDisposed();
  220. return videoio_VideoWriter_open_10(nativeObj, filename, fourcc, fps, frameSize.width, frameSize.height, isColor);
  221. }
  222. /**
  223. * Initializes or reinitializes video writer.
  224. *
  225. * The method opens video writer. Parameters are the same as in the constructor
  226. * VideoWriter::VideoWriter.
  227. * return {code true} if video writer has been successfully initialized
  228. *
  229. * The method first calls VideoWriter::release to close the already opened file.
  230. * param filename automatically generated
  231. * param fourcc automatically generated
  232. * param fps automatically generated
  233. * param frameSize automatically generated
  234. */
  235. public bool open(string filename, int fourcc, double fps, Size frameSize)
  236. {
  237. ThrowIfDisposed();
  238. return videoio_VideoWriter_open_11(nativeObj, filename, fourcc, fps, frameSize.width, frameSize.height);
  239. }
  240. //
  241. // C++: bool cv::VideoWriter::open(String filename, int apiPreference, int fourcc, double fps, Size frameSize, bool isColor = true)
  242. //
  243. public bool open(string filename, int apiPreference, int fourcc, double fps, Size frameSize, bool isColor)
  244. {
  245. ThrowIfDisposed();
  246. return videoio_VideoWriter_open_12(nativeObj, filename, apiPreference, fourcc, fps, frameSize.width, frameSize.height, isColor);
  247. }
  248. public bool open(string filename, int apiPreference, int fourcc, double fps, Size frameSize)
  249. {
  250. ThrowIfDisposed();
  251. return videoio_VideoWriter_open_13(nativeObj, filename, apiPreference, fourcc, fps, frameSize.width, frameSize.height);
  252. }
  253. //
  254. // C++: bool cv::VideoWriter::open(String filename, int fourcc, double fps, Size frameSize, vector_int _params)
  255. //
  256. public bool open(string filename, int fourcc, double fps, Size frameSize, MatOfInt _params)
  257. {
  258. ThrowIfDisposed();
  259. if (_params != null) _params.ThrowIfDisposed();
  260. Mat _params_mat = _params;
  261. return videoio_VideoWriter_open_14(nativeObj, filename, fourcc, fps, frameSize.width, frameSize.height, _params_mat.nativeObj);
  262. }
  263. //
  264. // C++: bool cv::VideoWriter::open(String filename, int apiPreference, int fourcc, double fps, Size frameSize, vector_int _params)
  265. //
  266. public bool open(string filename, int apiPreference, int fourcc, double fps, Size frameSize, MatOfInt _params)
  267. {
  268. ThrowIfDisposed();
  269. if (_params != null) _params.ThrowIfDisposed();
  270. Mat _params_mat = _params;
  271. return videoio_VideoWriter_open_15(nativeObj, filename, apiPreference, fourcc, fps, frameSize.width, frameSize.height, _params_mat.nativeObj);
  272. }
  273. //
  274. // C++: bool cv::VideoWriter::isOpened()
  275. //
  276. /**
  277. * Returns true if video writer has been successfully initialized.
  278. * return automatically generated
  279. */
  280. public bool isOpened()
  281. {
  282. ThrowIfDisposed();
  283. return videoio_VideoWriter_isOpened_10(nativeObj);
  284. }
  285. //
  286. // C++: void cv::VideoWriter::release()
  287. //
  288. /**
  289. * Closes the video writer.
  290. *
  291. * The method is automatically called by subsequent VideoWriter::open and by the VideoWriter
  292. * destructor.
  293. */
  294. public void release()
  295. {
  296. ThrowIfDisposed();
  297. videoio_VideoWriter_release_10(nativeObj);
  298. }
  299. //
  300. // C++: void cv::VideoWriter::write(Mat image)
  301. //
  302. /**
  303. * Writes the next video frame
  304. *
  305. * param image The written frame. In general, color images are expected in BGR format.
  306. *
  307. * The function/method writes the specified image to video file. It must have the same size as has
  308. * been specified when opening the video writer.
  309. */
  310. public void write(Mat image)
  311. {
  312. ThrowIfDisposed();
  313. if (image != null) image.ThrowIfDisposed();
  314. videoio_VideoWriter_write_10(nativeObj, image.nativeObj);
  315. }
  316. //
  317. // C++: bool cv::VideoWriter::set(int propId, double value)
  318. //
  319. /**
  320. * Sets a property in the VideoWriter.
  321. *
  322. * param propId Property identifier from cv::VideoWriterProperties (eg. cv::VIDEOWRITER_PROP_QUALITY)
  323. * or one of REF: videoio_flags_others
  324. *
  325. * param value Value of the property.
  326. * return {code true} if the property is supported by the backend used by the VideoWriter instance.
  327. */
  328. public bool set(int propId, double value)
  329. {
  330. ThrowIfDisposed();
  331. return videoio_VideoWriter_set_10(nativeObj, propId, value);
  332. }
  333. //
  334. // C++: double cv::VideoWriter::get(int propId)
  335. //
  336. /**
  337. * Returns the specified VideoWriter property
  338. *
  339. * param propId Property identifier from cv::VideoWriterProperties (eg. cv::VIDEOWRITER_PROP_QUALITY)
  340. * or one of REF: videoio_flags_others
  341. *
  342. * return Value for the specified property. Value 0 is returned when querying a property that is
  343. * not supported by the backend used by the VideoWriter instance.
  344. */
  345. public double get(int propId)
  346. {
  347. ThrowIfDisposed();
  348. return videoio_VideoWriter_get_10(nativeObj, propId);
  349. }
  350. //
  351. // C++: static int cv::VideoWriter::fourcc(char c1, char c2, char c3, char c4)
  352. //
  353. /**
  354. * Concatenates 4 chars to a fourcc code
  355. *
  356. * return a fourcc code
  357. *
  358. * This static method constructs the fourcc code of the codec to be used in the constructor
  359. * VideoWriter::VideoWriter or VideoWriter::open.
  360. * param c1 automatically generated
  361. * param c2 automatically generated
  362. * param c3 automatically generated
  363. * param c4 automatically generated
  364. */
  365. public static int fourcc(char c1, char c2, char c3, char c4)
  366. {
  367. return videoio_VideoWriter_fourcc_10(c1, c2, c3, c4);
  368. }
  369. //
  370. // C++: String cv::VideoWriter::getBackendName()
  371. //
  372. /**
  373. * Returns used backend API name
  374. *
  375. * <b>Note:</b> Stream should be opened.
  376. * return automatically generated
  377. */
  378. public string getBackendName()
  379. {
  380. ThrowIfDisposed();
  381. string retVal = Marshal.PtrToStringAnsi(DisposableObject.ThrowIfNullIntPtr(videoio_VideoWriter_getBackendName_10(nativeObj)));
  382. return retVal;
  383. }
  384. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  385. const string LIBNAME = "__Internal";
  386. #else
  387. const string LIBNAME = "opencvforunity";
  388. #endif
  389. // C++: cv::VideoWriter::VideoWriter()
  390. [DllImport(LIBNAME)]
  391. private static extern IntPtr videoio_VideoWriter_VideoWriter_10();
  392. // C++: cv::VideoWriter::VideoWriter(String filename, int fourcc, double fps, Size frameSize, bool isColor = true)
  393. [DllImport(LIBNAME)]
  394. private static extern IntPtr videoio_VideoWriter_VideoWriter_11(string filename, int fourcc, double fps, double frameSize_width, double frameSize_height, [MarshalAs(UnmanagedType.U1)] bool isColor);
  395. [DllImport(LIBNAME)]
  396. private static extern IntPtr videoio_VideoWriter_VideoWriter_12(string filename, int fourcc, double fps, double frameSize_width, double frameSize_height);
  397. // C++: cv::VideoWriter::VideoWriter(String filename, int apiPreference, int fourcc, double fps, Size frameSize, bool isColor = true)
  398. [DllImport(LIBNAME)]
  399. private static extern IntPtr videoio_VideoWriter_VideoWriter_13(string filename, int apiPreference, int fourcc, double fps, double frameSize_width, double frameSize_height, [MarshalAs(UnmanagedType.U1)] bool isColor);
  400. [DllImport(LIBNAME)]
  401. private static extern IntPtr videoio_VideoWriter_VideoWriter_14(string filename, int apiPreference, int fourcc, double fps, double frameSize_width, double frameSize_height);
  402. // C++: cv::VideoWriter::VideoWriter(String filename, int fourcc, double fps, Size frameSize, vector_int _params)
  403. [DllImport(LIBNAME)]
  404. private static extern IntPtr videoio_VideoWriter_VideoWriter_15(string filename, int fourcc, double fps, double frameSize_width, double frameSize_height, IntPtr _params_mat_nativeObj);
  405. // C++: cv::VideoWriter::VideoWriter(String filename, int apiPreference, int fourcc, double fps, Size frameSize, vector_int _params)
  406. [DllImport(LIBNAME)]
  407. private static extern IntPtr videoio_VideoWriter_VideoWriter_16(string filename, int apiPreference, int fourcc, double fps, double frameSize_width, double frameSize_height, IntPtr _params_mat_nativeObj);
  408. // C++: bool cv::VideoWriter::open(String filename, int fourcc, double fps, Size frameSize, bool isColor = true)
  409. [DllImport(LIBNAME)]
  410. [return: MarshalAs(UnmanagedType.U1)]
  411. private static extern bool videoio_VideoWriter_open_10(IntPtr nativeObj, string filename, int fourcc, double fps, double frameSize_width, double frameSize_height, [MarshalAs(UnmanagedType.U1)] bool isColor);
  412. [DllImport(LIBNAME)]
  413. [return: MarshalAs(UnmanagedType.U1)]
  414. private static extern bool videoio_VideoWriter_open_11(IntPtr nativeObj, string filename, int fourcc, double fps, double frameSize_width, double frameSize_height);
  415. // C++: bool cv::VideoWriter::open(String filename, int apiPreference, int fourcc, double fps, Size frameSize, bool isColor = true)
  416. [DllImport(LIBNAME)]
  417. [return: MarshalAs(UnmanagedType.U1)]
  418. private static extern bool videoio_VideoWriter_open_12(IntPtr nativeObj, string filename, int apiPreference, int fourcc, double fps, double frameSize_width, double frameSize_height, [MarshalAs(UnmanagedType.U1)] bool isColor);
  419. [DllImport(LIBNAME)]
  420. [return: MarshalAs(UnmanagedType.U1)]
  421. private static extern bool videoio_VideoWriter_open_13(IntPtr nativeObj, string filename, int apiPreference, int fourcc, double fps, double frameSize_width, double frameSize_height);
  422. // C++: bool cv::VideoWriter::open(String filename, int fourcc, double fps, Size frameSize, vector_int _params)
  423. [DllImport(LIBNAME)]
  424. [return: MarshalAs(UnmanagedType.U1)]
  425. private static extern bool videoio_VideoWriter_open_14(IntPtr nativeObj, string filename, int fourcc, double fps, double frameSize_width, double frameSize_height, IntPtr _params_mat_nativeObj);
  426. // C++: bool cv::VideoWriter::open(String filename, int apiPreference, int fourcc, double fps, Size frameSize, vector_int _params)
  427. [DllImport(LIBNAME)]
  428. [return: MarshalAs(UnmanagedType.U1)]
  429. private static extern bool videoio_VideoWriter_open_15(IntPtr nativeObj, string filename, int apiPreference, int fourcc, double fps, double frameSize_width, double frameSize_height, IntPtr _params_mat_nativeObj);
  430. // C++: bool cv::VideoWriter::isOpened()
  431. [DllImport(LIBNAME)]
  432. [return: MarshalAs(UnmanagedType.U1)]
  433. private static extern bool videoio_VideoWriter_isOpened_10(IntPtr nativeObj);
  434. // C++: void cv::VideoWriter::release()
  435. [DllImport(LIBNAME)]
  436. private static extern void videoio_VideoWriter_release_10(IntPtr nativeObj);
  437. // C++: void cv::VideoWriter::write(Mat image)
  438. [DllImport(LIBNAME)]
  439. private static extern void videoio_VideoWriter_write_10(IntPtr nativeObj, IntPtr image_nativeObj);
  440. // C++: bool cv::VideoWriter::set(int propId, double value)
  441. [DllImport(LIBNAME)]
  442. [return: MarshalAs(UnmanagedType.U1)]
  443. private static extern bool videoio_VideoWriter_set_10(IntPtr nativeObj, int propId, double value);
  444. // C++: double cv::VideoWriter::get(int propId)
  445. [DllImport(LIBNAME)]
  446. private static extern double videoio_VideoWriter_get_10(IntPtr nativeObj, int propId);
  447. // C++: static int cv::VideoWriter::fourcc(char c1, char c2, char c3, char c4)
  448. [DllImport(LIBNAME)]
  449. private static extern int videoio_VideoWriter_fourcc_10(char c1, char c2, char c3, char c4);
  450. // C++: String cv::VideoWriter::getBackendName()
  451. [DllImport(LIBNAME)]
  452. private static extern IntPtr videoio_VideoWriter_getBackendName_10(IntPtr nativeObj);
  453. // native support for java finalize()
  454. [DllImport(LIBNAME)]
  455. private static extern void videoio_VideoWriter_delete(IntPtr nativeObj);
  456. }
  457. }