[gst-devel] Pipeline fail to change to playing when use two pads.

Hu, Gang A gang.a.hu at intel.com
Thu Jan 13 17:09:40 CET 2011


Hi,
 I am developing a three pads camera source element. I created this element based on GstBaseSrc, and add another two pads to GstBaseSrc and created a new basesrc in my camera source.
My currently design is the vfsrc pad always has data flow. Another copy of data flow will be image or video depends on the mode setting to the camera source.

This pipeline is working now.
gst-launch -ev mfldv4l2camsrc num-buffers=2 .vfsrc ! video/x-raw-yuv,width=640,height=480 ! sdlvideosink

But if I want use the imgpad,
gst-launch -ev mfldv4l2camsrc num-buffers=2 name=aa  .imgsrc ! video/x-raw-yuv,width=640,height=480 ! fakesink  aa.vfsrc ! video/x-raw-yuv,width=640,height=480 ! sdlvideosink

 the pipeline will stop at waiting for playing.
gst_base_sink_wait_preroll:<sdlvideosink0> waiting in preroll for flush or PLAYING
cat
What is the potential issue?

This is my source code repository:
http://meego.gitorious.org/maemo-multimedia/mfldv4l2camsrc/commits/camerabin2
This is the some of the log of the basesrc anb basesink.

gst_cam_base_src_init: creating vfsrc pad
gst_cam_base_src_init: creating imgsrc pad
gst_cam_base_src_init: creating vidsrc pad
gst_cam_base_src_init: setting functions on src pad
gst_cam_base_src_init: adding three src pads
gst_cam_base_src_init: init done
gst_cam_base_src_set_property:<mfldv4l2camsrc0> Setting pad mode: 1
gst_cam_base_src_set_pad_mode:<mfldv4l2camsrc0> Set pad mode to 1
gst_base_sink_change_state:<sdlvideosink0> READY to PAUSED
gst_base_sink_change_state:<sdlvideosink0> doing async state change
gst_base_sink_pad_activate:<sdlvideosink0> Trying pull mode first
gst_base_sink_pad_activate:<sdlvideosink0> pull mode disabled
gst_base_sink_pad_activate:<sdlvideosink0> Falling back to push mode
gst_base_sink_pad_activate:<sdlvideosink0> Success activating push mode
gst_base_sink_change_state:<filesink0> READY to PAUSED
gst_base_sink_change_state:<filesink0> doing async state change
gst_base_sink_pad_activate:<filesink0> Trying pull mode first
gst_base_sink_pad_activate:<filesink0> pull mode disabled
gst_base_sink_pad_activate:<filesink0> Falling back to push mode
gst_base_sink_pad_activate:<filesink0> Success activating push mode
gst_cam_base_src_activate_push:<mfldv4l2camsrc0> vidsrc activating in push mode
gst_cam_base_src_start:<mfldv4l2camsrc0> starting source of pad vidsrc
gst_cam_base_src_start:<mfldv4l2camsrc0> format: time, have size: 1, size: 18446744073709551615, duration: -1
gst_cam_base_src_start:<mfldv4l2camsrc0> is seekable: 0
gst_cam_base_src_start:<mfldv4l2camsrc0> is random_access: 0
gst_cam_base_src_negotiate:<mfldv4l2camsrc0> negotiate of pad vidsrc
gst_cam_base_src_activate_push:<mfldv4l2camsrc0> imgsrc activating in push mode
gst_cam_base_src_start:<mfldv4l2camsrc0> starting source of pad imgsrc
gst_cam_base_src_start:<mfldv4l2camsrc0> format: time, have size: 1, size: 18446744073709551615, duration: -1
gst_cam_base_src_start:<mfldv4l2camsrc0> is seekable: 0
gst_cam_base_src_start:<mfldv4l2camsrc0> is random_access: 0
gst_cam_base_src_negotiate:<mfldv4l2camsrc0> negotiate of pad imgsrc
gst_cam_base_src_activate_push:<mfldv4l2camsrc0> vfsrc activating in push mode
gst_cam_base_src_start:<mfldv4l2camsrc0> starting source of pad vfsrc
gst_cam_base_src_start:<mfldv4l2camsrc0> format: time, have size: 1, size: 18446744073709551615, duration: -1
gst_cam_base_src_start:<mfldv4l2camsrc0> is seekable: 0
gst_cam_base_src_start:<mfldv4l2camsrc0> is random_access: 0
gst_cam_base_src_negotiate:<mfldv4l2camsrc0> negotiate of pad vfsrc

