diff options
-rw-r--r-- | xbmc/Application.cpp | 7 | ||||
-rw-r--r-- | xbmc/Util.cpp | 3 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp | 6 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDCodecs/Video/libstagefrightICS/StageFrightVideo.cpp | 16 | ||||
-rw-r--r-- | xbmc/interfaces/legacy/Player.h | 4 | ||||
-rw-r--r-- | xbmc/linux/OMXClock.cpp | 2 | ||||
-rw-r--r-- | xbmc/settings/Settings.cpp | 7 | ||||
-rw-r--r-- | xbmc/utils/CharsetConverter.cpp | 7 |
8 files changed, 29 insertions, 23 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index 240bbecf4a..7bab9e9c87 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -1723,11 +1723,8 @@ bool CApplication::OnSettingUpdate(CSetting* &setting, const char *oldSettingId, } else if (settingId == "videoplayer.usestagefright") { - if (CAndroidFeatures::GetVersion() >= 19) - { - CSettingBool *usestagefright = (CSettingBool*)setting; - usestagefright->SetValue(false); - } + CSettingBool *usestagefright = (CSettingBool*)setting; + usestagefright->SetValue(false); } #endif diff --git a/xbmc/Util.cpp b/xbmc/Util.cpp index 5a84d9c99a..3209576e4d 100644 --- a/xbmc/Util.cpp +++ b/xbmc/Util.cpp @@ -1154,6 +1154,9 @@ int CUtil::GetMatchingSource(const CStdString& strPath1, VECSOURCES& VECSOURCES, // Check for special protocols CURL checkURL(strPath); + if (StringUtils::StartsWith(strPath, "special://skin/")) + return 1; + // stack:// if (checkURL.GetProtocol() == "stack") strPath.erase(0, 8); // remove the stack protocol diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp index 4faf1bdeaa..134f29b6c4 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp @@ -248,7 +248,8 @@ bool CDVDVideoCodecVDA::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options) { // Nvidia gpu's are all powerful and work the way god intended m_decode_async = true; - m_use_cvBufferRef = true; + // The gods are liars, ignore the sirens for now. + m_use_cvBufferRef = false; } else if (rendervendor.find("intel") != std::string::npos) { @@ -260,7 +261,8 @@ bool CDVDVideoCodecVDA::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options) { // ATI gpu's are borked when using async decode m_decode_async = false; - m_use_cvBufferRef = true; + // They lie here too. + m_use_cvBufferRef = false; } if (!m_use_cvBufferRef) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/libstagefrightICS/StageFrightVideo.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/libstagefrightICS/StageFrightVideo.cpp index 089b3e9003..9ca224519a 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/libstagefrightICS/StageFrightVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/libstagefrightICS/StageFrightVideo.cpp @@ -55,8 +55,6 @@ #define EGL_NATIVE_BUFFER_ANDROID 0x3140 #define EGL_IMAGE_PRESERVED_KHR 0x30D2 -const char *MEDIA_MIMETYPE_VIDEO_WMV = "video/x-ms-wmv"; - using namespace android; static int64_t pts_dtoi(double pts) @@ -430,33 +428,37 @@ bool CStageFrightVideo::Open(CDVDStreamInfo &hints) case CODEC_ID_H264: if (p->m_g_advancedSettings->m_stagefrightConfig.useAVCcodec == 0) return false; - mimetype = MEDIA_MIMETYPE_VIDEO_AVC; + mimetype = "video/avc"; if ( *(char*)hints.extradata == 1 ) p->meta->setData(kKeyAVCC, kTypeAVCC, hints.extradata, hints.extrasize); break; case CODEC_ID_MPEG4: if (p->m_g_advancedSettings->m_stagefrightConfig.useMP4codec == 0) return false; - mimetype = MEDIA_MIMETYPE_VIDEO_MPEG4; + mimetype = "video/mp4v-es"; break; case CODEC_ID_MPEG2VIDEO: if (p->m_g_advancedSettings->m_stagefrightConfig.useMPEG2codec == 0) return false; - mimetype = MEDIA_MIMETYPE_VIDEO_MPEG2; + mimetype = "video/mpeg2"; break; case CODEC_ID_VP3: case CODEC_ID_VP6: case CODEC_ID_VP6F: + if (p->m_g_advancedSettings->m_stagefrightConfig.useVPXcodec == 0) + return false; + mimetype = "video/vp6"; + break; case CODEC_ID_VP8: if (p->m_g_advancedSettings->m_stagefrightConfig.useVPXcodec == 0) return false; - mimetype = MEDIA_MIMETYPE_VIDEO_VPX; + mimetype = "video/x-vnd.on2.vp8"; break; case CODEC_ID_VC1: case CODEC_ID_WMV3: if (p->m_g_advancedSettings->m_stagefrightConfig.useVC1codec == 0) return false; - mimetype = MEDIA_MIMETYPE_VIDEO_WMV; + mimetype = "video/vc1"; break; default: return false; diff --git a/xbmc/interfaces/legacy/Player.h b/xbmc/interfaces/legacy/Player.h index 28e38ed677..ae6c2bc696 100644 --- a/xbmc/interfaces/legacy/Player.h +++ b/xbmc/interfaces/legacy/Player.h @@ -75,11 +75,12 @@ namespace XBMCAddon virtual ~Player(void); /** - * play([item, listitem, windowed]) -- Play this item.\n + * play([item, listitem, windowed, startpos]) -- Play this item.\n * \n * item : [opt] string - filename, url or playlist.\n * listitem : [opt] listitem - used with setInfo() to set different infolabels.\n * windowed : [opt] bool - true=play video windowed, false=play users preference.(default)\n + * startpos : [opt] int - starting position when playing a playlist. Default = -1\n * \n * *Note, If item is not given then the Player will try to play the current item\n * in the current playlist.\n @@ -91,6 +92,7 @@ namespace XBMCAddon * - listitem = xbmcgui.ListItem('Ironman')\n * - listitem.setInfo('video', {'Title': 'Ironman', 'Genre': 'Science Fiction'})\n * - xbmc.Player().play(url, listitem, windowed)\n + * - xbmc.Player().play(playlist, listitem, windowed, startpos)\n */ void play(const PlayParameter& item = Player::defaultPlayParameter, const XBMCAddon::xbmcgui::ListItem* listitem = NULL, bool windowed = false, int startpos = -1); diff --git a/xbmc/linux/OMXClock.cpp b/xbmc/linux/OMXClock.cpp index ef121d9969..ced4f0d989 100644 --- a/xbmc/linux/OMXClock.cpp +++ b/xbmc/linux/OMXClock.cpp @@ -141,7 +141,7 @@ void OMXClock::OMXDeinitialize() if(m_omx_clock.GetComponent() == NULL) return; - m_omx_clock.Deinitialize(); + m_omx_clock.Deinitialize(true); m_omx_speed = DVD_PLAYSPEED_NORMAL; } diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp index 13fd23600a..9c1c1dbb1b 100644 --- a/xbmc/settings/Settings.cpp +++ b/xbmc/settings/Settings.cpp @@ -911,6 +911,9 @@ void CSettings::InitializeConditions() if (CAndroidFeatures::GetVersion() > 15) m_settingsManager->AddCondition("has_mediacodec"); #endif +#ifdef HAS_LIBSTAGEFRIGHT + m_settingsManager->AddCondition("have_libstagefrightdecoder"); +#endif #ifdef HAVE_VIDEOTOOLBOXDECODER m_settingsManager->AddCondition("have_videotoolboxdecoder"); if (g_sysinfo.HasVideoToolBoxDecoder()) @@ -920,10 +923,6 @@ void CSettings::InitializeConditions() if (aml_present()) m_settingsManager->AddCondition("have_amcodec"); #endif -#ifdef HAS_LIBSTAGEFRIGHT - if (CAndroidFeatures::GetVersion() < 19) - m_settingsManager->AddCondition("have_libstagefrightdecoder"); -#endif #ifdef TARGET_DARWIN_IOS_ATV2 if (g_sysinfo.IsAppleTV2()) m_settingsManager->AddCondition("isappletv2"); diff --git a/xbmc/utils/CharsetConverter.cpp b/xbmc/utils/CharsetConverter.cpp index ab26fb4c99..bf8d61d34c 100644 --- a/xbmc/utils/CharsetConverter.cpp +++ b/xbmc/utils/CharsetConverter.cpp @@ -172,9 +172,10 @@ CConverterType::CConverterType(const CConverterType& other) : CCriticalSection() CConverterType::~CConverterType() { - CSingleLock(*this); + CSingleLock lock(*this); if (m_iconv != NO_ICONV) iconv_close(m_iconv); + lock.Leave(); // ensure unlocking before final destruction } @@ -204,7 +205,7 @@ iconv_t CConverterType::GetConverter(CSingleLock& converterLock) void CConverterType::Reset(void) { - CSingleLock(*this); + CSingleLock lock(*this); if (m_iconv != NO_ICONV) { iconv_close(m_iconv); @@ -220,7 +221,7 @@ void CConverterType::Reset(void) void CConverterType::ReinitTo(const std::string& sourceCharset, const std::string& targetCharset, unsigned int targetSingleCharMaxLen /*= 1*/) { - CSingleLock(*this); + CSingleLock lock(*this); if (sourceCharset != m_sourceCharset || targetCharset != m_targetCharset) { if (m_iconv != NO_ICONV) |