bool OMXPlayerAudio::OpenStream(CDVDStreamInfo hints) { m_bad_state = false; m_processInfo.ResetAudioCodecInfo(); COMXAudioCodecOMX *codec = new COMXAudioCodecOMX(m_processInfo); if(!codec || !codec->Open(hints)) { CLog::Log(LOGERROR, "Unsupported audio codec"); delete codec; codec = NULL; return false; } if(m_messageQueue.IsInited()) m_messageQueue.Put(new COMXMsgAudioCodecChange(hints, codec), 0); else { OpenStream(hints, codec); m_messageQueue.Init(); CLog::Log(LOGNOTICE, "Creating audio thread"); Create(); } return true; }
bool OMXPlayerAudio::OpenStream(CDVDStreamInfo &hints) { /* if(IsRunning()) CloseStream(false); */ if(!m_DllBcmHost.Load()) return false; COMXAudioCodecOMX *codec = new COMXAudioCodecOMX(); if(!codec || !codec->Open(hints)) { CLog::Log(LOGERROR, "Unsupported audio codec"); delete codec; codec = NULL; return false; } if(m_messageQueue.IsInited()) m_messageQueue.Put(new COMXMsgAudioCodecChange(hints, codec), 0); else { if(!OpenStream(hints, codec)) return false; CLog::Log(LOGNOTICE, "Creating audio thread"); m_messageQueue.Init(); Create(); } /* if(!OpenStream(hints, codec)) return false; CLog::Log(LOGNOTICE, "Creating audio thread"); m_messageQueue.Init(); Create(); */ return true; }