Gstreamer:gst_element_factory_make():总是失败并返回NULL:Qt5 [英] Gstreamer : gst_element_factory_make() : always fail and return NULL : Qt5

查看:530
本文介绍了Gstreamer:gst_element_factory_make():总是失败并返回NULL:Qt5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是,我无法创建Gstreamer元素. 我正在使用Qt 5.2.1

My problem is, I cannot create Gstreamer element. I am creating Gstreamer project using Qt 5.2.1

我在做什么:

gst_init( NULL, NULL );

GstElement *m_pipeline = gst_pipeline_new ("pipeline1");

GstElement *m_rtspSrc = gst_element_factory_make("rtspsrc", "MyRtspSrc");

但是 gst_element_factory_make 总是返回 NULL .

But gst_element_factory_make always return NULL.

我已验证的内容:

  1. 检查共享对象是否在$(libdir)/gstreamer-0.10/中. (在那里).
  2. gst-inspect-0.10 rtspsrc. (它提供了插件的详细信息).
  3. gst-launch-0.10 fakesrc! my_all_plugin!假水槽(效果很好).
  1. Checked if shared object is in $(libdir)/gstreamer-0.10/. (It is there).
  2. gst-inspect-0.10 rtspsrc. (Its gives details of the plugin).
  3. gst-launch-0.10 fakesrc ! my_all_plugin ! fakesink (Its works fine).

我也尝试了替代方法:

GstElementFactory *factory = gst_element_factory_find ("rtspsrc"); if(factory) GstElement *m_rtspSrc = gst_element_factory_create (factory, "MyRtspSrc");

GstElementFactory *factory = gst_element_factory_find ("rtspsrc"); if(factory) GstElement *m_rtspSrc = gst_element_factory_create (factory, "MyRtspSrc");

但是, gst_element_factory_find 找不到 rtspsrc .

But, gst_element_factory_find can not find rtspsrc.

请帮助我解决这个问题.

Please help me out from this problem.

我也用谷歌搜索.但是找不到任何解决方案. 我也参考了几篇StackOverflow文章.

I have also google it. But can not find any solution. I have refer few StackOverflow articles too.

GStreamer gst_element_factory_make失败类似,但仍然存在问题

Like GStreamer gst_element_factory_make fails and many more, but still have the issue.

非常感谢Advance.

Many many thanks in Advance.

推荐答案

尝试制作其他元素,看看是否可行,例如:

Try to make a different element and see if that works, e.g.:

gst_element_factory_make("fakesrc", NULL);

如果该操作也失败,则可能是您的环境未正确设置.您可以尝试将环境变量GST_PLUGIN_PATH设置到包含gstreamer插件的目录中.

If that also fails then it is likely your environment is not set up correctly. You can try setting the environment variable GST_PLUGIN_PATH to the directory containing your gstreamer plugins.

这篇关于Gstreamer:gst_element_factory_make():总是失败并返回NULL:Qt5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