Reland: 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 - Software Codec2.0
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 0, which means
createInputSurface() will not try to create an input surface from any of
the two Codec2.0 services and simply fall back to the OMX service.
Test: adb shell setprop debug.stagefright.ccodec 3
adb shell setprop debug.stagefright.c2inputsurface 2
adb shell killall mediaserver
adb shell /system/bin/screenrecord --codec-name c2.android.avc.encoder \
/sdcard/screenrecord.mp4
adb pull /sdcard/screenrecord.mp4
Test: m cts && cts-tradefed run cts -m CtsCameraTestCases \
-t android.hardware.camera2.cts.CameraDeviceTest
Bug: 64121714
Bug: 111101148
Change-Id: I8332e33444dec4f5d172bd9d8ec3a3e8cf3edb80
7 files changed