@@ -119,28 +119,200 @@ cf_cc_library(
119119 ],
120120)
121121
122+ cf_cc_library (
123+ name = "libcuttlefish_webrtc_connection_observer" ,
124+ srcs = ["connection_observer.cpp" ],
125+ hdrs = ["connection_observer.h" ],
126+ deps = [
127+ ":libcuttlefish_webrtc_adb_handler" ,
128+ ":libcuttlefish_webrtc_bluetooth_handler" ,
129+ ":libcuttlefish_webrtc_display_handler" ,
130+ ":libcuttlefish_webrtc_gpx_locations_handler" ,
131+ ":libcuttlefish_webrtc_kernel_log_events_handler" ,
132+ ":libcuttlefish_webrtc_kml_locations_handler" ,
133+ ":libcuttlefish_webrtc_location_handler" ,
134+ ":libcuttlefish_webrtc_sensors_handler" ,
135+ "//cuttlefish/common/libs/fs" ,
136+ "//cuttlefish/common/libs/utils:json" ,
137+ "//cuttlefish/host/frontend/webrtc/libdevice:camera_controller" ,
138+ "//cuttlefish/host/frontend/webrtc/libdevice:connection_observer" ,
139+ "//cuttlefish/host/frontend/webrtc/libdevice:lights_observer" ,
140+ "//cuttlefish/host/libs/config:config_utils" ,
141+ "//cuttlefish/host/libs/config:cuttlefish_config" ,
142+ "//cuttlefish/host/libs/confui:host_confui" ,
143+ "//cuttlefish/host/libs/input_connector" ,
144+ "//cuttlefish/host/libs/vm_manager" ,
145+ "//cuttlefish/result" ,
146+ "//libbase" ,
147+ "@abseil-cpp//absl/log" ,
148+ "@abseil-cpp//absl/log:check" ,
149+ "@abseil-cpp//absl/strings" ,
150+ "@fmt" ,
151+ "@fruit" ,
152+ "@gflags" ,
153+ "@jsoncpp" ,
154+ ],
155+ )
156+
157+ cf_cc_library (
158+ name = "libcuttlefish_webrtc_cvd_video_frame_buffer" ,
159+ srcs = ["cvd_video_frame_buffer.cpp" ],
160+ hdrs = ["cvd_video_frame_buffer.h" ],
161+ deps = [
162+ "//cuttlefish/common/libs/utils:size_utils" ,
163+ "//cuttlefish/host/libs/screen_connector:video_frame_buffer" ,
164+ "//libbase" ,
165+ "@abseil-cpp//absl/log" ,
166+ "@abseil-cpp//absl/log:check" ,
167+ "@abseil-cpp//absl/strings" ,
168+ "@fmt" ,
169+ "@fruit" ,
170+ "@jsoncpp" ,
171+ ],
172+ )
173+
174+ cf_cc_library (
175+ name = "libcuttlefish_webrtc_display_handler" ,
176+ srcs = ["display_handler.cpp" ],
177+ hdrs = ["display_handler.h" ],
178+ deps = [
179+ ":libcuttlefish_webrtc_cvd_video_frame_buffer" ,
180+ ":libcuttlefish_webrtc_screenshot_handler" ,
181+ "//cuttlefish/host/frontend/webrtc/libdevice:streamer" ,
182+ "//cuttlefish/host/frontend/webrtc/libdevice:video_sink" ,
183+ "//cuttlefish/host/libs/screen_connector" ,
184+ "//cuttlefish/host/libs/screen_connector:video_frame_buffer" ,
185+ "//libbase" ,
186+ "@abseil-cpp//absl/log" ,
187+ "@abseil-cpp//absl/log:check" ,
188+ "@abseil-cpp//absl/strings" ,
189+ "@fmt" ,
190+ "@fruit" ,
191+ "@jsoncpp" ,
192+ "@libdrm//:libdrm_fourcc" ,
193+ "@libyuv" ,
194+ ],
195+ )
196+
197+ cf_cc_library (
198+ name = "libcuttlefish_webrtc_gpx_locations_handler" ,
199+ srcs = ["gpx_locations_handler.cpp" ],
200+ hdrs = ["gpx_locations_handler.h" ],
201+ deps = [
202+ "//cuttlefish/host/libs/config:cuttlefish_config" ,
203+ "//cuttlefish/host/libs/location" ,
204+ "//cuttlefish/result" ,
205+ "//libbase" ,
206+ "@abseil-cpp//absl/log" ,
207+ "@abseil-cpp//absl/log:check" ,
208+ "@abseil-cpp//absl/strings" ,
209+ "@fmt" ,
210+ "@fruit" ,
211+ "@grpc//:grpc++" ,
212+ "@jsoncpp" ,
213+ ],
214+ )
215+
216+ cf_cc_library (
217+ name = "libcuttlefish_webrtc_kernel_log_events_handler" ,
218+ srcs = ["kernel_log_events_handler.cpp" ],
219+ hdrs = ["kernel_log_events_handler.h" ],
220+ deps = [
221+ "//cuttlefish/common/libs/fs" ,
222+ "//cuttlefish/host/commands/kernel_log_monitor:kernel_log_monitor_utils" ,
223+ "//cuttlefish/host/libs/config:config_constants" ,
224+ "//cuttlefish/host/libs/config:cuttlefish_config" ,
225+ "//cuttlefish/result" ,
226+ "//libbase" ,
227+ "@abseil-cpp//absl/log" ,
228+ "@abseil-cpp//absl/log:check" ,
229+ "@abseil-cpp//absl/strings" ,
230+ "@fmt" ,
231+ "@fruit" ,
232+ "@jsoncpp" ,
233+ ],
234+ )
235+
236+ cf_cc_library (
237+ name = "libcuttlefish_webrtc_kml_locations_handler" ,
238+ srcs = ["kml_locations_handler.cpp" ],
239+ hdrs = ["kml_locations_handler.h" ],
240+ deps = [
241+ "//cuttlefish/host/libs/config:cuttlefish_config" ,
242+ "//cuttlefish/host/libs/location" ,
243+ "//libbase" ,
244+ "@abseil-cpp//absl/log" ,
245+ "@abseil-cpp//absl/log:check" ,
246+ "@abseil-cpp//absl/strings" ,
247+ "@fmt" ,
248+ "@fruit" ,
249+ "@grpc//:grpc++" ,
250+ "@jsoncpp" ,
251+ ],
252+ )
253+
254+ cf_cc_library (
255+ name = "libcuttlefish_webrtc_location_handler" ,
256+ srcs = ["location_handler.cpp" ],
257+ hdrs = ["location_handler.h" ],
258+ deps = [
259+ "//cuttlefish/host/libs/config:cuttlefish_config" ,
260+ "//cuttlefish/host/libs/location" ,
261+ "//cuttlefish/result" ,
262+ "//libbase" ,
263+ "@abseil-cpp//absl/log" ,
264+ "@abseil-cpp//absl/log:check" ,
265+ "@abseil-cpp//absl/strings" ,
266+ "@fmt" ,
267+ "@fruit" ,
268+ "@grpc//:grpc++" ,
269+ "@jsoncpp" ,
270+ ],
271+ )
272+
273+ cf_cc_library (
274+ name = "libcuttlefish_webrtc_screenshot_handler" ,
275+ srcs = ["screenshot_handler.cpp" ],
276+ hdrs = ["screenshot_handler.h" ],
277+ deps = [
278+ "//cuttlefish/host/libs/screen_connector:video_frame_buffer" ,
279+ "//cuttlefish/posix:strerror" ,
280+ "//cuttlefish/result" ,
281+ "//libbase" ,
282+ "@abseil-cpp//absl/cleanup" ,
283+ "@abseil-cpp//absl/log" ,
284+ "@abseil-cpp//absl/log:check" ,
285+ "@abseil-cpp//absl/strings" ,
286+ "@fmt" ,
287+ "@fruit" ,
288+ "@jsoncpp" ,
289+ "@libjpeg_turbo//:jpeg" ,
290+ "@libpng" ,
291+ "@libyuv" ,
292+ ],
293+ )
294+
295+ cf_cc_library (
296+ name = "libcuttlefish_webrtc_sensors_handler" ,
297+ srcs = ["sensors_handler.cpp" ],
298+ hdrs = ["sensors_handler.h" ],
299+ deps = [
300+ "//cuttlefish/common/libs/sensors" ,
301+ "//cuttlefish/common/libs/transport" ,
302+ "//libbase" ,
303+ "@abseil-cpp//absl/log" ,
304+ "@abseil-cpp//absl/log:check" ,
305+ "@abseil-cpp//absl/strings" ,
306+ "@fmt" ,
307+ "@fruit" ,
308+ "@jsoncpp" ,
309+ ],
310+ )
311+
122312cf_cc_binary (
123313 name = "webRTC" ,
124314 srcs = [
125- "connection_observer.cpp" ,
126- "connection_observer.h" ,
127- "cvd_video_frame_buffer.cpp" ,
128- "cvd_video_frame_buffer.h" ,
129- "display_handler.cpp" ,
130- "display_handler.h" ,
131- "gpx_locations_handler.cpp" ,
132- "gpx_locations_handler.h" ,
133- "kernel_log_events_handler.cpp" ,
134- "kernel_log_events_handler.h" ,
135- "kml_locations_handler.cpp" ,
136- "kml_locations_handler.h" ,
137- "location_handler.cpp" ,
138- "location_handler.h" ,
139315 "main.cpp" ,
140- "screenshot_handler.cpp" ,
141- "screenshot_handler.h" ,
142- "sensors_handler.cpp" ,
143- "sensors_handler.h" ,
144316 ],
145317 deps = [
146318 ":libcuttlefish_webrtc_adb_handler" ,
@@ -151,6 +323,15 @@ cf_cc_binary(
151323 ":libcuttlefish_webrtc_client_server" ,
152324 ":libcuttlefish_webrtc_command_channel" ,
153325 ":libcuttlefish_webrtc_commands_proto" ,
326+ ":libcuttlefish_webrtc_connection_observer" ,
327+ ":libcuttlefish_webrtc_cvd_video_frame_buffer" ,
328+ ":libcuttlefish_webrtc_display_handler" ,
329+ ":libcuttlefish_webrtc_gpx_locations_handler" ,
330+ ":libcuttlefish_webrtc_kernel_log_events_handler" ,
331+ ":libcuttlefish_webrtc_kml_locations_handler" ,
332+ ":libcuttlefish_webrtc_location_handler" ,
333+ ":libcuttlefish_webrtc_screenshot_handler" ,
334+ ":libcuttlefish_webrtc_sensors_handler" ,
154335 "//cuttlefish/common/libs/fs" ,
155336 "//cuttlefish/common/libs/sensors" ,
156337 "//cuttlefish/common/libs/transport" ,
0 commit comments