mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 02:23:01 +08:00
fix: 修复视频识别不支持中文路径的问题
This commit is contained in:
@@ -43,8 +43,8 @@ bool asst::CombatRecordRecognitionTask::_run()
|
||||
video->release();
|
||||
}
|
||||
};
|
||||
auto u8_path = utils::path_to_utf8_string(m_video_path);
|
||||
m_video_ptr = std::shared_ptr<cv::VideoCapture>(new cv::VideoCapture(u8_path), release_video);
|
||||
auto crt_path = utils::path_to_crt_string(m_video_path);
|
||||
m_video_ptr = std::shared_ptr<cv::VideoCapture>(new cv::VideoCapture(crt_path), release_video);
|
||||
|
||||
if (!m_video_ptr->isOpened()) {
|
||||
Log.error(__FUNCTION__, "video_io open failed", m_video_path);
|
||||
|
||||
@@ -26,7 +26,7 @@ bool asst::VideoRecognitionTask::set_params(const json::value& params)
|
||||
|
||||
auto export_task_ptr = std::make_shared<CombatRecordRecognitionTask>(m_callback, m_inst, TaskType);
|
||||
export_task_ptr->set_retry_times(0);
|
||||
bool ret = export_task_ptr->set_video_path(*filename_opt);
|
||||
bool ret = export_task_ptr->set_video_path(utils::path(*filename_opt));
|
||||
ret &= export_task_ptr->set_stage_name(stage_name);
|
||||
if (!ret) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user