Allow creation of input surface in CCodec

Currently, an input surface to an encoder is created in the codec
process, but the queue operation has to be issued from the application
process. This CL allows an input surface to be created in the
application process, hence reducing the number of IPCs issued per frame.
This option can be chosen by setting "debug.stagefright.c2inputsurface"
to -1. (If the property is not set, it defaults to 0, which picks the
current behavior.)

Test: adb shell setprop debug.stagefright.c2inputsurface -1
Then, record a video.

Bug: 131800183
Bug: 134017277

Change-Id: Idbf2ba87689e1e876a215850aa0260539183a4ee
diff --git a/media/codec2/hidl/client/client.cpp b/media/codec2/hidl/client/client.cpp
index 2b417a6..5ed54f1 100644
--- a/media/codec2/hidl/client/client.cpp
+++ b/media/codec2/hidl/client/client.cpp
@@ -959,9 +959,9 @@
 
 std::shared_ptr<Codec2Client::InputSurface> Codec2Client::CreateInputSurface(
         char const* serviceName) {
-    uint32_t inputSurfaceSetting = ::android::base::GetUintProperty(
-            "debug.stagefright.c2inputsurface", uint32_t(0));
-    if (inputSurfaceSetting == 0) {
+    int32_t inputSurfaceSetting = ::android::base::GetIntProperty(
+            "debug.stagefright.c2inputsurface", int32_t(0));
+    if (inputSurfaceSetting <= 0) {
         return nullptr;
     }
     size_t index = GetServiceNames().size();