<r>Rewind</r>
<period>SkipNext</period>
<comma>SkipPrevious</comma>
+ <backspace>Fullscreen</backspace>
<return>OSD</return>
<enter>OSD</enter>
<m>OSD</m>
m_lastStreamFormat = dataFormat;
m_lastChLayoutCount = channelLayout.Count();
m_lastSampleRate = sampleRate;
- Start();
}
/* if the stream was not initialized, do it now */
// upmix the ouput to output channels
if ( (!m_isRaw || m_rawDataFormat == AE_FMT_LPCM) && (m_chLayoutCountOutput > channelsInBuffer) )
{
- frames = addsize / m_StreamFormat.m_frameSize;
-
CheckOutputBufferSize((void **)&m_upmixBuffer, &m_upmixBufferSize, frames * m_chLayoutCountOutput * sizeof(float));
Upmix(adddata, channelsInBuffer, m_upmixBuffer, m_chLayoutCountOutput, frames, m_OutputFormat.m_dataFormat);
adddata = m_upmixBuffer;
#include "threads/SingleLock.h"
using namespace XFILE;
using namespace std;
+#include <limits.h>
#include <nfsc/libnfs-raw-mount.h>
#include <nfsc/libnfs-raw-nfs.h>
CLog::Log(LOGERROR, "CD3DEffect::CreateEffect(): %s", error.c_str());
}
else
- CLog::Log(LOGERROR, "CD3DEffect::CreateEffect(): call to D3DXCreateEffect() failed with %l", hr);
+ CLog::Log(LOGERROR, "CD3DEffect::CreateEffect(): call to D3DXCreateEffect() failed with %" PRId32, hr);
return false;
}
break;
case CONTENT_MUSICVIDEOS:
{
- AddBool(1,20346,&m_bScanRecursive, m_bShowScanSettings);
- AddBool(2,20330,&m_bUseDirNames, m_bShowScanSettings);
- AddBool(3,20346,&m_bScanRecursive, m_bShowScanSettings && ((m_bUseDirNames && !m_bSingleItem) || !m_bUseDirNames));
- AddBool(4,20383,&m_bSingleItem, m_bShowScanSettings && (m_bUseDirNames && !m_bScanRecursive));
- AddBool(5,20432,&m_bNoUpdate, m_bShowScanSettings);
+ AddBool(1,20330,&m_bUseDirNames, m_bShowScanSettings);
+ AddBool(2,20346,&m_bScanRecursive, m_bShowScanSettings && ((m_bUseDirNames && !m_bSingleItem) || !m_bUseDirNames));
+ AddBool(3,20383,&m_bSingleItem, m_bShowScanSettings && (m_bUseDirNames && !m_bScanRecursive));
+ AddBool(4,20432,&m_bNoUpdate, m_bShowScanSettings);
}
break;
case CONTENT_ALBUMS:
{
CGUISpinControlEx *pControl = (CGUISpinControlEx *)GetControl(pSettingControl->GetID());
#if defined(TARGET_DARWIN)
- g_guiSettings.SetString("audiooutput.audiodevice", pControl->GetCurrentLabel());
+ // save the sinkname - since we don't have sinks on osx
+ // we need to get the fitting sinkname for the device label from the
+ // factory
+ std::string label2sink = pControl->GetCurrentLabel();
+ CAEFactory::VerifyOutputDevice(label2sink, false);
+ g_guiSettings.SetString("audiooutput.audiodevice", label2sink.c_str());
#else
g_guiSettings.SetString("audiooutput.audiodevice", m_AnalogAudioSinkMap[pControl->GetCurrentLabel()]);
#endif
{
if (m_jobQueue[priority].size() && m_processing.size() < GetMaxWorkers(CJob::PRIORITY(priority)))
{
- CWorkItem job = m_jobQueue[priority].front();
-
// skip adding any paused types
- if (priority <= CJob::PRIORITY_LOW)
- {
- std::vector<std::string>::iterator i = find(m_pausedTypes.begin(), m_pausedTypes.end(), job.m_job->GetType());
- if (i != m_pausedTypes.end())
- return NULL;
- }
+ if (!SkipPausedJobs((CJob::PRIORITY)priority))
+ return NULL;
+ // pop the job off the queue
+ CWorkItem job = m_jobQueue[priority].front();
m_jobQueue[priority].pop_front();
+
// add to the processing vector
m_processing.push_back(job);
job.m_job->m_callback = this;
return (i != m_pausedTypes.end());
}
+bool CJobManager::SkipPausedJobs(CJob::PRIORITY priority)
+{
+ if (priority > CJob::PRIORITY_LOW)
+ return true;
+
+ // find the first unpaused job
+ JobQueue::iterator first_job = m_jobQueue[priority].begin();
+ for (; first_job != m_jobQueue[priority].end(); ++first_job)
+ {
+ std::vector<std::string>::iterator i = find(m_pausedTypes.begin(), m_pausedTypes.end(), first_job->m_job->GetType());
+ if (i == m_pausedTypes.end())
+ break; // found a job that can be performed
+ }
+ if (first_job == m_jobQueue[priority].end())
+ return false; // no jobs ready to go
+
+ // shunt all the paused ones to the back of the queue
+ for (JobQueue::iterator i = m_jobQueue[priority].begin(); i != first_job; i++)
+ {
+ m_jobQueue[priority].push_back(*i);
+ m_jobQueue[priority].pop_front();
+ }
+ return true;
+}
+
int CJobManager::IsProcessing(const std::string &pausedType)
{
int jobsMatched = 0;
void RemoveWorker(const CJobWorker *worker);
unsigned int GetMaxWorkers(CJob::PRIORITY priority) const;
+ /*! \brief skips over any paused jobs of given priority.
+ Moves any paused jobs at the front of the queue to the back of the
+ queue, allowing unpaused jobs to continue processing.
+ \param priority the priority queue to consider.
+ \return true if an unpaused job is available, false if no unpaused jobs are available.
+ */
+ bool SkipPausedJobs(CJob::PRIORITY priority);
+
unsigned int m_jobCounter;
typedef std::deque<CWorkItem> JobQueue;