From 6610e236e7981bf3c4c3a3c1d2fa71091918b9d5 Mon Sep 17 00:00:00 2001 From: TalusL Date: Wed, 19 Jun 2024 23:32:40 +0800 Subject: [PATCH] faster --- src/player/QQuickRealTimePlayer.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/player/QQuickRealTimePlayer.cpp b/src/player/QQuickRealTimePlayer.cpp index 9a5c80c..f56251f 100644 --- a/src/player/QQuickRealTimePlayer.cpp +++ b/src/player/QQuickRealTimePlayer.cpp @@ -93,13 +93,7 @@ shared_ptr QQuickRealTimePlayer::getFrame(bool &got) { // 缓冲区出队被渲染的帧 videoFrameQueue.pop(); } - // 计算一帧的显示时间 - auto frameDuration = 1000 / decoder->GetFps(); // 缓冲,追帧机制 - if (videoFrameQueue.size() < 5) { - double scale = videoFrameQueue.size() * frameDuration / 100.0; - std::this_thread::sleep_for(std::chrono::milliseconds((int)(frameDuration / scale))); - } _lastFrame = frame; return frame; }