summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/ACodec.cpp
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-11-25 16:54:19 -0800
committerSteve Kondik <steve@cyngn.com>2015-11-25 16:54:19 -0800
commit17c160c29793a049c1af12ac88a0921a0db62234 (patch)
treeb66850643cd0509e369f1f81f603963cfa5df877 /media/libstagefright/ACodec.cpp
parent92d5d4863030d35117c43104fdf8e4c38af90ff7 (diff)
downloadframeworks_av-17c160c29793a049c1af12ac88a0921a0db62234.zip
frameworks_av-17c160c29793a049c1af12ac88a0921a0db62234.tar.gz
frameworks_av-17c160c29793a049c1af12ac88a0921a0db62234.tar.bz2
stagefright: Support hardware codecs with FFMPEG extractor
* Quite often we'll be using our custom extractor to handle container formats which aren't supported by any other means, but the codecs used inside the container are hardware supported. * For QC specifically we need to send a few magical incantations, so add support for this. Software codecs will be used if hardware support is unavailable. Change-Id: I917b674142fdab0b009e066e9511648c2695ec4b
Diffstat (limited to 'media/libstagefright/ACodec.cpp')
-rw-r--r--media/libstagefright/ACodec.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 9245c53..6c4fd76 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -1603,11 +1603,7 @@ status_t ACodec::setComponentRole(
}
if (i == kNumMimeToRole) {
- status_t err = ERROR_UNSUPPORTED;
- if (!strncmp(mComponentName.c_str(), "OMX.ffmpeg.", 11)) {
- err = FFMPEGSoftCodec::setSupportedRole(mOMX, mNode, isEncoder, mime);
- }
- return err;
+ return FFMPEGSoftCodec::setSupportedRole(mOMX, mNode, isEncoder, mime);
}
const char *role =
@@ -2930,10 +2926,9 @@ status_t ACodec::setupVideoDecoder(
status_t err = GetVideoCodingTypeFromMime(mime, &compressionFormat);
if (err != OK) {
- if (!strncmp(mComponentName.c_str(), "OMX.ffmpeg.", 11)) {
- err = FFMPEGSoftCodec::setVideoFormat(
- msg, mime, mOMX, mNode, mIsEncoder, &compressionFormat);
- }
+ err = FFMPEGSoftCodec::setVideoFormat(
+ msg, mime, mOMX, mNode, mIsEncoder, &compressionFormat,
+ mComponentName.c_str());
if (err != OK) {
return err;
}
@@ -3086,10 +3081,9 @@ status_t ACodec::setupVideoEncoder(const char *mime, const sp<AMessage> &msg) {
err = GetVideoCodingTypeFromMime(mime, &compressionFormat);
if (err != OK) {
- if (!strncmp(mComponentName.c_str(), "OMX.ffmpeg.", 11)) {
- err = FFMPEGSoftCodec::setVideoFormat(
- msg, mime, mOMX, mNode, mIsEncoder, &compressionFormat);
- }
+ err = FFMPEGSoftCodec::setVideoFormat(
+ msg, mime, mOMX, mNode, mIsEncoder, &compressionFormat,
+ mComponentName.c_str());
if (err != OK) {
ALOGE("Not a supported video mime type: %s", mime);
return err;