QueryCodecs now returns the names of the software codecs (non-OpenMax) as well.
Change-Id: Ic4cd61f4dd722fb0dda544ffaa5615e87e3a4d40 related-to-bug: 2541647
This commit is contained in:
@@ -370,7 +370,9 @@ int main(int argc, char **argv) {
|
||||
|
||||
const char *kMimeTypes[] = {
|
||||
MEDIA_MIMETYPE_VIDEO_AVC, MEDIA_MIMETYPE_VIDEO_MPEG4,
|
||||
MEDIA_MIMETYPE_VIDEO_H263
|
||||
MEDIA_MIMETYPE_VIDEO_H263, MEDIA_MIMETYPE_AUDIO_AAC,
|
||||
MEDIA_MIMETYPE_AUDIO_AMR_NB, MEDIA_MIMETYPE_AUDIO_AMR_WB,
|
||||
MEDIA_MIMETYPE_AUDIO_MPEG
|
||||
};
|
||||
|
||||
for (size_t k = 0; k < sizeof(kMimeTypes) / sizeof(kMimeTypes[0]);
|
||||
|
||||
@@ -102,19 +102,26 @@ static const CodecInfo kDecoderInfo[] = {
|
||||
{ MEDIA_MIMETYPE_IMAGE_JPEG, "OMX.TI.JPEG.decode" },
|
||||
{ MEDIA_MIMETYPE_AUDIO_MPEG, "OMX.TI.MP3.decode" },
|
||||
{ MEDIA_MIMETYPE_AUDIO_MPEG, "MP3Decoder" },
|
||||
// { MEDIA_MIMETYPE_AUDIO_MPEG, "OMX.PV.mp3dec" },
|
||||
{ MEDIA_MIMETYPE_AUDIO_AMR_NB, "AMRNBDecoder" },
|
||||
// { MEDIA_MIMETYPE_AUDIO_AMR_NB, "OMX.PV.amrdec" },
|
||||
{ MEDIA_MIMETYPE_AUDIO_AMR_WB, "OMX.TI.WBAMR.decode" },
|
||||
{ MEDIA_MIMETYPE_AUDIO_AMR_WB, "AMRWBDecoder" },
|
||||
// { MEDIA_MIMETYPE_AUDIO_AMR_WB, "OMX.PV.amrdec" },
|
||||
{ MEDIA_MIMETYPE_AUDIO_AAC, "OMX.TI.AAC.decode" },
|
||||
{ MEDIA_MIMETYPE_AUDIO_AAC, "AACDecoder" },
|
||||
// { MEDIA_MIMETYPE_AUDIO_AAC, "OMX.PV.aacdec" },
|
||||
{ MEDIA_MIMETYPE_VIDEO_MPEG4, "OMX.qcom.video.decoder.mpeg4" },
|
||||
{ MEDIA_MIMETYPE_VIDEO_MPEG4, "OMX.TI.Video.Decoder" },
|
||||
{ MEDIA_MIMETYPE_VIDEO_MPEG4, "M4vH263Decoder" },
|
||||
// { MEDIA_MIMETYPE_VIDEO_MPEG4, "OMX.PV.mpeg4dec" },
|
||||
{ MEDIA_MIMETYPE_VIDEO_H263, "OMX.qcom.video.decoder.h263" },
|
||||
{ MEDIA_MIMETYPE_VIDEO_H263, "M4vH263Decoder" },
|
||||
// { MEDIA_MIMETYPE_VIDEO_H263, "OMX.PV.h263dec" },
|
||||
{ MEDIA_MIMETYPE_VIDEO_AVC, "OMX.qcom.video.decoder.avc" },
|
||||
{ MEDIA_MIMETYPE_VIDEO_AVC, "OMX.TI.Video.Decoder" },
|
||||
{ MEDIA_MIMETYPE_VIDEO_AVC, "AVCDecoder" },
|
||||
// { MEDIA_MIMETYPE_VIDEO_AVC, "OMX.PV.avcdec" },
|
||||
};
|
||||
|
||||
static const CodecInfo kEncoderInfo[] = {
|
||||
@@ -2962,6 +2969,16 @@ status_t QueryCodecs(
|
||||
return OK;
|
||||
}
|
||||
|
||||
if (strncmp(componentName, "OMX.", 4)) {
|
||||
// Not an OpenMax component but a software codec.
|
||||
|
||||
results->push();
|
||||
CodecCapabilities *caps = &results->editItemAt(results->size() - 1);
|
||||
caps->mComponentName = componentName;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
sp<OMXCodecObserver> observer = new OMXCodecObserver;
|
||||
IOMX::node_id node;
|
||||
status_t err = omx->allocateNode(componentName, observer, &node);
|
||||
|
||||
Reference in New Issue
Block a user