簡體   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