gst_cam_base_src_perform_seek:<mfldv4l2camsrc0> doing seek: (NULL)
gst_cam_base_src_perform_seek:<mfldv4l2camsrc0> seek with seqnum 19
gst_cam_base_src_perform_seek:<mfldv4l2camsrc0> segment configured from 0 to -1, position 0
gst_cam_base_src_perform_seek:<mfldv4l2camsrc0> Sending newsegment from 0 to -1
gst_cam_base_src_loop:<mfldv4l2camsrc0> next_ts 99:99:99.999999999 size 4096
gst_cam_base_src_wait_playing:<mfldv4l2camsrc0> live source waiting for running state
gst_base_sink_query_latency:<sdlvideosink0> we are not yet ready for LATENCY query
gst_base_sink_query_latency:<sdlvideosink0> latency query failed and we are live
gst_base_sink_query:<sdlvideosink0> query latency returns 0
gst_base_sink_query_latency:<filesink0> we are not yet ready for LATENCY query
gst_base_sink_query_latency:<filesink0> latency query failed but we are not live
gst_base_sink_query_latency:<filesink0> latency query: live: 0, have_latency 0, upstream: 0, min 0:00:00.000000000, max 99:99:99.999999999
gst_base_sink_query:<filesink0> query latency returns 1
gst_cam_base_src_change_state:<mfldv4l2camsrc0> PAUSED->PLAYING
gst_cam_base_src_set_playing:<mfldv4l2camsrc0> unschedule clock
gst_cam_base_src_set_playing:<mfldv4l2camsrc0> live running 1
gst_cam_base_src_set_playing:<mfldv4l2camsrc0> unlock stop
gst_cam_base_src_set_playing:<mfldv4l2camsrc0> signal
gst_cam_base_src_wait_playing:<mfldv4l2camsrc0> live source unlocked
gst_cam_base_src_get_range:<mfldv4l2camsrc0> calling create offset 18446744073709551615 length 4096, time 0
gst_cam_base_src_do_sync:<mfldv4l2camsrc0> no latency needed, live 1, sync 0
gst_cam_base_src_do_sync:<mfldv4l2camsrc0> startup timestamp: 0:00:00.299494749, running_time 0:00:00.332892825
gst_cam_base_src_do_sync:<mfldv4l2camsrc0> no timestamp offset needed
gst_cam_base_src_do_sync:<mfldv4l2camsrc0> no sync needed
gst_cam_base_src_get_range:<mfldv4l2camsrc0> buffer ok
gst_base_sink_event:<sdlvideosink0> received event 0x8f49f68 newsegment event from 'vfsrc' at time 99:99:99.999999999: GstEventNewsegment, update=(boolean)false, rate=(double)1, applied-rate=(double)1, format=(GstFormat)GST_FORMAT_TIME, start=(gint64)0, stop=(gint64)-1, position=(gint64)0;
gst_base_sink_event:<sdlvideosink0> newsegment 0x8f49f68
gst_base_sink_configure_segment:<sdlvideosink0> configured NEWSEGMENT update 0, rate 1.000000, applied rate 1.000000, format GST_FORMAT_TIME, 0:00:00.000000000 -- 99:99:99.999999999, time 0:00:00.000000000, accum 0:00:00.000000000
gst_base_sink_queue_object_unlocked:<sdlvideosink0> now 0 prerolled items
gst_base_sink_queue_object_unlocked:<sdlvideosink0> need more preroll data 0 <= 0
gst_base_sink_chain_unlocked:<sdlvideosink0> got times start: 0:00:00.299494749, end: 0:00:00.332828082
gst_base_sink_queue_object_unlocked:<sdlvideosink0> now 1 prerolled items
gst_base_sink_preroll_object:<sdlvideosink0> prerolling object 0x8ddf300
gst_base_sink_preroll_object:<sdlvideosink0> preroll buffer 0:00:00.299494749
st_base_sink_set_last_buffer_unlocked:<sdlvideosink0> setting last buffer to 0x8ddf300
gst_base_sink_commit_state:<sdlvideosink0> commiting state to PAUSED
gst_base_sink_commit_state:<sdlvideosink0> posting PAUSED state change message
gst_base_sink_commit_state:<sdlvideosink0> posting async-done message
gst_base_sink_queue_object_unlocked:<sdlvideosink0> rendering queued object 0x8f49f68
gst_base_sink_do_sync:<sdlvideosink0> non syncable object 0x8f49f68
gst_base_sink_render_object:<sdlvideosink0> rendering event 0x8f49f68, type newsegment
gst_base_sink_render_object:<sdlvideosink0> Got seqnum #19
gst_base_sink_configure_segment:<sdlvideosink0> configured NEWSEGMENT update 0, rate 1.000000, applied rate 1.000000, format GST_FORMAT_TIME, 0:00:00.000000000 -- 99:99:99.999999999, time 0:00:00.000000000, accum 0:00:00.000000000
gst_base_sink_render_object:<sdlvideosink0> object unref after render 0x8f49f68
gst_base_sink_get_sync_times:<sdlvideosink0> got times start: 0:00:00.299494749, stop: 0:00:00.332828082, do_sync 1
gst_base_sink_do_preroll:<sdlvideosink0> prerolling object 0x8ddf300
gst_base_sink_preroll_object:<sdlvideosink0> prerolling object 0x8ddf300
gst_base_sink_wait_preroll:<sdlvideosink0> waiting in preroll for flush or PLAYING
3:gst_cam_base_src_event_handler:<mfldv4l2camsrc0> Hanlde event of pad vfsrc
1:gst_cam_base_src_default_event:<mfldv4l2camsrc0> handle event navigation event from 'src' at time 99:99:99.999999999: application/x-gst-navigation, event=(string)mouse-move, button=(int)0, pointer_x=(double)639, pointer_y=(double)179;
gst_cam_base_src_event_handler:<mfldv4l2camsrc0> Hanlde event of pad vfsrc

