private VideoCompressor(VideoCompressorHandle hic, VideoCompressorInfo info) { _hic = hic; Info = info; IsCompressing = false; FrameIndex = -1; }
public static VideoCompressor Open(VideoCompressorInfo info) { var compressor = TryOpen(info); if (compressor == null) { throw new VideoCompressorException("Failed to open video compressor."); } return(compressor); }
public static VideoCompressor TryOpen(VideoCompressorInfo info) { if (info == null) { throw new ArgumentNullException(nameof(info)); } var hic = ICOpen(FourCC.VIDC, info.FccHandler, IcMode.Compress); if (hic.IsInvalid) { return(null); } return(new VideoCompressor(hic, info)); }