【发布时间】:2019-09-08 20:34:08
【问题描述】:
我正在测试 Gstreamer Waylandsink 示例,这是一个嵌入在 Weston 之上运行的 GTK 窗口中的 Gstreamer 测试视频: https://github.com/GStreamer/gst-plugins-bad/tree/master/tests/examples/waylandsink
更多关于我的问题的描述还有回溯: http://gstreamer-devel.966125.n4.nabble.com/Waylandsink-segmentation-fault-td4691887.html http://gstreamer-devel.966125.n4.nabble.com/GstVideoOverlay-td4691869.html http://gstreamer-devel.966125.n4.nabble.com/gst-video-overlay-set-render-rectangle-td4691801.html
窗口正确打开并正在运行视频示例,但在按钮上 点击(按钮NULL),我想擦除我创建的视频渲染区域。根据 gst_video_overlay_set_render_rectangle 方法的文档,它应该关闭渲染区域: https://gstreamer.freedesktop.org/documentation/video/gstvideooverlay.html?gi-language=c
因此我添加了这段代码:
null_clicked_cb (GtkButton * button, DemoApp * d)
{
GtkAllocation allocation;
gtk_widget_get_allocation(d->video_widget,&allocation);
GstWaylandSink *sink = GST_WAYLAND_SINK (d->overlay);
GstVideoOverlay* overlay;
overlay = d->overlay;
gst_video_overlay_set_render_rectangle (overlay, allocation.x,allocation.y, -1, -1);
}
我正在使用以下值提供方法:x 26 y 60 width -1 height -1 在 Weston 下,我随机遇到了以下错误之一: Gdk 消息:从显示器读取事件时出错:协议错误 Gdk 消息:错误 32(断管)发送到 Wayland 显示器 gdk-message:错误刷新显示
我在 Wayland Gnome shell 中遇到了这个错误:
0:00:02.355175744 25457 0x5641c5dd4150 ERROR fdmemory
gstfdmemory.c:127:gst_fd_mem_map: 0x7f9edc00b680: fd 17: mmap failed: Cannot
allocate memory
0:00:02.355213222 25457 0x5641c5dd4150 ERROR waylandsink
wlshmallocator.c:78:gst_wl_shm_allocator_alloc:<wlshmallocator0> GstFdMemory
map failed
0:00:02.355238267 25457 0x5641c5dd4150 WARN GST_BUFFER
gstbuffer.c:907:gst_buffer_new_allocate: failed to allocate
5680698421285089536 bytes
(waylandexample:25457): GStreamer-CRITICAL **: 22:03:17.493:
gst_buffer_memset: assertion 'GST_IS_BUFFER (buffer)' failed
(waylandexample:25457): GStreamer-CRITICAL **: 22:03:17.493:
gst_buffer_peek_memory: assertion 'GST_IS_BUFFER (buffer)' failed
有人知道问题出在哪里吗?
谢谢
【问题讨论】:
标签: c linux gtk gstreamer wayland