Add TracePacket field for camera frame events.
These packets will be sent approximately one per camera frame.
Empirically we anticipate these messages to be approximately 8.6KB, so
the total data rate looks like:
8.6KB * 30 fps = 258 KB/s while the camera session is active
8.6KB * 60 fps = 516 KB/s while the camera session is active
Additional optimizations around sending packets for only interesting
frames can reduce the bandwidth even further.
Bug: 202848252
Test: Builds
Change-Id: Ic2b6518c576909edad1c39f2dce094727ae22d0b
diff --git a/Android.bp b/Android.bp
index c896db0..fbf805e 100644
--- a/Android.bp
+++ b/Android.bp
@@ -3779,6 +3779,7 @@
name: "perfetto_protos_perfetto_trace_android_cpp_gen",
srcs: [
"protos/perfetto/trace/android/android_log.proto",
+ "protos/perfetto/trace/android/camera_event.proto",
"protos/perfetto/trace/android/frame_timeline_event.proto",
"protos/perfetto/trace/android/gpu_mem_event.proto",
"protos/perfetto/trace/android/graphics_frame_event.proto",
@@ -3792,6 +3793,7 @@
cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --plugin=protoc-gen-plugin=$(location perfetto_src_protozero_protoc_plugin_cppgen_plugin) --plugin_out=wrapper_namespace=gen:$(genDir)/external/perfetto/ $(in)",
out: [
"external/perfetto/protos/perfetto/trace/android/android_log.gen.cc",
+ "external/perfetto/protos/perfetto/trace/android/camera_event.gen.cc",
"external/perfetto/protos/perfetto/trace/android/frame_timeline_event.gen.cc",
"external/perfetto/protos/perfetto/trace/android/gpu_mem_event.gen.cc",
"external/perfetto/protos/perfetto/trace/android/graphics_frame_event.gen.cc",
@@ -3805,6 +3807,7 @@
name: "perfetto_protos_perfetto_trace_android_cpp_gen_headers",
srcs: [
"protos/perfetto/trace/android/android_log.proto",
+ "protos/perfetto/trace/android/camera_event.proto",
"protos/perfetto/trace/android/frame_timeline_event.proto",
"protos/perfetto/trace/android/gpu_mem_event.proto",
"protos/perfetto/trace/android/graphics_frame_event.proto",
@@ -3818,6 +3821,7 @@
cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --plugin=protoc-gen-plugin=$(location perfetto_src_protozero_protoc_plugin_cppgen_plugin) --plugin_out=wrapper_namespace=gen:$(genDir)/external/perfetto/ $(in)",
out: [
"external/perfetto/protos/perfetto/trace/android/android_log.gen.h",
+ "external/perfetto/protos/perfetto/trace/android/camera_event.gen.h",
"external/perfetto/protos/perfetto/trace/android/frame_timeline_event.gen.h",
"external/perfetto/protos/perfetto/trace/android/gpu_mem_event.gen.h",
"external/perfetto/protos/perfetto/trace/android/graphics_frame_event.gen.h",
@@ -3835,6 +3839,7 @@
name: "perfetto_protos_perfetto_trace_android_lite_gen",
srcs: [
"protos/perfetto/trace/android/android_log.proto",
+ "protos/perfetto/trace/android/camera_event.proto",
"protos/perfetto/trace/android/frame_timeline_event.proto",
"protos/perfetto/trace/android/gpu_mem_event.proto",
"protos/perfetto/trace/android/graphics_frame_event.proto",
@@ -3847,6 +3852,7 @@
cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --cpp_out=lite=true:$(genDir)/external/perfetto/ $(in)",
out: [
"external/perfetto/protos/perfetto/trace/android/android_log.pb.cc",
+ "external/perfetto/protos/perfetto/trace/android/camera_event.pb.cc",
"external/perfetto/protos/perfetto/trace/android/frame_timeline_event.pb.cc",
"external/perfetto/protos/perfetto/trace/android/gpu_mem_event.pb.cc",
"external/perfetto/protos/perfetto/trace/android/graphics_frame_event.pb.cc",
@@ -3860,6 +3866,7 @@
name: "perfetto_protos_perfetto_trace_android_lite_gen_headers",
srcs: [
"protos/perfetto/trace/android/android_log.proto",
+ "protos/perfetto/trace/android/camera_event.proto",
"protos/perfetto/trace/android/frame_timeline_event.proto",
"protos/perfetto/trace/android/gpu_mem_event.proto",
"protos/perfetto/trace/android/graphics_frame_event.proto",
@@ -3872,6 +3879,7 @@
cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --cpp_out=lite=true:$(genDir)/external/perfetto/ $(in)",
out: [
"external/perfetto/protos/perfetto/trace/android/android_log.pb.h",
+ "external/perfetto/protos/perfetto/trace/android/camera_event.pb.h",
"external/perfetto/protos/perfetto/trace/android/frame_timeline_event.pb.h",
"external/perfetto/protos/perfetto/trace/android/gpu_mem_event.pb.h",
"external/perfetto/protos/perfetto/trace/android/graphics_frame_event.pb.h",
@@ -3889,6 +3897,7 @@
name: "perfetto_protos_perfetto_trace_android_zero_gen",
srcs: [
"protos/perfetto/trace/android/android_log.proto",
+ "protos/perfetto/trace/android/camera_event.proto",
"protos/perfetto/trace/android/frame_timeline_event.proto",
"protos/perfetto/trace/android/gpu_mem_event.proto",
"protos/perfetto/trace/android/graphics_frame_event.proto",
@@ -3902,6 +3911,7 @@
cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --plugin=protoc-gen-plugin=$(location protozero_plugin) --plugin_out=wrapper_namespace=pbzero:$(genDir)/external/perfetto/ $(in)",
out: [
"external/perfetto/protos/perfetto/trace/android/android_log.pbzero.cc",
+ "external/perfetto/protos/perfetto/trace/android/camera_event.pbzero.cc",
"external/perfetto/protos/perfetto/trace/android/frame_timeline_event.pbzero.cc",
"external/perfetto/protos/perfetto/trace/android/gpu_mem_event.pbzero.cc",
"external/perfetto/protos/perfetto/trace/android/graphics_frame_event.pbzero.cc",
@@ -3915,6 +3925,7 @@
name: "perfetto_protos_perfetto_trace_android_zero_gen_headers",
srcs: [
"protos/perfetto/trace/android/android_log.proto",
+ "protos/perfetto/trace/android/camera_event.proto",
"protos/perfetto/trace/android/frame_timeline_event.proto",
"protos/perfetto/trace/android/gpu_mem_event.proto",
"protos/perfetto/trace/android/graphics_frame_event.proto",
@@ -3928,6 +3939,7 @@
cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --plugin=protoc-gen-plugin=$(location protozero_plugin) --plugin_out=wrapper_namespace=pbzero:$(genDir)/external/perfetto/ $(in)",
out: [
"external/perfetto/protos/perfetto/trace/android/android_log.pbzero.h",
+ "external/perfetto/protos/perfetto/trace/android/camera_event.pbzero.h",
"external/perfetto/protos/perfetto/trace/android/frame_timeline_event.pbzero.h",
"external/perfetto/protos/perfetto/trace/android/gpu_mem_event.pbzero.h",
"external/perfetto/protos/perfetto/trace/android/graphics_frame_event.pbzero.h",
@@ -4111,6 +4123,7 @@
"protos/perfetto/config/trace_config.proto",
"protos/perfetto/config/track_event/track_event_config.proto",
"protos/perfetto/trace/android/android_log.proto",
+ "protos/perfetto/trace/android/camera_event.proto",
"protos/perfetto/trace/android/frame_timeline_event.proto",
"protos/perfetto/trace/android/gpu_mem_event.proto",
"protos/perfetto/trace/android/graphics_frame_event.proto",