aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Kaijser <martijn@xbmc.org>2015-06-13 21:44:05 +0200
committerMartijn Kaijser <martijn@xbmc.org>2015-06-13 21:44:05 +0200
commit0e5f0709f3f498ba846b085bb2e78b39ebd544b1 (patch)
treea6734cc9ffe78f9aa80f6f9e408dd85bfd5181be
parent93d12edc06e0a1bd618c08ad025066556a466141 (diff)
parenta2b9a8ae44d1b04c11950fe93976e50a076d0364 (diff)
Merge pull request #7258 from popcornmix/playerpriority
[players] Fix for SetPriority calls being ignored
-rw-r--r--xbmc/cores/dvdplayer/DVDPlayer.cpp16
-rw-r--r--xbmc/cores/dvdplayer/IDVDPlayer.h2
2 files changed, 0 insertions, 18 deletions
diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp
index dd9e10a378..82b5baa538 100644
--- a/xbmc/cores/dvdplayer/DVDPlayer.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp
@@ -3407,8 +3407,6 @@ bool CDVDPlayer::OpenAudioStream(CDVDStreamInfo& hint, bool reset)
/* we are potentially going to be waiting on this */
m_dvdPlayerAudio->SendMessage(new CDVDMsg(CDVDMsg::PLAYER_STARTED), 1);
- /* audio normally won't consume full cpu, so let it have prio */
- m_dvdPlayerAudio->SetPriority(GetPriority()+1);
return true;
}
@@ -3469,20 +3467,6 @@ bool CDVDPlayer::OpenVideoStream(CDVDStreamInfo& hint, bool reset)
/* we are potentially going to be waiting on this */
m_dvdPlayerVideo->SendMessage(new CDVDMsg(CDVDMsg::PLAYER_STARTED), 1);
-#if defined(TARGET_DARWIN)
- // Apple thread scheduler works a little different than Linux. It
- // will favor OS GUI side and can cause DVDPlayerVideo to miss frame
- // updates when the OS gets busy. Apple's recomended method is to
- // elevate time critical threads to SCHED_RR and OSX does this for
- // the CoreAudio audio device handler thread. We do the same for
- // the DVDPlayerVideo thread so it can run to sleep without getting
- // swapped out by a busy OS.
- m_dvdPlayerVideo->SetPriority(GetSchedRRPriority());
-#else
- /* use same priority for video thread as demuxing thread, as */
- /* otherwise demuxer will starve if video consumes the full cpu */
- m_dvdPlayerVideo->SetPriority(GetPriority());
-#endif
return true;
}
diff --git a/xbmc/cores/dvdplayer/IDVDPlayer.h b/xbmc/cores/dvdplayer/IDVDPlayer.h
index 4e3fd69042..560a3f4d11 100644
--- a/xbmc/cores/dvdplayer/IDVDPlayer.h
+++ b/xbmc/cores/dvdplayer/IDVDPlayer.h
@@ -55,7 +55,6 @@ class IDVDStreamPlayerVideo : public IDVDStreamPlayer
public:
~IDVDStreamPlayerVideo() {}
float GetRelativeUsage() { return 0.0f; }
- bool SetPriority(const int iPriority) { return true; }
virtual bool OpenStream(CDVDStreamInfo &hint) = 0;
virtual void CloseStream(bool bWaitForBuffers) = 0;
virtual bool StepFrame() = 0;
@@ -96,7 +95,6 @@ class IDVDStreamPlayerAudio : public IDVDStreamPlayer
public:
~IDVDStreamPlayerAudio() {}
float GetRelativeUsage() { return 0.0f; }
- bool SetPriority(const int iPriority) { return true; }
virtual bool OpenStream(CDVDStreamInfo &hints) = 0;
virtual void CloseStream(bool bWaitForBuffers) = 0;
virtual void SetSpeed(int speed) = 0;