diff options
-rw-r--r-- | xbmc/cores/AudioEngine/AEResampleFactory.cpp | 4 | ||||
-rw-r--r-- | xbmc/cores/AudioEngine/AEResampleFactory.h | 11 | ||||
-rw-r--r-- | xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp | 2 | ||||
-rw-r--r-- | xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp | 2 | ||||
-rw-r--r-- | xbmc/cores/AudioEngine/Interfaces/AEStream.h | 3 | ||||
-rw-r--r-- | xbmc/cores/omxplayer/OMXImage.cpp | 2 | ||||
-rw-r--r-- | xbmc/video/VideoDatabase.cpp | 3 |
7 files changed, 19 insertions, 8 deletions
diff --git a/xbmc/cores/AudioEngine/AEResampleFactory.cpp b/xbmc/cores/AudioEngine/AEResampleFactory.cpp index c24d9b0a59..1be46d07aa 100644 --- a/xbmc/cores/AudioEngine/AEResampleFactory.cpp +++ b/xbmc/cores/AudioEngine/AEResampleFactory.cpp @@ -28,10 +28,10 @@ namespace ActiveAE { -IAEResample *CAEResampleFactory::Create() +IAEResample *CAEResampleFactory::Create(uint32_t flags /* = 0 */) { #if defined(TARGET_RASPBERRY_PI) - if (CSettings::Get().GetInt("audiooutput.processquality") == AE_QUALITY_GPU) + if (!(flags & AERESAMPLEFACTORY_QUICK_RESAMPLE) && CSettings::Get().GetInt("audiooutput.processquality") == AE_QUALITY_GPU) return new CActiveAEResamplePi(); #endif return new CActiveAEResampleFFMPEG(); diff --git a/xbmc/cores/AudioEngine/AEResampleFactory.h b/xbmc/cores/AudioEngine/AEResampleFactory.h index 10b551e126..6fae108898 100644 --- a/xbmc/cores/AudioEngine/AEResampleFactory.h +++ b/xbmc/cores/AudioEngine/AEResampleFactory.h @@ -26,10 +26,19 @@ class IAEResample; namespace ActiveAE { +/** + * Bit options to pass to CAEResampleFactory::Create + */ +enum AEResampleFactoryOptions +{ + /* This is a quick resample job (e.g. resample a single noise packet) and may not be worth using GPU acceleration */ + AERESAMPLEFACTORY_QUICK_RESAMPLE = 0x01 +}; + class CAEResampleFactory { public: - static IAEResample *Create(); + static IAEResample *Create(uint32_t flags = 0U); }; } diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp index 6ea39099db..7c68e1ca6f 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp @@ -2684,7 +2684,7 @@ bool CActiveAE::ResampleSound(CActiveAESound *sound) dst_config.bits_per_sample = CAEUtil::DataFormatToUsedBits(m_internalFormat.m_dataFormat); dst_config.dither_bits = CAEUtil::DataFormatToDitherBits(m_internalFormat.m_dataFormat); - IAEResample *resampler = CAEResampleFactory::Create(); + IAEResample *resampler = CAEResampleFactory::Create(AERESAMPLEFACTORY_QUICK_RESAMPLE); resampler->Init(dst_config.channel_layout, dst_config.channels, dst_config.sample_rate, diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp index f54c86e772..592c6e4664 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp @@ -895,7 +895,7 @@ void CActiveAESink::GenerateNoise() } SampleConfig config = m_sampleOfSilence.pkt->config; - IAEResample *resampler = CAEResampleFactory::Create(); + IAEResample *resampler = CAEResampleFactory::Create(AERESAMPLEFACTORY_QUICK_RESAMPLE); resampler->Init(config.channel_layout, config.channels, config.sample_rate, diff --git a/xbmc/cores/AudioEngine/Interfaces/AEStream.h b/xbmc/cores/AudioEngine/Interfaces/AEStream.h index f7c50b7c8c..ee2fff11e8 100644 --- a/xbmc/cores/AudioEngine/Interfaces/AEStream.h +++ b/xbmc/cores/AudioEngine/Interfaces/AEStream.h @@ -26,7 +26,8 @@ /** * Bit options to pass to IAE::GetStream */ -enum AEStreamOptions { +enum AEStreamOptions +{ AESTREAM_FORCE_RESAMPLE = 0x01, /* force resample even if rates match */ AESTREAM_PAUSED = 0x02, /* create the stream paused */ AESTREAM_AUTOSTART = 0x04 /* autostart the stream when enough data is buffered */ diff --git a/xbmc/cores/omxplayer/OMXImage.cpp b/xbmc/cores/omxplayer/OMXImage.cpp index d5d94efc2e..161ec5a0ce 100644 --- a/xbmc/cores/omxplayer/OMXImage.cpp +++ b/xbmc/cores/omxplayer/OMXImage.cpp @@ -2250,7 +2250,7 @@ bool COMXTexture::Decode(const uint8_t *demuxer_content, unsigned demuxer_bytes, return false; } - omx_err = m_omx_egl_render.WaitForOutputDone(1000); + omx_err = m_omx_egl_render.WaitForOutputDone(2000); if (omx_err != OMX_ErrorNone) { CLog::Log(LOGERROR, "%s::%s m_omx_egl_render.WaitForOutputDone result(0x%x)\n", CLASSNAME, __func__, omx_err); diff --git a/xbmc/video/VideoDatabase.cpp b/xbmc/video/VideoDatabase.cpp index af86d5b4b4..462541249b 100644 --- a/xbmc/video/VideoDatabase.cpp +++ b/xbmc/video/VideoDatabase.cpp @@ -3519,6 +3519,7 @@ CVideoInfoTag CVideoDatabase::GetDetailsForTvShow(const dbiplus::sql_record* con details.m_parentPathID = record->at(VIDEODB_DETAILS_TVSHOW_PARENTPATHID).get_asInt(); details.m_dateAdded.SetFromDBDateTime(record->at(VIDEODB_DETAILS_TVSHOW_DATEADDED).get_asString()); details.m_lastPlayed.SetFromDBDateTime(record->at(VIDEODB_DETAILS_TVSHOW_LASTPLAYED).get_asString()); + details.m_iSeason = record->at(VIDEODB_DETAILS_TVSHOW_NUM_SEASONS).get_asInt(); details.m_iEpisode = record->at(VIDEODB_DETAILS_TVSHOW_NUM_EPISODES).get_asInt(); details.m_playCount = record->at(VIDEODB_DETAILS_TVSHOW_NUM_WATCHED).get_asInt(); details.m_strShowTitle = details.m_strTitle; @@ -3539,7 +3540,7 @@ CVideoInfoTag CVideoDatabase::GetDetailsForTvShow(const dbiplus::sql_record* con if (item != NULL) { item->m_dateTime = details.m_premiered; - item->SetProperty("totalseasons", record->at(VIDEODB_DETAILS_TVSHOW_NUM_SEASONS).get_asInt()); + item->SetProperty("totalseasons", details.m_iSeason); item->SetProperty("totalepisodes", details.m_iEpisode); item->SetProperty("numepisodes", details.m_iEpisode); // will be changed later to reflect watchmode setting item->SetProperty("watchedepisodes", details.m_playCount); |