Add more unit test

This commit is contained in:
2026-03-29 12:00:38 +11:00
parent 2392b6785b
commit e7612e421b
3 changed files with 12 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
#ifndef ANSFILEPLAYER_H
#define ANSFILEPLAYER_H
#ifndef ANSFILEPLAYER_CV_H
#define ANSFILEPLAYER_CV_H
#define ANSFILEPLAYER_API __declspec(dllexport)
#include <iostream>
#include <cstdint>

View File

@@ -83,7 +83,7 @@ int FilePlayerTestClient() {
int width = 0;
int height = 0;
int64_t pts = 0;
ANSFILEPLAYER_CV* filePlayerClient;
ANSFILEPLAYER* filePlayerClient;
std::string testVideoFile = "C:\\Programs\\DemoAssets\\Videos\\FireNSmoke\\ANSFireFull.mp4";
CreateANSFilePlayerHandle(&filePlayerClient, "", testVideoFile.c_str());
@@ -123,7 +123,7 @@ int FilePlayerDoubleStartTestClient() {
int width = 0;
int height = 0;
int64_t pts = 0;
ANSFILEPLAYER_CV* filePlayerClient;
ANSFILEPLAYER* filePlayerClient;
std::string testVideoFile = "C:\\Programs\\Silversea\\PeopleCountCam.mp4";
// "C:\\Programs\\Documentation\\Video\\BM\\OriginalRes.mp4";// "C:\\Programs\\LPRVideo\\test_1.mp4";
@@ -463,7 +463,7 @@ int FilePlayerOpenCVTestClient() {
int width = 0;
int height = 0;
int64_t pts = 0;
ANSFILEPLAYER_CV* filePlayerClient;
ANSFILEPLAYER* filePlayerClient;
//std::string testVideoFile = "C:\\Programs\\DemoAssets\\Videos\\ALRP\\3725.mp4";
std::string testVideoFile = "C:\\Programs\\DemoAssets\\Videos\\SecureAgility\\TFNSW-AT-TCS2811-01_small.mp4";
@@ -510,7 +510,7 @@ int FilePlayerTurboJpegTestClient() {
int width = 0;
int height = 0;
int64_t pts = 0;
ANSFILEPLAYER_CV* filePlayerClient;
ANSFILEPLAYER* filePlayerClient;
std::string testVideoFile = "C:\\Programs\\DemoAssets\\Videos\\SecureAgility\\TFNSW-AT-TCS2811-01_small.mp4";
//std::string testVideoFile = "C:\\Programs\\DemoAssets\\Videos\\ALRP\\3725.mp4";
@@ -551,7 +551,7 @@ int FilePlayerDriverTestClient() {
int width = 0;
int height = 0;
int64_t pts = 0;
ANSFILEPLAYER_CV* filePlayerClient;
ANSFILEPLAYER* filePlayerClient;
std::string testVideoFile = "C:\\Programs\\DemoAssets\\Videos\\ALRP\\3725.mp4";
//std::string testVideoFile = "C:\\Programs\\DemoAssets\\Videos\\classroom.mp4";
@@ -618,7 +618,7 @@ int FilePlayerDriverBigFileTestClient() {
int width = 0;
int height = 0;
int64_t pts = 0;
ANSFILEPLAYER_CV* filePlayerClient;
ANSFILEPLAYER* filePlayerClient;
std::string testVideoFile = "C:\\Programs\\DemoAssets\\Videos\\SecureAgility\\TFNSW-AT-TCS2811-01.mp4";
CreateANSFilePlayerHandle(&filePlayerClient, "", testVideoFile.c_str());
SetBBoxFilePlayer(&filePlayerClient, 0, 0, 300, 300);
@@ -663,7 +663,7 @@ int FilePlayerDriverStressClient() {
int width = 0;
int height = 0;
int64_t pts = 0;
ANSFILEPLAYER_CV* filePlayerClient;
ANSFILEPLAYER* filePlayerClient;
std::string testVideoFile = "C:\\Programs\\DemoAssets\\Videos\\ALRP\\3725.mp4";
//std::string testVideoFile = "C:\\Programs\\DemoAssets\\Videos\\classroom.mp4";
@@ -1021,7 +1021,7 @@ int FPTestCVClient() {
int width = 0;
int height = 0;
int64_t pts = 0;
ANSFILEPLAYER_CV* rtspClient;
ANSFILEPLAYER* rtspClient;
std::string testVideoFile = "C:\\Programs\\DemoAssets\\Videos\\ALRP\\3725.mp4";

View File

@@ -32,6 +32,8 @@ target_link_libraries(ANSCV-UnitTest
PRIVATE opencv
PRIVATE turbojpeg
PRIVATE zxing
PRIVATE CUDA::cudart
PRIVATE CUDA::nvjpeg
)
if(WIN32)