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 607939 - length of audio is faulty after 1 hour of continuous recording
length of audio is faulty after 1 hour of continuous recording
Status: RESOLVED OBSOLETE
Product: gnome-media
Classification: Deprecated
Component: Gnome-Sound-Recorder
2.28.x
Other other
: Normal normal
: ---
Assigned To: gnome media maintainers
gnome media maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-24 15:23 UTC by Ben Asselstine
Modified: 2015-01-19 11:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fixes duration-reporting at 1 hour of continuous recording (711 bytes, patch)
2010-01-24 15:23 UTC, Ben Asselstine
needs-work Details | Review
before.ogv: video of the bug in action (570.30 KB, application/octet-stream)
2010-01-24 15:25 UTC, Ben Asselstine
  Details
after.ogv: video of the same situation, but with the patch installed. (245.05 KB, application/octet-stream)
2010-01-24 15:26 UTC, Ben Asselstine
  Details

Description Ben Asselstine 2010-01-24 15:23:42 UTC
Created attachment 152153 [details] [review]
fixes duration-reporting at 1 hour of continuous recording

Hi,

If you let gnome-sound-recorder record audio for exactly 1 hour, it reports:
"0 minutes" as the "Length" (duration) of the audio recording.
One second after this point it appears like this: "0 minutes, and 1 second".

Please watch the attached video "before.ogv" to see the faulty behaviour in action on version 2.28.1 in Ubuntu's Karmic Koala.

Clearly the intent is for the text to read "1 hour", and "1 hour and 1 second" respectively.

See the attached file grecord-1-hour-duration-format.patch for a simple fix.  It is applied against the latest version in the git repository, but the patch hasn't been created with git.

I've also attached a video "after.ogv" that shows the program behaving properly with the patch installed.

cheers,

Ben
Comment 1 Ben Asselstine 2010-01-24 15:25:57 UTC
Created attachment 152154 [details]
before.ogv: video of the bug in action
Comment 2 Ben Asselstine 2010-01-24 15:26:50 UTC
Created attachment 152155 [details]
after.ogv: video of the same situation, but with the patch installed.
Comment 3 Marc-Andre Lureau 2010-01-24 15:47:05 UTC
Review of attachment 152153 [details] [review]:

::: gsr-window.c.orig
@@ +315,3 @@
 			if (seconds > 0) {
+				fmt = g_strdup_printf (_("%s and %s"), hourfmt, secondfmt);
+				/* Translators: the format is "X hours and X seconds" */

shouldn't it be hours & minutes instead?
Comment 4 Marc-Andre Lureau 2010-01-24 15:47:05 UTC
Review of attachment 152153 [details] [review]:

::: gsr-window.c.orig
@@ +315,3 @@
 			if (seconds > 0) {
+				fmt = g_strdup_printf (_("%s and %s"), hourfmt, secondfmt);
+				/* Translators: the format is "X hours and X seconds" */

shouldn't it be hours & minutes instead?
Comment 5 Ben Asselstine 2010-01-24 16:07:17 UTC
No, check again.
If you look outside of the patch into the context of the function, you'll see that it's in a minutes == 0 conditional block.
Comment 6 Marc-Andre Lureau 2010-01-24 16:10:56 UTC
(In reply to comment #5)
> No, check again.
> If you look outside of the patch into the context of the function, you'll see
> that it's in a minutes == 0 conditional block.

right
Comment 7 Bastien Nocera 2010-01-26 17:23:05 UTC
Maybe this should be shared between Totem and gnome-media, or you could just copy the "totem_time_to_string_text()" function from src/backend/video-utils.c
Comment 8 Marc-Andre Lureau 2010-01-26 17:27:21 UTC
(In reply to comment #7)
> Maybe this should be shared between Totem and gnome-media, or you could just
> copy the "totem_time_to_string_text()" function from src/backend/video-utils.c

it was taken from rhythmbox, iirc :)

should we propose it in glib?!

g_{datetime}_to_human_string() ?
Comment 9 Bastien Nocera 2015-01-19 11:33:54 UTC
gnome-media has been obsolete since the release of GNOME 3, nearly 4 years ago. Furthermore, the gnome-sound-recorder program in gnome-media has been replaced by the stand-alone, rewritten, gnome-sound-recorder program which has a different interface.

The new program should not be affected by the bugs you filed, however, please make sure to file new bugs against the gnome-sound-recorder product.