|
@@ -203,7 +203,7 @@ static bool IsValidPlayTime(const char* pstrStartTime, const char* pstrEndTime)
|
|
|
}
|
|
|
|
|
|
|
|
|
-static bool CheckFileExist(const char* pstrFolder, const char* pstrFileName, bool blog)
|
|
|
+static bool IsDestFileExist(const char* pstrFolder, const char* pstrFileName, bool blog)
|
|
|
{
|
|
|
bool bret = false;
|
|
|
if (NULL == pstrFolder || NULL == pstrFileName) {
|
|
@@ -402,11 +402,15 @@ void CLocalMediaPlayEntity::WmpDebug(const char *fmt, ...)
|
|
|
|
|
|
void CLocalMediaPlayEntity::WmpLogEvt(int ievent, const char* strmsg)
|
|
|
{
|
|
|
+ static bool bloged = false;
|
|
|
if (0 == ievent){
|
|
|
LogWarn(Severity_Low, Error_Debug, LOG_EVT_VICE_MONITOR_NOT_EXIST, strmsg);
|
|
|
}
|
|
|
else if(1 == ievent){
|
|
|
- LogWarn(Severity_Low, Error_Debug, LOG_EVT_VICE_MONITOR_SET_ERROR, strmsg);
|
|
|
+ if (false == bloged) {
|
|
|
+ LogWarn(Severity_Low, Error_Debug, LOG_EVT_VICE_MONITOR_SET_ERROR, strmsg);
|
|
|
+ bloged = true;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1355,7 +1359,7 @@ DWORD WINAPI MediaPlayThread(LPVOID param)
|
|
|
config.bPrimMonitor = true;
|
|
|
}
|
|
|
|
|
|
- if (!CheckFileExist(config.strRootPath, config.strFileNames[0], blog)){
|
|
|
+ if (!IsDestFileExist(config.strRootPath, config.strFileNames[0], blog)){
|
|
|
break;
|
|
|
}
|
|
|
|
|
@@ -1424,7 +1428,7 @@ DWORD WINAPI MediaPlayThread(LPVOID param)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(!CheckFileExist(config.strRootPath, config.strFileNames[0], blog)){
|
|
|
+ if(!IsDestFileExist(config.strRootPath, config.strFileNames[0], blog)){
|
|
|
continue;
|
|
|
}
|
|
|
|
|
@@ -1458,7 +1462,7 @@ DWORD WINAPI MediaPlayThread(LPVOID param)
|
|
|
strncpy_s(config.strRootPath, i->resourcePath.c_str(), sizeof(config.strRootPath));
|
|
|
strncpy_s(config.strFileNames[0], i->videoNames.c_str(), 256);
|
|
|
|
|
|
- if (!CheckFileExist(config.strRootPath, config.strFileNames[0], blog)) {
|
|
|
+ if (!IsDestFileExist(config.strRootPath, config.strFileNames[0], blog)) {
|
|
|
continue;
|
|
|
}
|
|
|
|
|
@@ -1543,7 +1547,7 @@ DWORD WINAPI StartMediaPlayFunc(LPVOID param)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (!CheckFileExist(config.strRootPath, config.strFileNames[0], blog)) {
|
|
|
+ if (!IsDestFileExist(config.strRootPath, config.strFileNames[0], blog)) {
|
|
|
break;
|
|
|
}
|
|
|
|
|
@@ -1588,7 +1592,7 @@ DWORD WINAPI StartMediaPlayFunc(LPVOID param)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (!CheckFileExist(config.strRootPath, config.strFileNames[0], blog)) {
|
|
|
+ if (!IsDestFileExist(config.strRootPath, config.strFileNames[0], blog)) {
|
|
|
continue;
|
|
|
}
|
|
|
|
|
@@ -1617,7 +1621,7 @@ DWORD WINAPI StartMediaPlayFunc(LPVOID param)
|
|
|
strncpy(config.strRootPath, item.resourcePath.c_str(), item.resourcePath.length() < MAX_PATH ? item.resourcePath.length() : MAX_PATH);
|
|
|
strncpy(config.strFileNames[0], item.videoNames.c_str(), item.videoNames.length() < MAX_PATH ? item.videoNames.length() : MAX_PATH);
|
|
|
|
|
|
- if (!CheckFileExist(config.strRootPath, config.strFileNames[0], blog)) {
|
|
|
+ if (!IsDestFileExist(config.strRootPath, config.strFileNames[0], blog)) {
|
|
|
continue;
|
|
|
}
|
|
|
|
|
@@ -1643,9 +1647,10 @@ DWORD WINAPI StartMediaPlayFunc(LPVOID param)
|
|
|
if (uend_time - ustart_time < RVC_MIN_LOCALPLAYER_TIME) {
|
|
|
break;
|
|
|
}
|
|
|
- blog = false;
|
|
|
}
|
|
|
|
|
|
+ blog = false;
|
|
|
+
|
|
|
if (entity->m_badplayflag) {
|
|
|
entity->m_badplayflag = false;
|
|
|
}
|
|
@@ -1718,7 +1723,7 @@ void* StartMediaPlayFunc(void* param)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (!CheckFileExist(config.strRootPath, config.strFileNames[0], blog)) {
|
|
|
+ if (!IsDestFileExist(config.strRootPath, config.strFileNames[0], blog)) {
|
|
|
break;
|
|
|
}
|
|
|
|
|
@@ -1767,7 +1772,7 @@ void* StartMediaPlayFunc(void* param)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (!CheckFileExist(config.strRootPath, config.strFileNames[0], blog)) {
|
|
|
+ if (!IsDestFileExist(config.strRootPath, config.strFileNames[0], blog)) {
|
|
|
continue;
|
|
|
}
|
|
|
|
|
@@ -1800,7 +1805,7 @@ void* StartMediaPlayFunc(void* param)
|
|
|
strncpy(config.strRootPath, item.strResourcePath, strlen(item.strResourcePath));
|
|
|
strncpy(config.strFileNames[0], item.strvideoNames, strlen(item.strvideoNames));
|
|
|
|
|
|
- if (!CheckFileExist(config.strRootPath, config.strFileNames[0], blog)) {
|
|
|
+ if (!IsDestFileExist(config.strRootPath, config.strFileNames[0], blog)) {
|
|
|
continue;
|
|
|
}
|
|
|
|
|
@@ -1826,10 +1831,10 @@ void* StartMediaPlayFunc(void* param)
|
|
|
if (uend_time - ustart_time < RVC_MIN_LOCALPLAYER_TIME) {
|
|
|
break;
|
|
|
}
|
|
|
-
|
|
|
- blog = false;
|
|
|
}
|
|
|
|
|
|
+ blog = false;
|
|
|
+
|
|
|
entity->m_uMediaPlayThreadId = 0;
|
|
|
|
|
|
return (void*)&iRet;
|