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 646211 - [camerabin] state changes need to be made when recording a video
[camerabin] state changes need to be made when recording a video
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
0.10.21
Other Linux
: High blocker
: 0.10.22
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-03-30 09:13 UTC by Raluca-Elena Podiuc
Modified: 2011-05-07 13:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case (2.84 KB, text/x-csrc)
2011-05-04 11:48 UTC, Thiago Sousa Santos
  Details
camerabin: Use running time for muxing (7.32 KB, patch)
2011-05-05 16:28 UTC, Thiago Sousa Santos
committed Details | Review

Description Raluca-Elena Podiuc 2011-03-30 09:13:41 UTC
Cheese had a problem (bug #645975): after recording a video or taking
a screenshot, the next video recording made was black-only.
After fiddling around a while I came up with this patch:


  g_object_set (priv->camerabin, "mode", MODE_VIDEO, NULL);
+  gst_element_set_state (priv->camerabin, GST_STATE_READY);
  g_object_set (priv->camerabin, "filename", filename, NULL);
  g_signal_emit_by_name (priv->camerabin, "capture-start", 0);
+  gst_element_set_state (priv->camerabin, GST_STATE_PLAYING);
  priv->is_recording = TRUE;


It's not very clear from the documentation why this hack is needed -
or if another better one should be proposed.

I have gstreamer0.10-plugins-bad 0.10.21-1ubuntu7 from Ubuntu 11.04.
I tried installing gstreamer + plugins from git but I just managed to
make all applications fail to render video at all and reverted to the
packaged version.
Comment 1 Thiago Sousa Santos 2011-04-28 01:35:06 UTC
I suspect this started when we changed oggmux to use running time instead of timestamps.

I added some additional logging to oggmux and it seems to confirm it. These are the running times of the first buffers arriving at oggmux.

First 0x991d1d8 0:00:00.000000000
Secnd 0x977aff8 0:00:06.168875715
First 0x991d1d8 0:00:00.013061224
Secnd 0x977aff8 0:00:06.168875715
First 0x991d1d8 0:00:00.036281179
Secnd 0x977aff8 0:00:06.168875715
Comment 2 Thiago Sousa Santos 2011-05-04 11:48:30 UTC
Created attachment 187178 [details]
Test case

This test case should reproduce the problem
Comment 3 Thiago Sousa Santos 2011-05-05 14:18:57 UTC
Promoting this one to a blocker, as it is a regression due to muxers being fixed and camerabin not.

I'm working on it.
Comment 4 Thiago Sousa Santos 2011-05-05 16:28:02 UTC
Created attachment 187293 [details] [review]
camerabin: Use running time for muxing

This patch removes the audio source buffer probe that was used
to re-timestamp buffers to make them start from 0. As muxers
have been fixed to use running time instead of timestamps, this
is not needed anymore.

Fixes bug #646211
Comment 5 Luciana Fujii 2011-05-05 17:24:42 UTC
Thanks for working on that.

I just tested this patch in cheese removing the workaround we had applied. Cheese with Camerabin is working definitely better with this patch, but I can't tell for sure if the initial problem was fixed because I didn't see black only videos, but only change in performance (less glitches in the videos).

Raluca, can you check if this solves the problem for you?
Comment 6 Thiago Sousa Santos 2011-05-06 16:00:35 UTC
Pushed the fix to -bad

72574962ef836fbf9f0837783b45a4800e4c9fb5


Raluca, if it still fails for your case, please reopen.
Comment 7 Raluca-Elena Podiuc 2011-05-06 18:41:12 UTC
Hi,
I tested it again. 

I got the repository for cheese and build it (without my patch)
I got the latest  gstreamer ppa because the gstreamer-plugins-bad wouldn't build with the version from ubuntu 11.04 

I tested it with and without my patch. It has the same behavior:

The camera recording is blocked in a frame for some time and after that continues to record. It does that several times and after.
Comment 8 Tim-Philipp Müller 2011-05-06 19:00:02 UTC
Thanks for trying the patch.

Are you absolutely sure the plugin with the patch applied was actually used? (if you compile from source the plugin will be installed into /usr/local/lib/gstreamer-0.10/ by default where it will not be found by the system gstreamer)
Comment 9 Raluca-Elena Podiuc 2011-05-06 19:43:12 UTC
I am not sure.
Could you tell me what to do to be sure?
Comment 10 Tim-Philipp Müller 2011-05-06 20:26:22 UTC
Maybe apply the patch and edit the same file and add a g_print ("here\n"); somewhere in the code :)
Comment 11 Raluca-Elena Podiuc 2011-05-06 20:38:56 UTC
I tried with "GST_PLUGIN_PATH=/usr/local/lib/gstreamer-0.10/ cheese" and this made cheese use git-compiled plugins-bad. I don't see any problems with or without my patch applied.
Comment 12 Tim-Philipp Müller 2011-05-06 21:54:31 UTC
> I tried with "GST_PLUGIN_PATH=/usr/local/lib/gstreamer-0.10/ cheese" and this
> made cheese use git-compiled plugins-bad. I don't see any problems with or
> without my patch applied.

So, just to confirm: Thiago's patch fixes the problem you saw before, and your patch on top of it doesn't make a difference - correct?
Comment 13 Raluca-Elena Podiuc 2011-05-07 13:44:28 UTC
Yes.