Skip to content

Commit

Permalink
Don't Apple
Browse files Browse the repository at this point in the history
  • Loading branch information
surfzoid committed Oct 20, 2023
1 parent f3b8e35 commit f81096e
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions playm4interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ unsigned int playm4interface::VideoFs(QString fileName)
}
}

#if (defined(_WIN32))
// if (!PlayM4_SetDecodeEngineEx(m_pblocalportnum,HARD_DECODE_ENGINE))
// {
// DisplayError("PlayM4_SetDecodeEngineEx",PlayM4_GetLastError(m_pblocalportnum));
// }
#elif defined(__linux__)// | defined(__APPLE__)

int DecodeEngine = PlayM4_GetDecodeEngine(m_pblocalportnum);
if (!DecodeEngine)
{
Expand All @@ -81,26 +88,20 @@ unsigned int playm4interface::VideoFs(QString fileName)
qDebug() << "Using HARD_DECODE_ENGINE";
}

#if (defined(_WIN32))
// if (!PlayM4_SetDecodeEngineEx(m_pblocalportnum,HARD_DECODE_ENGINE))
// {
// DisplayError("PlayM4_SetDecodeEngineEx",PlayM4_GetLastError(m_pblocalportnum));
// }
#elif defined(__linux__) | defined(__APPLE__)

qDebug() << "Try to set HARD_DECODE_ENGINE";
if (!PlayM4_SetDecodeEngine(m_pblocalportnum,HARD_DECODE_ENGINE))
{
DisplayError("PlayM4_SetDecodeEngine",PlayM4_GetLastError(m_pblocalportnum));
}
#endif

DecodeEngine = PlayM4_GetDecodeEngine(m_pblocalportnum);
if (!DecodeEngine)
{
qDebug() << "Using SOFT_DECODE_ENGINE";
}else{
qDebug() << "Using HARD_DECODE_ENGINE";
}
#endif

//PlayM4_SetRunTimeInfoCallBack(int nPort, void (CALLBACK* RunTimeInfoCBFun)(int nPort, RunTimeInfo* pstRunTimeInfo, void* pUser), void* pUser);
playm4interface::nModule = 1;
Expand Down

0 comments on commit f81096e

Please sign in to comment.