The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

d/vf: Add tracing support

authored by

Jakob Bornecrantz and committed by
Jakob Bornecrantz
fb92a3f2 a6a5b3dd

+10 -3
+1 -1
src/xrt/drivers/CMakeLists.txt
··· 255 255 ) 256 256 257 257 add_library(drv_vf STATIC ${VF_SOURCE_FILES}) 258 - target_link_libraries(drv_vf PRIVATE xrt-interfaces aux_os ${GST_LIBRARIES}) 258 + target_link_libraries(drv_vf PRIVATE xrt-interfaces aux_os aux_util ${GST_LIBRARIES}) 259 259 target_include_directories(drv_vf PRIVATE ${GST_INCLUDE_DIRS}) 260 260 MESSAGE("GST include ${GST_INCLUDE_DIRS}") 261 261 list(APPEND ENABLED_DRIVERS vf)
+9 -2
src/xrt/drivers/vf/vf_driver.c
··· 18 18 #include "util/u_format.h" 19 19 #include "util/u_frame.h" 20 20 #include "util/u_logging.h" 21 + #include "util/u_trace_marker.h" 21 22 22 23 #include "vf_interface.h" 23 24 ··· 140 141 static void 141 142 vf_frame_destroy(struct xrt_frame *xf) 142 143 { 144 + SINK_TRACE_MARKER(); 145 + 143 146 struct vf_frame *vff = vf_frame(xf); 144 147 145 148 gst_video_frame_unmap(&vff->frame); ··· 163 166 static void 164 167 vf_fs_frame(struct vf_fs *vid, GstSample *sample) 165 168 { 169 + SINK_TRACE_MARKER(); 170 + 166 171 // Noop. 167 172 if (!vid->sink) { 168 173 return; ··· 285 290 } 286 291 287 292 static void * 288 - run_play_thread(void *ptr) 293 + vf_fs_mainloop(void *ptr) 289 294 { 295 + SINK_TRACE_MARKER(); 296 + 290 297 struct vf_fs *vid = (struct vf_fs *)ptr; 291 298 292 299 VF_DEBUG(vid, "Let's run!"); ··· 468 475 gst_bus_add_watch(bus, (GstBusFunc)on_source_message, vid); 469 476 gst_object_unref(bus); 470 477 471 - ret = os_thread_helper_start(&vid->play_thread, run_play_thread, vid); 478 + ret = os_thread_helper_start(&vid->play_thread, vf_fs_mainloop, vid); 472 479 if (ret != 0) { 473 480 VF_ERROR(vid, "Failed to start thread '%i'", ret); 474 481 g_main_loop_unref(vid->loop);