bool OMXClock::OMXStateExecute(bool lock /* = true */) { if(m_omx_clock.GetComponent() == NULL) return false; if(lock) Lock(); OMX_ERRORTYPE omx_err = OMX_ErrorNone; if(m_omx_clock.GetState() != OMX_StateExecuting) { OMXStateIdle(false); omx_err = m_omx_clock.SetStateForComponent(OMX_StateExecuting); if (omx_err != OMX_ErrorNone) { CLog::Log(LOGERROR, "OMXClock::StateExecute m_omx_clock.SetStateForComponent\n"); if(lock) UnLock(); return false; } } m_last_media_time = 0.0f; if(lock) UnLock(); return true; }
bool OMXClock::OMXStateExecute(bool lock /* = true */) { if(m_omx_clock.GetComponent() == NULL) return false; if(lock) Lock(); OMX_ERRORTYPE omx_err = OMX_ErrorNone; if(m_omx_clock.GetState() != OMX_StateExecuting) { OMXStateIdle(false); omx_err = m_omx_clock.SetStateForComponent(OMX_StateExecuting); if (omx_err != OMX_ErrorNone) { CLog::Log(LOGERROR, "OMXClock::StateExecute m_omx_clock.SetStateForComponent\n"); if(lock) UnLock(); return false; } } /* if(m_has_audio) { omx_err = m_omx_clock.EnablePort(m_omx_clock.GetInputPort(), true); if(omx_err != OMX_ErrorNone) { CLog::Log(LOGERROR, "OMXClock::StateExecute - Error enable port %d on component %s omx_err(0x%08x)", m_omx_clock.GetInputPort(), m_omx_clock.GetName().c_str(), (int)omx_err); } } if(m_has_video) { omx_err = m_omx_clock.EnablePort(m_omx_clock.GetInputPort() + 1, true); if(omx_err != OMX_ErrorNone) { CLog::Log(LOGERROR, "OMXClock::StateExecute - Error enable port %d on component %s omx_err(0x%08x)", m_omx_clock.GetInputPort(), m_omx_clock.GetName().c_str(), (int)omx_err); } } OMX_TIME_CONFIG_CLOCKSTATETYPE clock; OMX_INIT_STRUCTURE(clock); clock.eState = OMX_TIME_ClockStateWaitingForStartTime; clock.nStartTime = ToOMXTime(0LL); clock.nOffset = ToOMXTime(0LL); clock.nWaitMask = 0; omx_err = m_omx_clock.SetConfig(OMX_IndexConfigTimeClockState, &clock); if(omx_err != OMX_ErrorNone) { CLog::Log(LOGERROR, "OMXClock::OMXStateExecute error setting OMX_IndexConfigTimeClockState\n"); } */ //OMXStart(lock); if(lock) UnLock(); return true; }