I am working on opencv gstreamer implementation and made a walktrough on the code. Opencv creates the pipeline with this lines.
#define COLOR_ELEM "ffmpegcolorspace" uridecodebin = gst_element_factory_make("uridecodebin", NULL); g_object_set(G_OBJECT(uridecodebin), "uri", uri, NULL); pipeline = gst_pipeline_new(NULL); color = gst_element_factory_make(COLOR_ELEM, NULL); sink = gst_element_factory_make("appsink", NULL); gst_bin_add_many(GST_BIN(pipeline), uridecodebin, color, sink, NULL); The uridecodebin, pipeline, color and sink are declared as GstElement* at the beginning. Now what I am trying to do is change the default latency (which is 2000msec). I have 2 questions: 1)Is there a way to set the latency of the uridecodebin object by using function g_object_set? 2)I replaced the uridecodebin with the rtspsrc and tried the following lines instead of the upper lines uridecodebin = gst_element_factory_make("rtspsrc", NULL); g_object_set(G_OBJECT(uridecodebin), "latency", 200, NULL); pipeline = gst_pipeline_new(NULL); my_new_pipe= gst_element_factory_make("decodebin2", NULL); //I am using gstreamer0.10 color = gst_element_factory_make(COLOR_ELEM, NULL); sink = gst_element_factory_make("appsink", NULL); gst_bin_add_many(GST_BIN(pipeline), uridecodebin, my_new_pipe ,color, sink, NULL); But it does not work. What is the wrong with this? How can I replace uridecodebin part with the rtspsrc? Thanks in advance. |
You can connect to uridecodebin *source-setup* and set latency of
rtspsrc in callback On 09/18, ironman wrote: > I am working on opencv gstreamer implementation and made a walktrough on the > code. Opencv creates the pipeline with this lines. > > #define COLOR_ELEM "ffmpegcolorspace" > > uridecodebin = gst_element_factory_make("uridecodebin", NULL); > g_object_set(G_OBJECT(uridecodebin), "uri", uri, NULL); > pipeline = gst_pipeline_new(NULL); > color = gst_element_factory_make(COLOR_ELEM, NULL); > sink = gst_element_factory_make("appsink", NULL); > gst_bin_add_many(GST_BIN(pipeline), uridecodebin, color, sink, NULL); > > The uridecodebin, pipeline, color and sink are declared as GstElement* at > the beginning. > > Now what I am trying to do is change the default latency (which is > 2000msec). I have 2 questions: > > 1)Is there a way to set the latency of the uridecodebin object by using > function g_object_set? > 2)I replaced the uridecodebin with the rtspsrc and tried the following lines > instead of the upper lines > > uridecodebin = gst_element_factory_make("rtspsrc", NULL); > g_object_set(G_OBJECT(uridecodebin), "latency", 200, NULL); > pipeline = gst_pipeline_new(NULL); > my_new_pipe= gst_element_factory_make("decodebin2", NULL); //I am using > gstreamer0.10 > color = gst_element_factory_make(COLOR_ELEM, NULL); > sink = gst_element_factory_make("appsink", NULL); > gst_bin_add_many(GST_BIN(pipeline), uridecodebin, my_new_pipe ,color, sink, > NULL); > > But it does not work. What is the wrong with this? How can I replace > uridecodebin part with the rtspsrc? > > Thanks in advance. > > > > -- > View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Usage-of-rtspsrc-instead-of-uridecodebin-tp4673701.html > Sent from the GStreamer-devel mailing list archive at Nabble.com. > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Sorry for my late reply. It works! Thanks a lot.
|
Hello ironman,sorry to bother you.I've meet the same problem as yours and I
couldn't understand how to set the uridecodebin's default latency.Do you still remember how to do it?Hope for your reply.Thank you! -- View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Usage-of-rtspsrc-instead-of-uridecodebin-tp4673701p4682751.html Sent from the GStreamer-devel mailing list archive at Nabble.com. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by ironman
Hello ironman,sorry to bother you.I've meet the same problem as yours and I couldn't understand how to set the uridecodebin's default latency.Do you still remember how to do it?Hope for your reply.Thank you! |
Free forum by Nabble | Edit this page |