流媒体任务暂停是什么意思,原因错误(-5)?

时间:2016-06-20 13:34:51

标签: video gstreamer

我使用了这个管道,

 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 个答案:

答案 0 :(得分:1)

你的管道对我有用..但是你必须用Ctrl + C关闭它而不是关闭窗口..因为没有实现关闭窗口的正确处理(也许有一个标志为某个地方autovideosink或其他视频接收器..我不知道。)

问题随着这个简单的管道而上升(您可以尝试使用glimagesink和xvimagesink,但错误类似):

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

检查the error的文档时:

  

GST_FLOW_ERROR   发生了一些(致命)错误。生成此错误的元素应发布包含更多详细信息的错误消息。

我们用更高的调试日志检查问题(你应该已经学过这一课了!)我们看到了:

  

0:00:02.697769439 29872 0x2647590警告ximagesink ximagesink.c:1423:gst_x_image_sink_show_frame:无法输出图像 - 无窗口

     

0:00:02.697815511 29872 0x2647590警告basesrc gstbasesrc.c:2943:gst_base_src_loop:错误:

     

内部数据流错误。

     

0:00:02.697826432 29872 0x2647590 WARN basesrc gstbasesrc.c:2943:gst_base_src_loop:错误:流媒体任务已暂停,原因错误(-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中实现它并正确处理windows关闭(我会发誓那里有教程对于它在gstreamer docs ..)

相关问题