After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 613379 - camerabin: Do not use audio clock after stopping video capture
camerabin: Do not use audio clock after stopping video capture
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.21
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-03-20 01:44 UTC by Aleksey Lim
Modified: 2012-10-21 18:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Do not use audio clock after stopping video capture (4.17 KB, patch)
2010-03-20 21:34 UTC, Aleksey Lim
none Details | Review
Add GST_INFO (5.55 KB, patch)
2010-03-21 12:03 UTC, Aleksey Lim
none Details | Review
camerabin: Do not use audio clock after stopping video capture (5.74 KB, patch)
2010-11-16 18:33 UTC, Thiago Sousa Santos
none Details | Review
camerabin: Do not use audio clock after stopping video capture (3.83 KB, patch)
2010-11-18 14:00 UTC, Thiago Sousa Santos
committed Details | Review
Reset clock after stopping video capturing (1.84 KB, patch)
2010-11-24 19:37 UTC, Aleksey Lim
none Details | Review

Description Aleksey Lim 2010-03-20 01:44:37 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
Comment 1 Aleksey Lim 2010-03-20 02:26:07 UTC
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()
Comment 2 Aleksey Lim 2010-03-20 09:11:15 UTC
Sorry for the noise, I just `git pull`ed gst stack and it works fine
Comment 3 Aleksey Lim 2010-03-20 21:32:39 UTC
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.
Comment 4 Aleksey Lim 2010-03-20 21:34:12 UTC
Created attachment 156637 [details] [review]
Do not use audio clock after stopping video capture
Comment 5 Aleksey Lim 2010-03-21 12:03:32 UTC
Created attachment 156668 [details] [review]
Add GST_INFO
Comment 6 Thiago Sousa Santos 2010-11-16 18:33:21 UTC
Created attachment 174625 [details] [review]
camerabin: Do not use audio clock after stopping video capture

Fixes #613379
Comment 7 Thiago Sousa Santos 2010-11-16 18:35:17 UTC
Aleksey, can you check if this patch fixes the problem for you?

It is a simplification of your own patch.
Comment 8 Thiago Sousa Santos 2010-11-18 14:00:37 UTC
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.
Comment 9 Thiago Sousa Santos 2010-11-18 14:02:24 UTC
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.
Comment 10 Aleksey Lim 2010-11-24 19:37:49 UTC
Created attachment 175197 [details] [review]
Reset clock after stopping video capturing
Comment 11 Aleksey Lim 2010-11-24 19:43:54 UTC
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.
Comment 12 Thiago Sousa Santos 2010-11-26 13:32:18 UTC
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.
Comment 13 Aleksey Lim 2010-11-26 14:13:17 UTC
(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).
Comment 14 Tim-Philipp Müller 2012-10-21 18:53:35 UTC
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!