繁体   English   中英

当图像尺寸较大时,使用 shmsink 和 shmsrc 的 GStreamer 管道停止

[英]When the image size is large, the GStreamer pipeline using shmsink and shmsrc stops

我想通过共享 memory 传输大图像。 当我在 GStreamer 中使用 shmsink 和 shmsrc 发送 4000x3000 像素图像时,图像会在显示几帧后停止。 但是,它不会崩溃,只是图像停止。 没有错误消息。

这是发送的命令。

gst-launch-1.0 v4l2src device=/dev/video0 \
! "video/x-raw,format=(string)YUY2,width=(int)640,height=(int)480,pixel-aspect-ratio=(fraction)1/1,framerate=(fraction)30/1" \
! videoscale \
! "video/x-raw, width=(int)4000, height=(int)3000" \
! shmsink socket-path=/tmp/foo

这是接收命令。

gst-launch-1.0 shmsrc socket-path=/tmp/foo \
! "video/x-raw,format=(string)YUY2,width=(int)4000,height=(int)3000,pixel-aspect-ratio=(fraction)1/1,framerate=(fraction)30/1" \
! xvimagesink

这是我们尝试过的。

  • 将图像大小更改为 3600x2700 -> 正常工作
  • 将发送管道中的 shmsink 更改为 xvimagesink -> 正常工作

我正在等待任何建议。

解决了。 我将选项“wait-for-connection=false”添加到 shmsink 以防止它停止。

接收管道保持不变,但发送管道现在如下。

gst-launch-1.0 v4l2src device=/dev/video0 \
! "video/x-raw,format=(string)YUY2,width=(int)640,height=(int)480,pixel-aspect-ratio=(fraction)1/1,framerate=(fraction)30/1" \
! videoscale \
! "video/x-raw, width=(int)4000, height=(int)3000" \
! shmsink socket-path=/tmp/foo wait-for-connection=false

我没有从任何地方获得信息,我只是更改了 shmsink 的所有选项,它意外地起作用了。

我不知道它为什么起作用,所以如果你能告诉我为什么,我将不胜感激。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM