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?? |
I have found the problem to be this line:
const guint64 TIMEOUT = 5000000; g_object_set(source, "location", rtspUrl.c_str(), "tcp-timeout", TIMEOUT, NULL ); If I don't use the tcp-timeout property then it works, but the problem is that I need to use this timeout as my pipeline blocks for up to 20 seconds normally when I try to change its state. Why does this work on one machine but not on another?? please help.. |
It gives me the error:
Error::GLib_GObject- IA__g_object_set_valist:object class GstRTSPSrc has no property named '' ... Any Ideas? |
On Tue, Mar 16, 2010 at 3:32 PM, wanting2learn <[hidden email]> wrote:
It ends at "named ""? have you checked if the machines have different versions of gstreamer and the plugins you're using? -- -- Thiago Sousa Santos ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
How do i check the version of gstreamer that I have?
Where are these elements located at on my machine?? Thanks for your reply. |
Free forum by Nabble | Edit this page |