2016-06-20 44 views
0

我用這個管道,什麼是流任務暫停,原因錯誤(-5)?

gst-launch-1.0 -e videotestsrc pattern="snow" ! video/x-raw, framerate=10/1, width=200, height=150 ! videomixer name=mix ! autovideosink videotestsrc ! video/x-raw, framerate=10/1, width=640, height=360 ! mix. 

但是,關閉輸出窗口後,

EOS on shutdown enabled -- waiting for EOS after Error 
Waiting for EOS... 
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc1: Internal data flow error. 
Additional debug info: 
gstbasesrc.c(2946): gst_base_src_loop(): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc1: 
streaming task paused, reason error (-5) 
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data flow error. 
Additional debug info: 
gstbasesrc.c(2946): gst_base_src_loop(): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: 
streaming task paused, reason error (-5) 

這是什麼意思,什麼是這個流任務暫停,原因錯誤(-5)錯誤的意思?

回答

1

您的管道適用於我..但您必須用Ctrl + C關閉它,而不是通過關閉窗口..它因爲沒有實現關閉窗口的正確處理(也許有標誌爲某處autovideosink或其他視頻接收器..我不知道)。

甚至這個簡單的管道問題上升(你可以嘗試與glimagesink和xvimagesink但誤差類似):

GST_DEBUG=3 gst-launch-1.0 -e videotestsrc pattern="snow" ! ximagesink 

何時檢查文檔爲the error

GST_FLOW_ERROR Some (fatal) error occurred. Element generating this error should post an error message with more details.

嗯,我們考察調試日誌較高的問題(您應該已經瞭解了本教程!)我們看到:

0:00:02.697769439 29872 0x2647590 WARN ximagesink ximagesink.c:1423:gst_x_image_sink_show_frame: could not output image - no window

0:00:02.697815511 29872 0x2647590 WARN basesrc gstbasesrc.c:2943:gst_base_src_loop: error:

Internal data flow error.

0:00:02.697826432 29872 0x2647590 WARN basesrc gstbasesrc.c:2943:gst_base_src_loop: error: streaming task paused, reason error (-5)

那麼錯誤是顯而易見的:

could not output image - no window 

順便說一句的錯誤代碼是:

typedef enum { 
    /* custom success starts here */ 
    GST_FLOW_CUSTOM_SUCCESS_2 = 102, 
    GST_FLOW_CUSTOM_SUCCESS_1 = 101, 
    GST_FLOW_CUSTOM_SUCCESS = 100, 

    /* core predefined */ 
    GST_FLOW_OK    = 0, 
    /* expected failures */ 
    GST_FLOW_NOT_LINKED  = -1, 
    GST_FLOW_FLUSHING  = -2, 
    /* error cases */ 
    GST_FLOW_EOS   = -3, 
    GST_FLOW_NOT_NEGOTIATED = -4, 
    GST_FLOW_ERROR   = -5, 
    GST_FLOW_NOT_SUPPORTED = -6, 

    /* custom error starts here */ 
    GST_FLOW_CUSTOM_ERROR = -100, 
    GST_FLOW_CUSTOM_ERROR_1 = -101, 
    GST_FLOW_CUSTOM_ERROR_2 = -102 
} GstFlowReturn; 

如此反覆 - 該解決方案是使用Ctrl + C停止它,而不是打窗口交叉。如果這是不可能的,那麼你將不得不在C中通過適當處理窗口關閉來實現它(我會發誓在gstreamer文檔中有它的教程..)