0

这是管道:

const CAP_PIPELINE = 'filesrc location=$pipe' +
' ! video/x-h264, stream-format=byte-stream, width=800, height=448, framerate=30/1 ! h264parse ' + 
' ! omxh264dec ! videorate drop-only=true ! video/x-raw,framerate=4/1 ! videoconvert ! appsink';

opencv代码基本上是:

VideoCapture cap
cap.open(pipeline)

此代码在 Opencv 3.2 中运行良好,但在 Opencv 3.1 中失败并在 Gstreamer 日志中显示此消息:

        gstbasetransform.c:1346:gst_base_transform_setcaps:<videorate0> transform 
    could not transform 
video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)800, height=(int)448, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)sRGB, framerate=(fraction)30/1 
    in anything we support

任何想法这里有什么问题?

感谢任何建议/帮助队友!

4

1 回答 1

0

我通过用 3.2 版本替换“cap_gstreamer.cpp”的源代码来解决我的问题......我假设 3.1 版本中存在一些错误......我做了 3.1 和 3.2 的差异,并不能真正告诉在哪里错误是...

于 2017-05-16T21:54:31.670 回答