3

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

What I am doing :

gst_init( NULL, NULL );

GstElement *m_pipeline = gst_pipeline_new ("pipeline1");

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

But gst_element_factory_make always return NULL.

What I have verified :

  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).

I have also tried alternative option :

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

But, gst_element_factory_find can not find rtspsrc.

Please help me out from this problem.

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

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

Many many thanks in Advance.

Community
  • 1
  • 1
AB Bolim
  • 1,997
  • 2
  • 23
  • 47

1 Answers1

7

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

gst_element_factory_make("fakesrc", NULL);

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.

Mark Tolley
  • 1,308
  • 10
  • 12
  • Thanks man, I just need to add `GST_PLUGIN_PATH` to environment variable. and its work smoothly...:) – AB Bolim Apr 14 '14 at 06:09