// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT

/**
 * ExtractService 抽帧服务
 * @module
 */

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as $models from "./models.js";

/**
 * ExtractFrames 批量抽帧
 * @param {$models.ExtractFrameRequest} req
 * @returns {$CancellablePromise<$models.ExtractFrameResult[]>}
 */
export function ExtractFrames(req) {
    return $Call.ByID(1728131056, req).then(/** @type {($result: any) => any} */(($result) => {
        return $$createType1($result);
    }));
}

/**
 * ListVideos 列出文件夹中的视频文件
 * @param {string} folderPath
 * @returns {$CancellablePromise<string[]>}
 */
export function ListVideos(folderPath) {
    return $Call.ByID(2398906893, folderPath).then(/** @type {($result: any) => any} */(($result) => {
        return $$createType2($result);
    }));
}

/**
 * ModifyByMetadata 通过修改元数据改变文件 MD5
 * @param {string} inputPath
 * @param {string} outputPath
 * @returns {$CancellablePromise<void>}
 */
export function ModifyByMetadata(inputPath, outputPath) {
    return $Call.ByID(4068325271, inputPath, outputPath);
}

/**
 * ModifyVideosMetadata 批量修改视频元数据
 * @param {string} folderPath
 * @returns {$CancellablePromise<$models.ExtractFrameResult[]>}
 */
export function ModifyVideosMetadata(folderPath) {
    return $Call.ByID(3157640998, folderPath).then(/** @type {($result: any) => any} */(($result) => {
        return $$createType1($result);
    }));
}

/**
 * RemoveFrameRandom 随机删除视频中的一帧
 * @param {string} inputPath
 * @param {string} outputPath
 * @returns {$CancellablePromise<void>}
 */
export function RemoveFrameRandom(inputPath, outputPath) {
    return $Call.ByID(4062392693, inputPath, outputPath);
}

// Private type creation functions
const $$createType0 = $models.ExtractFrameResult.createFrom;
const $$createType1 = $Create.Array($$createType0);
const $$createType2 = $Create.Array($Create.Any);
