简体   繁体   English

错误:无法构造管道:没有元素“ audiotestsrc”

[英]ERROR: pipeline could not be constructed: no element “audiotestsrc”

I'm trying to write a simple audio streaming application with C using Gstreamer library (gstreamer1.0-libav) on ubuntu 16.04. 我正在尝试在ubuntu 16.04上使用Gstreamer库(gstreamer1.0-libav)用C编写一个简单的音频流应用程序。 I was testing the gstreamer1.0-tools with a simple "gst-launch audiotestsrc ! alsasink" command, but each time I run this I get the following error: pipeline could not be constructed: no element "audiotestsrc". 我正在使用简单的“ gst-launch audiotestsrc!alsasink”命令测试gstreamer1.0-tools,但是每次运行此命令时,都会收到以下错误:无法构造管道:没有元素“ audiotestsrc”。 I've tried running the command on different path locations such as usr/bin/, usr/local/lib/, etc., but I cannot seem to figure out where Ubuntu installed the Gstreamer binaries that let me run these commands. 我尝试在不同的路径位置(例如usr / bin /,usr / local / lib /等)上运行命令,但似乎无法弄清楚Ubuntu在哪里安装了Gstreamer二进制文件来运行这些命令。 Also, I'm assuming, with my lack of experience with linux, that the problem is that I'm not running this command on the right directory. 另外,由于缺乏Linux经验,我假设问题是我没有在正确的目录上运行此命令。 I'm following this guide: https://gstreamer.freedesktop.org/documentation/tutorials/basic/gstreamer-tools.html# . 我正在遵循此指南: https : //gstreamer.freedesktop.org/documentation/tutorials/basic/gstreamer-tools.html# Could someone shed some light on this matter? 有人可以阐明这件事吗? Any help is appreciated. 任何帮助表示赞赏。 Thanks. 谢谢。

Found a workaround, although I'm still unsure whether this is a fix. 找到了解决方法,尽管我仍然不确定这是否是解决方法。 Doing more research I found this great resource http://labs.isee.biz/index.php/Example_GStreamer_Pipelines . 经过更多研究,我发现了这个很棒的资源http://labs.isee.biz/index.php/Example_GStreamer_Pipelines I replaced "gst-launch audiotestsrc ! alsasink" with "gst-launch-0.10 audiotestsrc ! alsasink" and that did the trick. 我将“ gst-launch audiotestsrc!alsasink”替换为“ gst-launch-0.10 audiotestsrc!alsasink”,从而达到了目的。 The problem was with the version on the gst-launch command. 问题出在gst-launch命令的版本上。 Hope this can help anyone. 希望这可以帮助任何人。 Any other comments for clarity purposes are more than welcomed. 为了清晰起见,任何其他评论都受到欢迎。

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

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