mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
d/vf: Add tracing support
This commit is contained in:
parent
a6a5b3dda6
commit
fb92a3f27f
|
@ -255,7 +255,7 @@ if(XRT_BUILD_DRIVER_VF)
|
|||
)
|
||||
|
||||
add_library(drv_vf STATIC ${VF_SOURCE_FILES})
|
||||
target_link_libraries(drv_vf PRIVATE xrt-interfaces aux_os ${GST_LIBRARIES})
|
||||
target_link_libraries(drv_vf PRIVATE xrt-interfaces aux_os aux_util ${GST_LIBRARIES})
|
||||
target_include_directories(drv_vf PRIVATE ${GST_INCLUDE_DIRS})
|
||||
MESSAGE("GST include ${GST_INCLUDE_DIRS}")
|
||||
list(APPEND ENABLED_DRIVERS vf)
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "util/u_format.h"
|
||||
#include "util/u_frame.h"
|
||||
#include "util/u_logging.h"
|
||||
#include "util/u_trace_marker.h"
|
||||
|
||||
#include "vf_interface.h"
|
||||
|
||||
|
@ -140,6 +141,8 @@ vf_frame(struct xrt_frame *xf)
|
|||
static void
|
||||
vf_frame_destroy(struct xrt_frame *xf)
|
||||
{
|
||||
SINK_TRACE_MARKER();
|
||||
|
||||
struct vf_frame *vff = vf_frame(xf);
|
||||
|
||||
gst_video_frame_unmap(&vff->frame);
|
||||
|
@ -163,6 +166,8 @@ vf_frame_destroy(struct xrt_frame *xf)
|
|||
static void
|
||||
vf_fs_frame(struct vf_fs *vid, GstSample *sample)
|
||||
{
|
||||
SINK_TRACE_MARKER();
|
||||
|
||||
// Noop.
|
||||
if (!vid->sink) {
|
||||
return;
|
||||
|
@ -285,8 +290,10 @@ on_source_message(GstBus *bus, GstMessage *message, struct vf_fs *vid)
|
|||
}
|
||||
|
||||
static void *
|
||||
run_play_thread(void *ptr)
|
||||
vf_fs_mainloop(void *ptr)
|
||||
{
|
||||
SINK_TRACE_MARKER();
|
||||
|
||||
struct vf_fs *vid = (struct vf_fs *)ptr;
|
||||
|
||||
VF_DEBUG(vid, "Let's run!");
|
||||
|
@ -468,7 +475,7 @@ alloc_and_init_common(struct xrt_frame_context *xfctx, //
|
|||
gst_bus_add_watch(bus, (GstBusFunc)on_source_message, vid);
|
||||
gst_object_unref(bus);
|
||||
|
||||
ret = os_thread_helper_start(&vid->play_thread, run_play_thread, vid);
|
||||
ret = os_thread_helper_start(&vid->play_thread, vf_fs_mainloop, vid);
|
||||
if (ret != 0) {
|
||||
VF_ERROR(vid, "Failed to start thread '%i'", ret);
|
||||
g_main_loop_unref(vid->loop);
|
||||
|
|
Loading…
Reference in a new issue