std::string OMXPlayerAudio::GetPlayerInfo() { std::ostringstream s; s << "aq:" << std::setw(2) << std::min(99,m_messageQueue.GetLevel() + MathUtils::round_int(100.0/8.0*GetCacheTime())) << "%"; s << ", Kb/s:" << std::fixed << std::setprecision(2) << (double)GetAudioBitrate() / 1024.0; return s.str(); }
void CVideoPlayerAudio::UpdatePlayerInfo() { std::ostringstream s; s << "aq:" << std::setw(2) << std::min(99,m_messageQueue.GetLevel()) << "%"; s << ", Kb/s:" << std::fixed << std::setprecision(2) << (double)GetAudioBitrate() / 1024.0; //print the inverse of the resample ratio, since that makes more sense //if the resample ratio is 0.5, then we're playing twice as fast if (m_synctype == SYNC_RESAMPLE) s << ", rr:" << std::fixed << std::setprecision(5) << 1.0 / m_dvdAudio.GetResampleRatio(); s << ", att:" << std::fixed << std::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 = info; } }