Flush RTSP pipeline

allopez allopez at gmv.com
Mon Sep 3 03:29:51 PDT 2012


Hi,

I discovered I could flush the pipeline using:

*gst_element_seek(pipeline,1.0, GST_FORMAT_TIME,
GST_SEEK_FLAG_FLUSH,GST_SEEK_TYPE_SET, 0, 	GST_SEEK_TYPE_NONE, 0);*

As I am using some cameras, I perform the seek before moving from
GST_STATE_PAUSED to GST_STATE_PLAYING states. I am not receiving the
GST_MESSAGE_EOS now.

Also, I divided the pipeline bus processing into some callbacks:

gst_bus_add_signal_watch(bus);
g_signal_connect(bus, "message::state-changed",
G_CALLBACK(gst_state_changed_cb), this);
g_signal_connect(bus, "message::element", G_CALLBACK(gst_element_cb), this);
g_signal_connect(bus, "message::error", G_CALLBACK(gst_error_cb), this);
g_signal_connect(bus, "message::eos", G_CALLBACK(gst_eos_cb), this);
gst_object_unref (bus); 	

This way I can perform another flush in the pipeline when I get the
GST_MESSAGE_STATE_CHANGED in the pipeline object when it moves from
GST_STATE_PLAYING to GST_STATE_PAUSED. In this case, the transition between
playing one camera to another is quite perfect. Furthermore, I have detected
some strange effects I don´t know how to solve if the stream is played at
640x360:

1º/ If I move from one camera to another I get the CPU working nearly at
100% in a random time.
2º/ Sometimes the seek ends in a complete lock of my application -->
Backtrace:
#0  0xb6cdcc14 in __lll_lock_wait () from /lib/libpthread.so.0
#1  0xb6cd81bd in _L_lock_748 () from /lib/libpthread.so.0
#2  0xb6cd7fe1 in pthread_mutex_lock () from /lib/libpthread.so.0
#3  0xb6e8883e in g_static_rec_mutex_lock () from /lib/libglib-2.0.so.0
#4  0xb676a337 in gst_rtspsrc_perform_seek (pad=0xb41df10c,
event=0x1164ab50) at gstrtspsrc.c:1865
#5  gst_rtspsrc_handle_src_event (pad=0xb41df10c, event=0x1164ab50) at
gstrtspsrc.c:1987
#6  0xb70c6b72 in gst_pad_send_event (pad=0x824d540, event=0x1164ab50) at
gstpad.c:5425
#7  0xb70c71ee in gst_pad_push_event (pad=0x823fb28, event=0x1164ab50) at
gstpad.c:5277
#8  0xb66a157f in gst_queue_handle_src_event (pad=0xb41dfd80,
event=0x1164ab50) at gstqueue.c:1313
#9  0xb70c6b72 in gst_pad_send_event (pad=0xb41dfd80, event=0x1164ab50) at
gstpad.c:5425
#10 0xb70c71ee in gst_pad_push_event (pad=0x823f808, event=0x1164ab50) at
gstpad.c:5277
#11 0xb70c7892 in gst_pad_event_default_dispatch (pad=0x823fd80,
event=0x1164ab50) at gstpad.c:3586
#12 gst_pad_event_default (pad=0x823fd80, event=0x1164ab50) at gstpad.c:3663
#13 0xb70c6b72 in gst_pad_send_event (pad=0x823fd80, event=0x1164ab50) at
gstpad.c:5425
#14 0xb70c71ee in gst_pad_push_event (pad=0x823fcb8, event=0x1164ab50) at
gstpad.c:5277
#15 0xb5b37545 in gst_ffmpegdec_src_event (pad=0x823fbf0, event=0x1164ab50)
at gstffmpegdec.c:559
#16 0xb70c6b72 in gst_pad_send_event (pad=0x823fbf0, event=0x1164ab50) at
gstpad.c:5425
#17 0xb70c71ee in gst_pad_push_event (pad=0xb41dfbf0, event=0x1164ab50) at
gstpad.c:5277
#18 0xb67166bb in gst_base_sink_send_event (element=0xb4123be8,
event=0x1164ab50) at gstbasesink.c:4526
#19 0xb70a621e in gst_element_send_event (element=0xb4123be8,
event=0x1164ab50) at gstelement.c:1667
#20 0xb7092928 in gst_bin_send_event (element=0xb41ddc88, event=0x1164ab50)
at gstbin.c:2703
#21 0xb70a621e in gst_element_send_event (element=0xb41ddc88,
event=0x1164ab50) at gstelement.c:1667
#22 0xb70a6337 in gst_element_seek (element=0xb41ddc88, rate=1,
format=GST_FORMAT_TIME, flags=GST_SEEK_FLAG_FLUSH,
cur_type=GST_SEEK_TYPE_SET, cur=0, 
    stop_type=GST_SEEK_TYPE_NONE, stop=0) at gstelement.c:1707

*What could I do to solve these problems ??? *

Thanks in advance





--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Flush-RTSP-pipeline-tp4655706p4656138.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list