s << ", att:" << fixed << setprecision(1) << log(GetCurrentAttenuation()) * 20.0f << " dB";
+ SInfo info;
+ info.info = s.str();
+ info.pts = m_dvdAudio.GetPlayingPts();
+ info.passthrough = m_pAudioCodec && m_pAudioCodec->NeedPassthrough();
+
{ CSingleLock lock(m_info_section);
- m_info = s.str();
+ m_info = info;
}
}
string CDVDPlayerAudio::GetPlayerInfo()
{
CSingleLock lock(m_info_section);
- return m_info;
+ return m_info.info;
}
int CDVDPlayerAudio::GetAudioBitrate()
bool CDVDPlayerAudio::IsPassthrough() const
{
- return m_pAudioCodec && m_pAudioCodec->NeedPassthrough();
+ CSingleLock lock(m_info_section);
+ return m_info.passthrough;
}
CPTSOutputQueue m_ptsOutput;
CPTSInputQueue m_ptsInput;
- double GetCurrentPts() { return m_dvdAudio.GetPlayingPts(); }
+ double GetCurrentPts() { CSingleLock lock(m_info_section); return m_info.pts; }
bool IsStalled() { return m_stalled; }
bool IsPassthrough() const;
double m_maxspeedadjust;
double m_resampleratio; //resample ratio when using SYNC_RESAMPLE, used for the codec info
+ struct SInfo
+ {
+ SInfo()
+ : pts(DVD_NOPTS_VALUE)
+ , passthrough(false)
+ {}
+
+ std::string info;
+ double pts;
+ bool passthrough;
+ };
CCriticalSection m_info_section;
- std::string m_info;
+ SInfo m_info;
};