Recently toss a bit of soft encoder, the information on the Internet is very little, tread on the pit to remember
-
Look for a enc code from under Frameworks/media/libstagefright/codecs.
Nothing is inherited from the simplesoftomxcomponent, and then realize Onfill what, their own encoder is here to achieve, a better understanding.
-
SoftOMXPlugin.cpp Register this encoder, OMX.google.xxx.encoder, just follow the above.
-
Online said only need the above two steps, but actually in my this still can't run up, had to add the log to keep up with
ACodec.cpp
There is such a function onallocatecomponent, look at their own definition of the soft or hard-coded, add a mark flags = omxcodec::ksoftwarecodecsonly;
Setvideoportformattype here also to see, there may be colorformat and format on the need for special handling skip over
Omxcodec.app
There is also an array of mime-to-codec, the effect is not carefully read, in case of the addition of
-
So a coder can run, and finally sign up at/etc/media_codecs.xml.
This article is from the "Wo" blog, please be sure to keep this source http://2613040.blog.51cto.com/2603040/1922161
Android Custom codec record