我想在 Gstreamer 渲染小部件上显示一个 Qt 按钮小部件,这是我在 QWidget 上渲染 gstreamer waylandsink 的源代码,
QPlatformNativeInterface *native =
QGuiApplication::platformNativeInterface();
struct wl_surface *surface = static_cast<struct wl_surface *>(
native->nativeResourceForWindow("surface", m_topWidget->windowHandle()));
gst_video_overlay_set_window_handle(
GST_VIDEO_OVERLAY (GST_MESSAGE_SRC (msg)),
(guintptr) surface
);
gst_video_overlay_set_render_rectangle(
GST_VIDEO_OVERLAY (GST_MESSAGE_SRC (msg)),
rect.x(), rect.y(),
rect.width(), rect.height()
);
那么,如何在渲染小部件上显示按钮?