[gst-devel] Element udpsrc0 is not in bin source

wanting2learn wanting2learn at hotmail.co.uk
Tue Mar 16 18:25:05 CET 2010


I have a gstreamer pipeline like so:
// Create pipeline
  m_pPipeline = GST_PIPELINE(gst_pipeline_new("livemjpg-player"));

   // Create source elements
  GstElement *source = gst_element_factory_make("rtspsrc", "source");
  
  //Sometimes the rtspsrc element blocks for up to 20secs when its state is
changed
  //so change its default tcp-timeout to 5secs
  g_object_set(source, "location", rtspUrl.c_str(), "tcp-timeout", TIMEOUT,
NULL );


  // Create decode element
  GstElement *decode = gst_element_factory_make("decodebin2", "decode");
  

  // Create jpeg encoder element
  GstElement *encoder = gst_element_factory_make("jpegenc", "jpegenc");
  

  // Create htppJpeg format element
  m_pHtmlElem = gst_element_factory_make("htmljpgimg", "jpgimg");


   // Create sink format element
  GstElement *sink = gst_element_factory_make("fdsink", "sink");

  //  g_object_set(sink, "fd", stdout, NULL );

  // Add elements to the pipeline
  gst_bin_add_many( GST_BIN(m_pPipeline),
                    source, decode, encoder, m_pHtmlElem, sink, NULL);

  // Link all elements except source and decoder
  // The rtspsrc and decoder will automatically determine the appropriate
pad
  // at run time and then they will link accordingly
  if (!gst_element_link_many(encoder, m_pHtmlElem, sink, NULL))
  {
    vecgi::LOGMSG( vecgi::VELOG_ERROR, "Failed to link elements in
MotionJpeg pipeline." );
  }
  g_signal_connect(source, "pad-added", G_CALLBACK(on_rtsppad_added),
                   decode );
  g_signal_connect(decode, "new-decoded-pad", G_CALLBACK (on_pad_added),
                   encoder );

  if( !gst_element_set_state( GST_ELEMENT(m_pPipeline),
                                GST_STATE_PLAYING ) )
{
    //If it fails to start then reset pipeline
     if ( !gst_element_set_state( GST_ELEMENT(m_pPipeline),
                                GST_STATE_NULL ) )
}


and on one linux machine my binary works fine but on another machine i get
the following errors when I try to start it playing:


<3> Mar 16 12:17:42 Z276cff httpd[15647]: [error] [client 192.168.200.112]
(livemjpg:17499): GStreamer-WARNING **: Element udpsrc0 is not in bin source

<3> Mar 16 12:17:42 Z276cff httpd[15647]: [error] [client 192.168.200.112]
(livemjpg:17499): GStreamer-WARNING **: Element udpsrc1 is not in bin source

<3> Mar 16 12:17:43 Z276cff httpd[15647]: [error] [client 192.168.200.112]
(livemjpg:17499): GLib-GObject-WARNING **: invalid unclassed pointer in cast
to `GstElement'

<3> Mar 16 12:17:43 Z276cff httpd[15647]: [error] [client 192.168.200.112]
(livemjpg:17499): GStreamer-CRITICAL **: gst_element_set_state: assertion
`GST_IS_ELEMENT (element)' failed

<3> Mar 16 12:17:43 Z276cff httpd[15647]: [error] [client 192.168.200.112]
(livemjpg:17499): GStreamer-CRITICAL **: gst_object_unref: assertion
`((GObject *) object)->ref_count > 0' failed

<3> Mar 16 12:17:42 Z276cff httpd[15647]: [error] [client 192.168.200.112]
(livemjpg:17499): GStreamer-WARNING **: Element udpsrc0 is not in bin source


Then it does not start playing....

Why could this be happening??
-- 
View this message in context: http://n4.nabble.com/Element-udpsrc0-is-not-in-bin-source-tp1595256p1595256.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list