aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/cores/VideoPlayer/DVDMessageQueue.cpp6
-rw-r--r--xbmc/cores/VideoPlayer/DVDMessageQueue.h2
-rw-r--r--xbmc/cores/VideoPlayer/VideoPlayerAudio.cpp12
-rw-r--r--xbmc/cores/VideoPlayer/VideoPlayerAudio.h1
-rw-r--r--xbmc/cores/VideoPlayer/VideoPlayerVideo.cpp10
-rw-r--r--xbmc/cores/VideoPlayer/VideoPlayerVideo.h2
6 files changed, 13 insertions, 20 deletions
diff --git a/xbmc/cores/VideoPlayer/DVDMessageQueue.cpp b/xbmc/cores/VideoPlayer/DVDMessageQueue.cpp
index 34886cc8a3..20d1caece6 100644
--- a/xbmc/cores/VideoPlayer/DVDMessageQueue.cpp
+++ b/xbmc/cores/VideoPlayer/DVDMessageQueue.cpp
@@ -333,14 +333,14 @@ int CDVDMessageQueue::GetLevel() const
return level;
}
-int CDVDMessageQueue::GetTimeSize() const
+double CDVDMessageQueue::GetTimeSize() const
{
std::unique_lock<CCriticalSection> lock(m_section);
if (IsDataBased())
- return 0;
+ return 0.0;
else
- return (int)((m_TimeFront - m_TimeBack) / DVD_TIME_BASE);
+ return (m_TimeFront - m_TimeBack) / DVD_TIME_BASE;
}
bool CDVDMessageQueue::IsDataBased() const
diff --git a/xbmc/cores/VideoPlayer/DVDMessageQueue.h b/xbmc/cores/VideoPlayer/DVDMessageQueue.h
index 77342d4ce7..0e745512ac 100644
--- a/xbmc/cores/VideoPlayer/DVDMessageQueue.h
+++ b/xbmc/cores/VideoPlayer/DVDMessageQueue.h
@@ -74,7 +74,7 @@ public:
}
int GetDataSize() const { return m_iDataSize; }
- int GetTimeSize() const;
+ double GetTimeSize() const;
unsigned GetPacketCount(CDVDMsg::Message type);
bool ReceivedAbortRequest() { return m_bAbortRequest; }
void WaitUntilEmpty();
diff --git a/xbmc/cores/VideoPlayer/VideoPlayerAudio.cpp b/xbmc/cores/VideoPlayer/VideoPlayerAudio.cpp
index 91220f92de..6017bf5c26 100644
--- a/xbmc/cores/VideoPlayer/VideoPlayerAudio.cpp
+++ b/xbmc/cores/VideoPlayer/VideoPlayerAudio.cpp
@@ -51,8 +51,7 @@ CVideoPlayerAudio::CVideoPlayerAudio(CDVDClock* pClock,
IDVDStreamPlayerAudio(processInfo),
m_messageQueue("audio"),
m_messageParent(parent),
- m_audioSink(pClock),
- m_messageQueueTimeSize(messageQueueTimeSize)
+ m_audioSink(pClock)
{
m_pClock = pClock;
m_audioClock = 0;
@@ -66,8 +65,8 @@ CVideoPlayerAudio::CVideoPlayerAudio(CDVDClock* pClock,
m_maxspeedadjust = 0.0;
// allows max bitrate of 18 Mbit/s (TrueHD max peak) during m_messageQueueTimeSize seconds
- m_messageQueue.SetMaxDataSize(18 * m_messageQueueTimeSize / 8 * 1024 * 1024);
- m_messageQueue.SetMaxTimeSize(m_messageQueueTimeSize);
+ m_messageQueue.SetMaxDataSize(18 * messageQueueTimeSize / 8 * 1024 * 1024);
+ m_messageQueue.SetMaxTimeSize(messageQueueTimeSize);
m_disconAdjustTimeMs = processInfo.GetMaxPassthroughOffSyncDuration();
}
@@ -201,10 +200,9 @@ void CVideoPlayerAudio::OnStartup()
void CVideoPlayerAudio::UpdatePlayerInfo()
{
- const int level = m_messageQueue.GetLevel();
std::ostringstream s;
- s << "aq:" << std::setw(2) << std::min(99, level);
- s << "% " << std::fixed << std::setprecision(3) << m_messageQueueTimeSize * level / 100.0;
+ s << "aq:" << std::setw(2) << std::min(99, m_messageQueue.GetLevel());
+ s << "% " << std::fixed << std::setprecision(3) << m_messageQueue.GetTimeSize();
s << "s, Kb/s:" << std::fixed << std::setprecision(2) << m_audioStats.GetBitrate() / 1024.0;
// print a/v discontinuity adjustments counter when audio is not resampled (passthrough mode)
diff --git a/xbmc/cores/VideoPlayer/VideoPlayerAudio.h b/xbmc/cores/VideoPlayer/VideoPlayerAudio.h
index 24c394c52c..d52fbd5b70 100644
--- a/xbmc/cores/VideoPlayer/VideoPlayerAudio.h
+++ b/xbmc/cores/VideoPlayer/VideoPlayerAudio.h
@@ -120,6 +120,5 @@ protected:
bool m_displayReset = false;
unsigned int m_disconAdjustTimeMs = 50; // maximum sync-off before adjusting
int m_disconAdjustCounter = 0;
- double m_messageQueueTimeSize{0.0};
};
diff --git a/xbmc/cores/VideoPlayer/VideoPlayerVideo.cpp b/xbmc/cores/VideoPlayer/VideoPlayerVideo.cpp
index 1b22464d49..9020467c88 100644
--- a/xbmc/cores/VideoPlayer/VideoPlayerVideo.cpp
+++ b/xbmc/cores/VideoPlayer/VideoPlayerVideo.cpp
@@ -54,8 +54,7 @@ CVideoPlayerVideo::CVideoPlayerVideo(CDVDClock* pClock,
IDVDStreamPlayerVideo(processInfo),
m_messageQueue("video"),
m_messageParent(parent),
- m_renderManager(renderManager),
- m_messageQueueTimeSize(messageQueueTimeSize)
+ m_renderManager(renderManager)
{
m_pClock = pClock;
m_pOverlayContainer = pOverlayContainer;
@@ -73,7 +72,7 @@ CVideoPlayerVideo::CVideoPlayerVideo(CDVDClock* pClock,
CSettings::SETTING_VIDEOPLAYER_QUEUEDATASIZE);
m_messageQueue.SetMaxDataSize(sizeMB * 1024 * 1024);
- m_messageQueue.SetMaxTimeSize(m_messageQueueTimeSize);
+ m_messageQueue.SetMaxTimeSize(messageQueueTimeSize);
m_iDroppedFrames = 0;
m_fFrameRate = 25;
@@ -956,10 +955,9 @@ CVideoPlayerVideo::EOutputState CVideoPlayerVideo::OutputPicture(const VideoPict
std::string CVideoPlayerVideo::GetPlayerInfo()
{
- const int level = m_processInfo.GetLevelVQ();
std::ostringstream s;
- s << "vq:" << std::setw(2) << std::min(99, level);
- s << "% " << std::fixed << std::setprecision(3) << m_messageQueueTimeSize * level / 100.0;
+ s << "vq:" << std::setw(2) << std::min(99, m_processInfo.GetLevelVQ());
+ s << "% " << std::fixed << std::setprecision(3) << m_messageQueue.GetTimeSize();
s << "s, Mb/s:" << std::fixed << std::setprecision(2)
<< static_cast<double>(GetVideoBitrate()) / (1024.0 * 1024.0);
s << ", fr:" << std::fixed << std::setprecision(3) << m_fFrameRate;
diff --git a/xbmc/cores/VideoPlayer/VideoPlayerVideo.h b/xbmc/cores/VideoPlayer/VideoPlayerVideo.h
index f763334301..298b132659 100644
--- a/xbmc/cores/VideoPlayer/VideoPlayerVideo.h
+++ b/xbmc/cores/VideoPlayer/VideoPlayerVideo.h
@@ -142,6 +142,4 @@ protected:
VideoPicture m_picture;
EOutputState m_outputSate{OUTPUT_NORMAL};
-
- double m_messageQueueTimeSize{0.0};
};