Codec2Client: Reduce logging
Some non-verbose log messages are less useful now that Codec2 has
stabilized.
Test: make cts -j123 && cts-tradefed run cts-dev -m \
CtsMediaTestCases --compatibility:module-arg \
CtsMediaTestCases:include-annotation:\
android.platform.test.annotations.RequiresDevice
Bug: 139684703
Change-Id: I661260bc3028d057e6809f29a781c6a89f1f06f6
diff --git a/media/codec2/hidl/client/client.cpp b/media/codec2/hidl/client/client.cpp
index 199a99c..bb02914 100644
--- a/media/codec2/hidl/client/client.cpp
+++ b/media/codec2/hidl/client/client.cpp
@@ -615,8 +615,13 @@
<< ") -- transaction failed.";
return C2_TRANSACTION_FAILED;
} else if (status != C2_OK) {
- LOG(ERROR) << "createComponent(" << name.c_str()
- << ") -- call failed: " << status << ".";
+ if (status == C2_NOT_FOUND) {
+ LOG(VERBOSE) << "createComponent(" << name.c_str()
+ << ") -- component not found.";
+ } else {
+ LOG(ERROR) << "createComponent(" << name.c_str()
+ << ") -- call failed: " << status << ".";
+ }
return status;
} else if (!*component) {
LOG(ERROR) << "createComponent(" << name.c_str()
@@ -655,8 +660,13 @@
<< ") -- transaction failed.";
return C2_TRANSACTION_FAILED;
} else if (status != C2_OK) {
- LOG(ERROR) << "createComponent(" << name.c_str()
- << ") -- call failed: " << status << ".";
+ if (status == C2_NOT_FOUND) {
+ LOG(VERBOSE) << "createInterface(" << name.c_str()
+ << ") -- component not found.";
+ } else {
+ LOG(ERROR) << "createInterface(" << name.c_str()
+ << ") -- call failed: " << status << ".";
+ }
return status;
}
@@ -869,11 +879,11 @@
std::shared_ptr<Codec2Client> Codec2Client::_CreateFromIndex(size_t index) {
std::string const& name = GetServiceNames()[index];
- LOG(INFO) << "Creating a Codec2 client to service \"" << name << "\"";
+ LOG(VERBOSE) << "Creating a Codec2 client to service \"" << name << "\"";
sp<Base> baseStore = Base::getService(name);
CHECK(baseStore) << "Codec2 service \"" << name << "\""
" inaccessible for unknown reasons.";
- LOG(INFO) << "Client to Codec2 service \"" << name << "\" created";
+ LOG(VERBOSE) << "Client to Codec2 service \"" << name << "\" created";
return std::make_shared<Codec2Client>(baseStore, index);
}