private cvWriteFrame ( IntPtr writer, IntPtr image ) : bool | ||
writer | IntPtr | |
image | IntPtr | |
return | bool |
/// <summary> /// Write a single frame to the video writer /// </summary> /// <typeparam name="TColor">The color type of the frame</typeparam> /// <typeparam name="TDepth">The depth of the frame</typeparam> /// <param name="frame">The frame to be written to the video writer</param> public void WriteFrame <TColor, TDepth>(Image <TColor, TDepth> frame) where TColor : struct, IColor where TDepth : new() { int result = CvToolbox.HasFFMPEG ? CvInvoke.cvWriteFrame_FFMPEG(_ptr, frame.Ptr) : CvInvoke.cvWriteFrame(_ptr, frame.Ptr); if (result == 0) { throw new InvalidOperationException("Unable to write frame to the video writer"); } }
/// <summary> /// Write a single frame to the video writer /// </summary> /// <typeparam name="TColor">The color type of the frame</typeparam> /// <typeparam name="TDepth">The depth of the frame</typeparam> /// <param name="frame">The frame to be written to the video writer</param> public void WriteFrame <TColor, TDepth>(Image <TColor, TDepth> frame) where TColor : struct, IColor where TDepth : new() { bool success = /*CvToolbox.HasFFMPEG ? * CvInvoke.cvWriteFrame_FFMPEG(_ptr, frame.Ptr) :*/ CvInvoke.cvWriteFrame(_ptr, frame.Ptr); if (!success) { throw new InvalidOperationException("Unable to write frame to the video writer"); } }
/// <summary> /// Write a single frame to the video writer /// </summary> /// <typeparam name="TColor">The color type of the frame</typeparam> /// <typeparam name="TDepth">The depth of the frame</typeparam> /// <param name="frame">The frame to be written to the video writer</param> public void WriteFrame <TColor, TDepth>(Image <TColor, TDepth> frame) where TColor : struct, IColor where TDepth : new() { CvInvoke.cvWriteFrame(_ptr, frame.Ptr); }