Usage of rtspsrc instead of uridecodebin

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Usage of rtspsrc instead of uridecodebin

ironman
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage of rtspsrc instead of uridecodebin

aborilov
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage of rtspsrc instead of uridecodebin

ironman
Sorry for my late reply. It works! Thanks a lot.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage of rtspsrc instead of uridecodebin

sulli_xue
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage of rtspsrc instead of uridecodebin

sulli_xue
In reply to this post by ironman
ironman wrote
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!
Loading...