gst_cam_base_src_change_state:<mfldv4l2camsrc0> PLAYING->PAUSED
gst_cam_base_src_set_playing:<mfldv4l2camsrc0> unlock
gst_cam_base_src_set_playing:<mfldv4l2camsrc0> unschedule clock
gst_cam_base_src_set_playing:<mfldv4l2camsrc0> live running 0
gst_base_sink_set_flushing:<sdlvideosink0> flushing out data thread, need preroll to TRUE
gst_base_sink_preroll_queue_flush:<sdlvideosink0> flushing queue 0x8e8c0a0
gst_base_sink_wait_preroll:<sdlvideosink0> preroll interrupted because of flush
gst_base_sink_do_preroll:<sdlvideosink0> preroll failed -2
gst_base_sink_do_sync:<sdlvideosink0> preroll failed
gst_base_sink_render_object:<sdlvideosink0> do_sync returned wrong-state
gst_base_sink_render_object:<sdlvideosink0> object unref after render 0x8ddf300
gst_cam_base_src_loop:<mfldv4l2camsrc0> pausing after gst_pad_push() to vfpad = wrong-state
gst_cam_base_src_loop:<mfldv4l2camsrc0> pausing task, reason wrong-state
st_base_sink_set_last_buffer_unlocked:<sdlvideosink0> setting last buffer to (nil)
gst_base_sink_change_state:<sdlvideosink0> PAUSED to READY, don't need_preroll
gst_base_sink_set_flushing:<filesink0> flushing out data thread, need preroll to TRUE
gst_base_sink_preroll_queue_flush:<filesink0> flushing queue 0x8e86288
gst_base_sink_change_state:<filesink0> PAUSED to READY, posting async-done
gst_cam_base_src_activate_push:<mfldv4l2camsrc0> Deactivating in push mode
gst_cam_base_src_activate_push:<mfldv4l2camsrc0> Deactivating in push mode
gst_cam_base_src_activate_push:<mfldv4l2camsrc0> Deactivating in push mode
gst_cam_base_src_stop:<mfldv4l2camsrc0> stopping source
gst_cam_base_src_change_state:<mfldv4l2camsrc0> Sending EOS event

Thanks.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110114/2488a11e/attachment.htm>


More information about the gstreamer-devel mailing list