aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris "Koying" Browet <cbro@semperpax.com>2013-11-25 12:47:40 +0100
committerChris "Koying" Browet <cbro@semperpax.com>2013-11-26 09:27:02 +0100
commit2dfa2ec3ab9e6450201bddaaf81e3b7350088379 (patch)
tree2303b25aab47a61a5a7a733303142b3670421ac9
parent32d14df330ac8a2a2b1941eab056ca188ade0481 (diff)
FIX: [stagefright] fixup kitkat; remove hardcoded api limitation
-rw-r--r--xbmc/Application.cpp7
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/libstagefrightICS/StageFrightVideo.cpp16
-rw-r--r--xbmc/settings/Settings.cpp7
3 files changed, 14 insertions, 16 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/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/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");