Disable NV12 path for ANSCV by default. Currenly use cv::Mat** directly
This commit is contained in:
@@ -36,6 +36,7 @@ namespace ANSCENTER
|
||||
int _imageWidth, _imageHeight;
|
||||
int64_t _pts;
|
||||
bool _isPlaying;
|
||||
bool _useNV12FastPath = false; // false = original stable CPU path, true = NV12 GPU fast path
|
||||
std::recursive_mutex _mutex;
|
||||
public:
|
||||
ANSFLVClient();
|
||||
@@ -71,6 +72,9 @@ namespace ANSCENTER
|
||||
int GetHWDecodingGpuIndex();
|
||||
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)
|
||||
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)
|
||||
AVFrame* GetCudaHWFrame(); // Returns CUDA HW frame (device ptrs) for zero-copy inference
|
||||
bool IsCudaHWAccel(); // true when decoder uses CUDA (NV12 stays in GPU VRAM)
|
||||
@@ -108,4 +112,6 @@ extern "C" __declspec(dllexport) int IsFLVHWDecodingActive(ANSCENTER::ANSFLVCli
|
||||
extern "C" __declspec(dllexport) int GetFLVHWDecodingGpuIndex(ANSCENTER::ANSFLVClient** Handle);
|
||||
extern "C" __declspec(dllexport) void SetFLVImageQuality(ANSCENTER::ANSFLVClient** Handle, int mode);
|
||||
extern "C" __declspec(dllexport) void SetFLVDisplayResolution(ANSCENTER::ANSFLVClient** Handle, int width, int height);
|
||||
extern "C" __declspec(dllexport) void SetFLVTargetFPS(ANSCENTER::ANSFLVClient** Handle, double intervalMs);
|
||||
extern "C" __declspec(dllexport) void SetFLVNV12FastPath(ANSCENTER::ANSFLVClient** Handle, int enable);
|
||||
#endif
|
||||
Reference in New Issue
Block a user