Log pixel format metric for decoders and non-surface mode encoders.
Test: manual
Bug: 270518245
Merged-In: I0d3fabcca632d974ecd7d86305b3dfef4eee895f
Change-Id: I0d3fabcca632d974ecd7d86305b3dfef4eee895f
diff --git a/services/mediametrics/statsd_codec.cpp b/services/mediametrics/statsd_codec.cpp
index ea76bcd..83b30f3 100644
--- a/services/mediametrics/statsd_codec.cpp
+++ b/services/mediametrics/statsd_codec.cpp
@@ -654,6 +654,16 @@
}
AStatsEvent_writeInt32(event, componentColorFormat);
+ uid_t app_uid = item->getUid();
+ metrics_proto.set_caller_uid(app_uid);
+ AStatsEvent_writeInt32(event, app_uid);
+
+ int64_t pixelFormat = -1;
+ if (item->getInt64("android.media.mediacodec.pixel-format", &pixelFormat)) {
+ metrics_proto.set_pixel_format(pixelFormat);
+ }
+ AStatsEvent_writeInt64(event, pixelFormat);
+
int64_t firstRenderTimeUs = -1;
item->getInt64("android.media.mediacodec.first-render-time-us", &firstRenderTimeUs);
int64_t framesReleased = -1;