|
@@ -2369,7 +2369,11 @@ ErrorCodeEnum CLocalMediaPlayEntity::StartFFPlayerNotice(int nCfgInx, int nWndX,
|
|
|
if (0 != m_uMediaPlayThreadId) {
|
|
|
m_pMediaAudioPlayer->Close();
|
|
|
m_uMediaPlayThreadId = 0;
|
|
|
+#ifdef RVC_OS_WIN
|
|
|
Sleep(500);
|
|
|
+#else
|
|
|
+ usleep(500*1000);
|
|
|
+#endif // RVC_OS_WI
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2378,7 +2382,11 @@ ErrorCodeEnum CLocalMediaPlayEntity::StartFFPlayerNotice(int nCfgInx, int nWndX,
|
|
|
if (NULL != m_uNoticePlayThreadId) {
|
|
|
m_pMediaPlayer[nCfgInx]->Close();
|
|
|
m_uNoticePlayThreadId = 0;
|
|
|
+#ifdef RVC_OS_WIN
|
|
|
Sleep(500);
|
|
|
+#else
|
|
|
+ usleep(500 * 1000);
|
|
|
+#endif // RVC_OS_WI
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2427,14 +2435,22 @@ ErrorCodeEnum CLocalMediaPlayEntity::StartFFPlayerNotice(int nCfgInx, int nWndX,
|
|
|
else{
|
|
|
Error = Error_InvalidState;
|
|
|
char strerrmsg[MAX_PATH] = { 0 };
|
|
|
+#ifdef RVC_OS_WIN
|
|
|
_snprintf(strerrmsg, MAX_PATH, "play notice failed for %s is not valid!", strNoticeFileName.GetData());
|
|
|
+#else
|
|
|
+ snprintf(strerrmsg, MAX_PATH, "play notice failed for %s is not valid!", strNoticeFileName.GetData());
|
|
|
+#endif // RVC_OS_WIN
|
|
|
LogWarn(Severity_Low, Error_Debug, LOG_EVT_NOTICE_FILE_NOT_VALID, strerrmsg);
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
Error = Error_InvalidState;
|
|
|
char strmsg[MAX_PATH] = { 0 };
|
|
|
+#ifdef RVC_OS_WIN
|
|
|
_snprintf(strmsg, MAX_PATH, "play notice failed for %s not exist!", strNoticeFileName.GetData());
|
|
|
+#else
|
|
|
+ snprintf(strmsg, MAX_PATH, "play notice failed for %s not exist!", strNoticeFileName.GetData());
|
|
|
+#endif
|
|
|
LogWarn(Severity_Low, Error_Debug, LOG_EVT_NOTICE_FILE_NOT_EXIST, strmsg);
|
|
|
}
|
|
|
}
|
|
@@ -2501,7 +2517,19 @@ ErrorCodeEnum CLocalMediaPlayEntity::StopNotice(int nCfgInx)
|
|
|
}
|
|
|
}
|
|
|
#else
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("m_pPlayer = 0x%08x while play!", m_pMediaPlayer[nCfgInx]);
|
|
|
+ m_pMediaPlayer[nCfgInx]->Close();
|
|
|
|
|
|
+ if (m_uNoticePlayThreadId > 0) {
|
|
|
+ if (0 == pthread_join(m_uNoticePlayThreadId, NULL)) {
|
|
|
+ if (m_lastPlayVideo.length() > 0) {
|
|
|
+ char strmsg[MAX_PATH] = { 0 };
|
|
|
+ snprintf(strmsg, MAX_PATH, "%s%s", "success to stop play notice ", m_lastPlayVideo.c_str());
|
|
|
+ LogWarn(Severity_Low, Error_Debug, LOG_EVT_STOP_NOTICE_PLAY, strmsg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ m_uNoticePlayThreadId = 0;
|
|
|
+ }
|
|
|
#endif
|
|
|
}
|
|
|
|