using MainShell.Common;
using System.Threading;
using System.Threading.Tasks;
using AppCameraType = MainShell.Common.CameraType;

namespace MainShell.Vision
{
    /// <summary>
    /// 图像采集服务接口。
    /// </summary>
    public interface IImageCaptureService
    {
        /// <summary>
        /// 按指定相机和简化参数采集一帧图像。
        /// </summary>
        Task<ImageCaptureResult> CaptureAsync(
            AppCameraType source,
            int timeoutMilliseconds,
            CameraCaptureMode captureMode = CameraCaptureMode.Stream,
            CancellationToken cancellationToken = default(CancellationToken));

        /// <summary>
        /// 按指定参数采集一帧图像。
        /// </summary>
        Task<ImageCaptureResult> CaptureAsync(
            AppCameraType source,
            CameraCaptureOptions options,
            CancellationToken cancellationToken = default(CancellationToken));
    }
}
