GNOME Bugzilla – Bug 613379
camerabin: Do not use audio clock after stopping video capture
Last modified: 2012-10-21 18:53:35 UTC
How to reproduce: * send capture-start signal in video capturing mode * send capture-stop to stop capturing * camerabinvideo0 element in GST_STATE_READY not in GST_STATE_PLAYING state
Looks like I messed things since camerabinvideo0 is capturing bin, but issue is still here - autovideosink0 is in GST_STATE_PLAYING state but picture is frozen. Code to reproduce issue: import gtk import gst import gobject pipe = gst.Pipeline('pipeline') camerabin = gst.element_factory_make('camerabin', 'camerabin') camerabin.props.flags |= (1 << 1) | (1 << 4) videorate = gst.element_factory_make('videorate') camerabin.props.video_post_processing = videorate pipe.add(camerabin) pipe.set_state(gst.STATE_PLAYING) def start(): camerabin.props.mode = 1 camerabin.props.filename = 'video.ogg' camerabin.emit('capture-start') gobject.timeout_add(1000, start) def stop(): camerabin.emit('capture-stop') gobject.timeout_add(5000, stop) gtk.main()
Sorry for the noise, I just `git pull`ed gst stack and it works fine
Reopened ticket, since I accidentally disabled audio capture thus couldn't reproduce issue. After investigation, after sending "capture-stop" event, I got bunch of drops basesink gstbasesink.c:3402:gst_base_sink_chain_unlocked:<autovideosink0-actual-sink-xvimage> dropping buffer, out of clipping segment it was because of clock in camerabin pipeline as from audiosrc even after stopping video capture. Attached patch returns audio clock only in capturing mode.
Created attachment 156637 [details] [review] Do not use audio clock after stopping video capture
Created attachment 156668 [details] [review] Add GST_INFO
Created attachment 174625 [details] [review] camerabin: Do not use audio clock after stopping video capture Fixes #613379
Aleksey, can you check if this patch fixes the problem for you? It is a simplification of your own patch.
Created attachment 174771 [details] [review] camerabin: Do not use audio clock after stopping video capture Ended up attaching the same patch, this is the correct one.
Pushed this simplified version of the patch. commit d66ef4dea8d8c5bb39e445db788cb45d59a4e206 Author: Aleksey Lim <alsroot@member.fsf.org> Date: Thu Nov 18 10:58:06 2010 -0300 camerabin: Do not use audio clock after stopping video capture Adda provide clock function to camerabin to make it not provide the audio clock of the record bin when no video recording is happening Fixes #613379 Feel free to reopen if it still doesn't fix it to you.
Created attachment 175197 [details] [review] Reset clock after stopping video capturing
The initial problem still remains for me, i.e., python example, mentioned above, doesn't work as assumed. For me it: * video sink shows the camera video * video capturing stared * video capturing stopped and video.ogg saved * video sink frozen If I got it right, after stoping capturing (but not stopping camerabin), clock is still the same. With previously attached patch, "unfreeze" the video sink.
btw, what is your audio source? Can you check what autoaudiosrc defaults to using? pulsesrc? alsasrc? other? Running a simple gst-launch autoaudiosrc num-buffers=1 ! fakesink -v should tell you.
(In reply to comment #12) > btw, what is your audio source? > > Can you check what autoaudiosrc defaults to using? pulsesrc? alsasrc? other? > > Running a simple gst-launch autoaudiosrc num-buffers=1 ! fakesink -v > > should tell you. Mine is alsa (pulse is not installed).
The old 0.10 camerabin(1) element has been replaced with camerabin2 ('camerabin' in 1.0) quite some time ago, so I don't think bugs relating to the old camerabin are going to get looked at any more. I'm therefore closing this bug as obsolete. Please do re-test with the camerabin element from GStreamer 1.x and re-open this bug or file a new one if there are still issues, thanks!