perf(video): 优化视频处理性能监控和音频播放
- 添加视频处理性能计时和统计功能 - 实现帧处理时间监控和慢帧警告 - 添加音频文件静音修剪功能 - 优化Windows平台音频播放实现 - 调整默认日志输出频率减少冗余信息 - 修复MediaPipe GPU委托在Windows上的兼容性问题
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import platform
|
||||
from typing import Callable
|
||||
|
||||
import mediapipe as mp
|
||||
@@ -27,6 +28,11 @@ class PoseLandmarkerWrapper:
|
||||
|
||||
if prefer_gpu:
|
||||
try:
|
||||
if platform.system() == "Windows":
|
||||
logger.warning(
|
||||
"MediaPipe GPU delegate requested, but MediaPipe Tasks Python does not support GPU delegate on Windows; "
|
||||
"Intel Iris Xe cannot be used by this backend and CPU fallback is expected"
|
||||
)
|
||||
self.delegate = BaseOptions.Delegate.GPU
|
||||
self._landmarker = self._create(self.delegate, result_callback)
|
||||
logger.info("MediaPipe PoseLandmarker initialized with GPU delegate")
|
||||
|
||||
Reference in New Issue
Block a user