Implement CreateInputSurface CCodec plugin
createInputSurface() will attempt to create an input surface from a list
of services, returning the first success, in the following order:
0 - Hardware Codec2.0
1 - OMX
2 - Software Codec2.0
However, the system property debug.stagefright.c2inputsurface can be
used to mask available services. The k-th bit (counting from 0) of
debug.stagefright.c2inputsurface corresponds to enabling of the
k-indexed service.
The default value of debug.stagefright.c2inputsurface is 6, which means
createInputSurface() will try to create an input surface from the OMX
service first. If it fails, the software Codec2.0 service will be tried
next.
Test: adb shell setprop debug.stagefright.ccodec 3
adb shell setprop debug.stagefright.c2inputsurface 4
adb shell killall mediaserver
adb shell /system/bin/screenrecord --codec-name c2.android.avc.encoder \
/sdcard/screenrecord.mp4
adb pull /sdcard/screenrecord.mp4
Bug: 64121714
Change-Id: I35288442d5fce41738a12bdcb4be32fecfaf6b88
7 files changed