summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/MediaCodecList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/MediaCodecList.cpp')
-rw-r--r--media/libstagefright/MediaCodecList.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/media/libstagefright/MediaCodecList.cpp b/media/libstagefright/MediaCodecList.cpp
index 6a6f99d..e212fb8 100644
--- a/media/libstagefright/MediaCodecList.cpp
+++ b/media/libstagefright/MediaCodecList.cpp
@@ -77,6 +77,10 @@ sp<IMediaCodecList> MediaCodecList::getLocalInstance() {
infos.push_back(gCodecList->getCodecInfo(i));
}
}
+ } else {
+ // failure to initialize may be temporary. retry on next call.
+ delete gCodecList;
+ gCodecList = NULL;
}
}
}
@@ -152,7 +156,7 @@ void MediaCodecList::parseTopLevelXMLFile(const char *codecs_xml, bool ignore_er
OMXClient client;
mInitCheck = client.connect();
if (mInitCheck != OK) {
- return;
+ return; // this may fail if IMediaPlayerService is not available.
}
mOMX = client.interface();
parseXMLFile(codecs_xml);
@@ -866,14 +870,16 @@ status_t MediaCodecList::addLimit(const char **attrs) {
return -EINVAL;
}
- // size, blocks, bitrate, frame-rate, blocks-per-second, aspect-ratio: range
+ // size, blocks, bitrate, frame-rate, blocks-per-second, aspect-ratio,
+ // measured-frame-rate, measured-blocks-per-second: range
// quality: range + default + [scale]
// complexity: range + default
bool found;
if (name == "aspect-ratio" || name == "bitrate" || name == "block-count"
|| name == "blocks-per-second" || name == "complexity"
- || name == "frame-rate" || name == "quality" || name == "size") {
+ || name == "frame-rate" || name == "quality" || name == "size"
+ || name == "measured-blocks-per-second" || name == "measured-frame-rate") {
AString min, max;
if (msg->findString("min", &min) && msg->findString("max", &max)) {
min.append("-");