|
@@ -88,6 +88,8 @@ CLocalMediaPlayEntity::CLocalMediaPlayEntity()
|
|
|
memset(m_pPicturePlayer, 0, sizeof(m_pPicturePlayer));
|
|
|
m_uMediaPlayThreadId = 0;
|
|
|
m_badplayflag = true;
|
|
|
+ m_bgetflag = false;
|
|
|
+ m_bgetico = false;
|
|
|
#endif // RVC_OS_WIN
|
|
|
|
|
|
ZeroMemory(&m_mediaParam, sizeof(MediaPlayParam));
|
|
@@ -109,6 +111,8 @@ CLocalMediaPlayEntity::~CLocalMediaPlayEntity()
|
|
|
if (0 == pthread_join(m_scanThreadId, NULL)) {
|
|
|
Dbg("pthread join scanThreadId success.");
|
|
|
}
|
|
|
+ m_bgetflag = false;
|
|
|
+ m_bgetico = false;
|
|
|
|
|
|
#endif // RVC_OS_WIN
|
|
|
}
|
|
@@ -482,11 +486,17 @@ int CLocalMediaPlayEntity::GetMediaPlayerIcoPath(char* strPath, size_t uLen)
|
|
|
int CLocalMediaPlayEntity::GetAudioOutDevName(char* strDev, size_t uLen)
|
|
|
{
|
|
|
int iRet = -1;
|
|
|
- int idatalen = m_strAudioOutDev.GetLength();
|
|
|
- if (uLen > idatalen && idatalen > 0){
|
|
|
- memcpy(strDev, m_strAudioOutDev.GetData(), idatalen);
|
|
|
+ if (false == m_bgetflag) {
|
|
|
+ int idatalen = m_strAudioOutDev.GetLength();
|
|
|
+ if (uLen > idatalen && idatalen > 0) {
|
|
|
+ memcpy(strDev, m_strAudioOutDev.GetData(), idatalen);
|
|
|
+ iRet = 0;
|
|
|
+ m_bgetflag = true;
|
|
|
+ Dbg("%s:%d audio Out Device Name is %s.", __FUNCTION__, __LINE__, strDev);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
iRet = 0;
|
|
|
- Dbg("%s:%d audio Out Device Name is %s.",__FUNCTION__, __LINE__, strDev);
|
|
|
}
|
|
|
|
|
|
return iRet;
|
|
@@ -512,25 +522,32 @@ bool CLocalMediaPlayEntity::GetScanExitFlag()
|
|
|
int CLocalMediaPlayEntity::GetPlayerIcoPath(char* strPath, size_t uLen)
|
|
|
{
|
|
|
int iRet = -1;
|
|
|
- if (NULL == strPath) {
|
|
|
- return iRet;
|
|
|
- }
|
|
|
- CSimpleStringA csBinPath;
|
|
|
- ErrorCodeEnum eErrPath = GetFunction()->GetPath("Bin", csBinPath);
|
|
|
- if (eErrPath != Error_Succeed) {
|
|
|
- Dbg("GetBasePath failed (%d).", eErrPath);
|
|
|
- return iRet;
|
|
|
- }
|
|
|
+ if (false == m_bgetico) {
|
|
|
+ if (NULL == strPath) {
|
|
|
+ return iRet;
|
|
|
+ }
|
|
|
+ CSimpleStringA csBinPath;
|
|
|
+ ErrorCodeEnum eErrPath = GetFunction()->GetPath("Bin", csBinPath);
|
|
|
+ if (eErrPath != Error_Succeed) {
|
|
|
+ Dbg("GetBasePath failed (%d).", eErrPath);
|
|
|
+ return iRet;
|
|
|
+ }
|
|
|
|
|
|
- CSimpleStringA szIcoName("rvc_media_player_64px.bmp");
|
|
|
- szIcoName = csBinPath + SPLIT_SLASH_STR + szIcoName;
|
|
|
- //Dbg("media player ico full path is %s.", szIcoName.GetData());
|
|
|
+ CSimpleStringA szIcoName("rvc_media_player_64px.bmp");
|
|
|
+ szIcoName = csBinPath + SPLIT_SLASH_STR + szIcoName;
|
|
|
+ Dbg("media player ico full path is %s.", szIcoName.GetData());
|
|
|
|
|
|
- if (uLen > szIcoName.GetLength()) {
|
|
|
- memcpy(strPath, szIcoName.GetData(), szIcoName.GetLength());
|
|
|
+ if (uLen > szIcoName.GetLength()) {
|
|
|
+ memcpy(strPath, szIcoName.GetData(), szIcoName.GetLength());
|
|
|
+ iRet = 0;
|
|
|
+ m_bgetico = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
iRet = 0;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
return iRet;
|
|
|
}
|
|
|
|