Fix double stops

This commit is contained in:
2026-04-22 10:19:03 +10:00
parent 57cc8e0a56
commit 0e203eef99
6 changed files with 33 additions and 14 deletions

View File

@@ -849,11 +849,11 @@ int RSTPTestCVClient() {
while (true) {
index++;
std::cout << "Index=" << index << std::endl;
//if ((index == 200) || (index == 800) || (index == 1200)) { StopRTSP(&rtspClient); }
//if ((index == 400) || (index == 1000) || (index == 1500)) { StartRTSP(&rtspClient); }
if ((index == 200) || (index == 800) || (index == 1200)) { StopRTSP(&rtspClient); }
if ((index == 400) || (index == 1000) || (index == 1500)) { StartRTSP(&rtspClient); }
//if ((index == 1800) || (index == 2200) || (index == 2500)) { StartRTSP(&rtspClient); }
//if ((index == 2000) || (index == 2300) || (index == 2700)) { StartRTSP(&rtspClient); }
//if (index > 20000) break;
if (index > 20000) break;
auto start = std::chrono::system_clock::now();
cv::Mat* image = nullptr; // ✅ Use a pointer to hold the allocated image
GetRTSPCVImage(&rtspClient, width, height, pts,&image);
@@ -1645,7 +1645,7 @@ int main()
// so this works without the unit test having to link FFmpeg itself.
//ANSCV_PrintFFmpegLicense_S();
//FilePlayerClientDoubleDestroy();
FilePlayerClientCVTest();
//FilePlayerClientCVTest();
//VideoPlayerClientTest();
//VideoPlayerClientDoubleDestroy();
// VideoPlayerClientTest();
@@ -1655,7 +1655,7 @@ int main()
// TestGetImage();
//PureOpenCV();
// RSTPTestClient();
//RSTPTestCVClient();
RSTPTestCVClient();
//TestCreateImageFromJpegStringFile();
//TestCreateImageFromFile();
//for (int i = 0; i < 100; i++) {