Android Stagefright set codec manually without IOmxStore

151 views
Skip to first unread message

MK

unread,
Apr 18, 2021, 3:03:41 PM4/18/21
to android-platform

Can somebody help with setting a codec, for example for MP4 (video/avc) without IOmxStore service

Converting this

https://android.googlesource.com/platform/frameworks/av/+/refs/tags/android-9.0.0_r20/media/libstagefright/OmxInfoBuilder.cpp#92

To Setting the writer object to one codec i.e MP4 (video/avc) manually.

Tried this, but I don't t know C++, Media framework classes/interfaces that well and the code above

My attempt (pseudo code) :

status_t OmxInfoBuilder::buildMediaCodecList(MediaCodecListWriter* writer) { std::unique_ptr<MediaCodecInfoWriter> infoWriter = writer->addMediaCodecInfo(); infoWriter->setName("c2.android.aac.decoder"); infoWriter->setOwner("default"); infoWriter->addMediaType("audio/mp4a-latm"); infoWriter->setAttributes(attrs); infoWriter->setRank(rank); return OK; }

Help would be greatly appreciated, i.e what objects I need to set.

Thanks, 
Reply all
Reply to author
Forward
0 new messages