Disable NV12 path for ANSCV by default. Currenly use cv::Mat** directly

This commit is contained in:
2026-04-04 10:09:47 +11:00
parent 445abefebe
commit 3a21026790
19 changed files with 575 additions and 232 deletions

View File

@@ -15,6 +15,7 @@
#include <opencv2/highgui.hpp>
#include <opencv2/opencv.hpp>
#include <turbojpeg.h>
#include <chrono>
typedef struct
{
@@ -146,6 +147,7 @@ public:
}
// Image quality mode: 0=fast (OpenCV BT.601, ~2ms), 1=quality (sws BT.709+range, ~12ms)
virtual void setImageQuality(int mode) { m_nImageQuality = mode; }
void setTargetFPS(double intervalMs); // Set minimum interval between processed frames in ms (0 = no limit, 100 = ~10 FPS)
virtual void setRtpMulticast(BOOL flag) {}
virtual void setRtpOverUdp(BOOL flag) {}
@@ -266,6 +268,11 @@ protected:
int m_cleanFrameCount = 0; // Count of clean frames after keyframe
static const int SETTLE_FRAME_COUNT = 5; // Number of clean frames before delivering new frames
// Frame rate limiting — skip post-decode processing for frames beyond target interval
double m_targetIntervalMs = 100.0; // default 100ms (~10 FPS), 0 = no limit (process all frames)
std::chrono::steady_clock::time_point m_lastProcessedTime; // timestamp of last processed frame
bool m_targetFPSInitialized = false; // first-frame flag
BOOL m_bPlaying;
BOOL m_bPaused;