Fix other ANSCV classes

This commit is contained in:
2026-05-09 16:47:46 +10:00
parent aa323a07a3
commit a94bf88a5b
16 changed files with 1197 additions and 197 deletions
+9
View File
@@ -34,6 +34,9 @@ namespace ANSCENTER
std::string _lastJpegImage;
int _imageWidth, _imageHeight;
int64_t _pts;
// Last currentPts seen from inner getImage(). Used for duplicate
// detection separately from _pts so "same image -> same pts" holds.
int64_t _lastInnerPts = -1;
bool _isPlaying;
bool _useNV12FastPath = false;
std::recursive_mutex _mutex;
@@ -72,6 +75,10 @@ namespace ANSCENTER
void SetDisplayResolution(int width, int height); // Set display output size; 0,0 = original (no resize)
void SetImageQuality(int mode); // 0=fast (AI), 1=quality (display)
void SetTargetFPS(double intervalMs); // Set min interval between processed frames in ms (0 = no limit, 100 = ~10 FPS, 200 = ~5 FPS)
// Jitter buffer for the BGR delivery path (forwarded to CVideoPlayer).
// 0 = no buffering (today's getLatest semantics). Default 200 ms.
void SetJitterBufferMs(int ms);
int GetJitterBufferMs() const;
void SetNV12FastPath(bool enable); // true = NV12 GPU fast path, false = original CPU path (stable)
bool IsNV12FastPath() const { return _useNV12FastPath; }
AVFrame* GetNV12Frame(); // Returns cloned NV12 frame for GPU fast-path (caller must av_frame_free)
@@ -114,4 +121,6 @@ extern "C" __declspec(dllexport) void SetMJPEGImageQuality(ANSCENTER::ANSMJPEGCl
extern "C" __declspec(dllexport) void SetMJPEGDisplayResolution(ANSCENTER::ANSMJPEGClient** Handle, int width, int height);
extern "C" __declspec(dllexport) void SetMJPEGTargetFPS(ANSCENTER::ANSMJPEGClient** Handle, double intervalMs);
extern "C" __declspec(dllexport) void SetMJPEGNV12FastPath(ANSCENTER::ANSMJPEGClient** Handle, int enable);
extern "C" __declspec(dllexport) void SetMJPEGJitterBuffer(ANSCENTER::ANSMJPEGClient** Handle, int jitterMs);
extern "C" __declspec(dllexport) int GetMJPEGJitterBuffer(ANSCENTER::ANSMJPEGClient** Handle);
#endif