|
|
@@ -8,6 +8,7 @@
|
|
|
#include <stdint.h>
|
|
|
#include "../mod_interactivecontrol/Event.h"
|
|
|
#include "Event.h"
|
|
|
+#include <winpr/string.h>
|
|
|
|
|
|
#ifndef RVC_MIN_LOCALPLAYER_TIME
|
|
|
#define RVC_MIN_LOCALPLAYER_TIME 1
|
|
|
@@ -40,17 +41,6 @@ int removeOldTime = 1800;
|
|
|
#define RVC_VIDEOPLAY_END_TIME "17:30:00"
|
|
|
#endif // !RVC_VIDEOPLAY_END_TIME
|
|
|
|
|
|
-//TODO: CrossPlaform [Gifur@2025730]
|
|
|
-#ifndef rvc_snprintf
|
|
|
-#ifdef RVC_OS_WIN
|
|
|
-#define rvc_snprintf _snprintf
|
|
|
-#else
|
|
|
-#define rvc_snprintf snprintf
|
|
|
-#endif // RVC_OS_WIN
|
|
|
-
|
|
|
-#endif // rvc_snprintf
|
|
|
-
|
|
|
-
|
|
|
static uint32_t ConvertStereo2Mono(char* pDstBuf, const uint32_t uDstLen, char* pSrcBuf, uint32_t uSrcLen, uint32_t uBitDeepth)
|
|
|
{
|
|
|
uint32_t uRet = 0;
|
|
|
@@ -502,7 +492,7 @@ void CLocalMediaPlayEntity::loadDefaultMedia(bool fNewVersion)
|
|
|
|
|
|
curImg.nFileCnt = 4;
|
|
|
for (int i = 0; i < curImg.nFileCnt; ++i) {
|
|
|
- rvc_snprintf(curImg.strFileNames[i], MAX_PATH, "Ad0%s%d.jpg", SPLIT_SLASH_STR, i);
|
|
|
+ _snprintf(curImg.strFileNames[i], MAX_PATH, "Ad0%s%d.jpg", SPLIT_SLASH_STR, i);
|
|
|
}
|
|
|
m_defaultImg.push_back(curImg);
|
|
|
#endif
|
|
|
@@ -518,7 +508,7 @@ void CLocalMediaPlayEntity::loadDefaultMedia(bool fNewVersion)
|
|
|
curImg1.nPlayInterval = 5000;
|
|
|
curImg1.nFileCnt = 4;
|
|
|
for (int i = 0; i < curImg1.nFileCnt; ++i) {
|
|
|
- rvc_snprintf(curImg1.strFileNames[i], MAX_PATH, "Ad0%s%d.jpg", SPLIT_SLASH_STR, i);
|
|
|
+ _snprintf(curImg1.strFileNames[i], MAX_PATH, "Ad0%s%d.jpg", SPLIT_SLASH_STR, i);
|
|
|
}
|
|
|
m_defaultPic.push_back(curImg1);
|
|
|
}
|
|
|
@@ -538,7 +528,7 @@ void CLocalMediaPlayEntity::loadDefaultMedia(bool fNewVersion)
|
|
|
curImg.nFileCnt = 4;
|
|
|
|
|
|
for (int i = 0; i < curImg.nFileCnt; ++i) {
|
|
|
- rvc_snprintf(curImg.strFileNames[i], MAX_PATH, "Ad1%s%d.jpg", SPLIT_SLASH_STR, i);
|
|
|
+ _snprintf(curImg.strFileNames[i], MAX_PATH, "Ad1%s%d.jpg", SPLIT_SLASH_STR, i);
|
|
|
}
|
|
|
m_defaultImg.push_back(curImg);
|
|
|
#endif
|
|
|
@@ -554,7 +544,7 @@ void CLocalMediaPlayEntity::loadDefaultMedia(bool fNewVersion)
|
|
|
curImg1.nPlayInterval = 1000;
|
|
|
curImg1.nFileCnt = 4;
|
|
|
for (int i = 0; i < curImg1.nFileCnt; ++i) {
|
|
|
- rvc_snprintf(curImg1.strFileNames[i], MAX_PATH, "Ad1%s%d.jpg", SPLIT_SLASH_STR, i);
|
|
|
+ _snprintf(curImg1.strFileNames[i], MAX_PATH, "Ad1%s%d.jpg", SPLIT_SLASH_STR, i);
|
|
|
}
|
|
|
m_defaultPic.push_back(curImg1);
|
|
|
}
|
|
|
@@ -1933,16 +1923,11 @@ void CLocalMediaPlayEntity::StartAudio(const char *pAudioNames)
|
|
|
{
|
|
|
if (NULL != pAudioNames) {
|
|
|
char strAudios[MAX_PATH] = { 0 };
|
|
|
- rvc_snprintf(strAudios, MAX_PATH, "%s", pAudioNames);
|
|
|
+ _snprintf(strAudios, MAX_PATH, "%s", pAudioNames);
|
|
|
const char* d = "|";
|
|
|
char* pName = NULL;
|
|
|
char* pdata = NULL;
|
|
|
- //TODO: CrossPlaform [Gifur@2025730]
|
|
|
-#ifdef RVC_OS_WIN
|
|
|
pName = strtok_s(strAudios, d, &pdata);
|
|
|
-#else
|
|
|
- pName = strtok_r(strAudios, d, &pdata);
|
|
|
-#endif
|
|
|
while (pName) {
|
|
|
CSimpleStringA strAudioFileName = pName;
|
|
|
CSimpleStringA strAudioFullPath = m_AudioPath + strAudioFileName;
|
|
|
@@ -1950,12 +1935,7 @@ void CLocalMediaPlayEntity::StartAudio(const char *pAudioNames)
|
|
|
LogWarn(Severity_Low, Error_Debug, LOG_EVT_ADV_AUDIO_NOT_EXIST, CSimpleStringA::Format("audio file %s not exist!", strAudioFullPath.GetData()).GetData());
|
|
|
return;
|
|
|
}
|
|
|
- //TODO: CrossPlaform [Gifur@2025730]
|
|
|
-#ifdef RVC_OS_WIN
|
|
|
pName = strtok_s(NULL, d, &pdata);
|
|
|
-#else
|
|
|
- pName = strtok_r(NULL, d, &pdata);
|
|
|
-#endif
|
|
|
}
|
|
|
}
|
|
|
#ifdef RVC_OS_WIN
|