summaryrefslogtreecommitdiffstats
path: root/libvideoeditor
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-10-03 19:40:19 -0700
committerJames Dong <jdong@google.com>2011-10-03 19:40:19 -0700
commit93d4a21f1c73df290e26a21e7a628f28d50bd035 (patch)
tree8cb2a3f0f71ee98cb8190e68625137758ac1f0ad /libvideoeditor
parente62c387164f176b2f2484fe3bd84d8dc115b5d6b (diff)
downloadframeworks_av-93d4a21f1c73df290e26a21e7a628f28d50bd035.zip
frameworks_av-93d4a21f1c73df290e26a21e7a628f28d50bd035.tar.gz
frameworks_av-93d4a21f1c73df290e26a21e7a628f28d50bd035.tar.bz2
Video editor incorrectly rejects videos that could be supported by the HW decoder
Change-Id: I831b32c7ab02fa110865c88bbb02f339889d97a5 related-to-bug: 5407761
Diffstat (limited to 'libvideoeditor')
-rwxr-xr-xlibvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp40
1 files changed, 27 insertions, 13 deletions
diff --git a/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp b/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp
index c5f1a0f..0d5ea64 100755
--- a/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp
+++ b/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp
@@ -657,6 +657,7 @@ void logSupportDecodersAndCapabilities(M4DECODER_VideoDecoders* decoders) {
pDecoder++;
}
}
+
M4OSA_ERR queryVideoDecoderCapabilities
(M4DECODER_VideoDecoders** decoders) {
M4OSA_ERR err = M4NO_ERROR;
@@ -703,12 +704,24 @@ M4OSA_ERR queryVideoDecoderCapabilities
LOGV("NOTHING.\n");
continue;
}
+
+#if 0
+ // FIXME:
+ // We should ignore the software codecs and make IsSoftwareCodec()
+ // part of pubic API from OMXCodec.cpp
+ if (IsSoftwareCodec(results[i].mComponentName.string())) {
+ LOGV("Ignore software codec %s", results[i].mComponentName.string());
+ continue;
+ }
+#endif
+
// Count the supported profiles
int32_t profileNumber = 0;
int32_t profile = -1;
for (size_t j = 0; j < results[i].mProfileLevels.size(); ++j) {
const CodecProfileLevel &profileLevel =
results[i].mProfileLevels[j];
+ // FIXME: assume that the profiles are ordered
if (profileLevel.mProfile != profile) {
profile = profileLevel.mProfile;
profileNumber++;
@@ -716,11 +729,7 @@ M4OSA_ERR queryVideoDecoderCapabilities
}
SAFE_MALLOC(pProfileLevel, VideoProfileLevel,
profileNumber, "VideoProfileLevel");
-
-
-
pOmxComponents->profileLevel = pProfileLevel;
-
pOmxComponents->profileNumber = profileNumber;
// Get the max Level for each profile.
@@ -733,20 +742,25 @@ M4OSA_ERR queryVideoDecoderCapabilities
if (profile == -1 && maxLevel == -1) {
profile = profileLevel.mProfile;
maxLevel = profileLevel.mLevel;
- }
- if (profileLevel.mProfile != profile) {
- // Save the current profile and the max level for this profile.
- LOGV("profile :%d maxLevel;%d", profile, maxLevel);
pProfileLevel->mProfile = profile;
pProfileLevel->mLevel = maxLevel;
+ LOGV("%d profile: %ld, max level: %ld",
+ __LINE__, pProfileLevel->mProfile, pProfileLevel->mLevel);
+ }
+ if (profileLevel.mProfile != profile) {
+ profile = profileLevel.mProfile;
+ maxLevel = profileLevel.mLevel;
profileNumber++;
pProfileLevel++;
- profile = profileLevel.mProfile;
+ pProfileLevel->mProfile = profile;
+ pProfileLevel->mLevel = maxLevel;
+ LOGV("%d profile: %ld, max level: %ld",
+ __LINE__, pProfileLevel->mProfile, pProfileLevel->mLevel);
+ } else if (profileLevel.mLevel > maxLevel) {
maxLevel = profileLevel.mLevel;
- } else {
- if (profileLevel.mLevel > maxLevel) {
- maxLevel = profileLevel.mLevel;
- }
+ pProfileLevel->mLevel = maxLevel;
+ LOGV("%d profile: %ld, max level: %ld",
+ __LINE__, pProfileLevel->mProfile, pProfileLevel->mLevel);
}
}