diff --git a/rtc/rtc.py b/rtc/rtc.py index a6fadcc..01bf1d7 100644 --- a/rtc/rtc.py +++ b/rtc/rtc.py @@ -2,6 +2,7 @@ import asyncio import aiohttp from aiortc import RTCPeerConnection, RTCSessionDescription, RTCConfiguration from aiortc.mediastreams import MediaStreamTrack +from ocr.ocr_violation_detector import detect class VideoTrack(MediaStreamTrack): @@ -88,6 +89,10 @@ async def frame_consumer(frame_queue): while True: # 从队列中获取帧(队列为空时会阻塞等待新帧) current_frame = await frame_queue.get() + + # 检测 + detect(current_frame) + print(f"从队列获取到帧、尺寸: {current_frame.shape}、进行处理") # 标记任务完成