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 161315 - should display track length, not file size, in overwrite dialog
should display track length, not file size, in overwrite dialog
Status: RESOLVED FIXED
Product: sound-juicer
Classification: Applications
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Sound Juicer Maintainers
Sound Juicer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-12-14 21:32 UTC by Luis Villa
Modified: 2008-04-17 09:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sj-skip-overwrite-mockup.png (19.22 KB, image/png)
2008-02-28 22:47 UTC, Luca Cavalli
  Details
egg-play-preview.tar.bz2 (4.08 KB, application/x-bzip)
2008-02-29 13:41 UTC, Luca Cavalli
  Details
egg-play-preview.tar.bz2 (5.51 KB, application/x-compressed-tar)
2008-03-11 23:17 UTC, Luca Cavalli
  Details
Screenshot-egg-play-preview-test.png (8.80 KB, image/png)
2008-03-12 10:09 UTC, Luca Cavalli
  Details
egg-play-preview.tar.bz2 (6.06 KB, application/x-bzip )
2008-03-12 21:24 UTC, Luca Cavalli
  Details
sj-play-preview.patch (31.07 KB, patch)
2008-03-15 00:42 UTC, Luca Cavalli
none Details | Review
sj-play-preview-2.patch (31.09 KB, patch)
2008-03-21 21:30 UTC, Luca Cavalli
committed Details | Review
sound-juicer-skip-overwrite.png (24.34 KB, image/png)
2008-03-21 21:31 UTC, Luca Cavalli
  Details

Description Luis Villa 2004-12-14 21:32:52 UTC
Currently, when asking if you want to overwrite a file with the same name, s-j
gives you the file length, which unless it is very close to zero, isn't very
useful. It would be nice if instead s-j queried the file and figured out the
length of the track, giving that instead. Ideally it could even compare it to
the length of the track on the CD :) I find I'm seeing the dialog a lot because
of crashes/corrupt files, so this would help me figure out if I'm being prompted
to overwrite a 'whole' file, or if I'm being prompted to overwrite a
shortened/corrupted file.
Comment 1 Matthew Martin 2008-02-28 21:29:06 UTC
I'm working on this.
Comment 2 Luca Cavalli 2008-02-28 22:47:44 UTC
Created attachment 106201 [details]
sj-skip-overwrite-mockup.png

I was working on this bug too, but I stop here, so you can go on. I'm attaching a mockup and tomorrow I will add the source code of the player widget I'm writing (I don't have the tarball here with me).
Comment 3 Luca Cavalli 2008-02-28 22:49:45 UTC
Hem, a typo in the image. "exixts" should be "exist" :)
Comment 4 Matthew Martin 2008-02-28 23:10:28 UTC
Please don't stop working on this because I started. That looks very nice. I'll just find another bug. :)
Comment 5 Luca Cavalli 2008-02-29 13:41:28 UTC
Created attachment 106250 [details]
egg-play-preview.tar.bz2

This is an alpha version of the widget in the mockup.
Comment 6 Ross Burton 2008-02-29 13:53:19 UTC
Ooh, cute!
Comment 7 Luca Cavalli 2008-03-11 23:17:29 UTC
Created attachment 107105 [details]
egg-play-preview.tar.bz2

The widget is almost here (with some changes in the UI). I still have to add seeking capabilities and a timer to keep track of the time elapsing, plus the usual code clean-up and needed credits (I gave more than a look to Brasero, gakuraku and gst-player).
However, I still have a problem: gst_element_query_duration always returns FALSE. I have found a very nice tutorial about gst programming and I'll try to solve the problem in the next few days, but any help will be much, much apreciated :)
If you wish to test the widget remember to edit egg-play-preview-test.c and replace my URI with one pointing to one of your audio files.
Comment 8 Ross Burton 2008-03-12 10:05:09 UTC
Sweet, thanks for this.
Comment 9 Luca Cavalli 2008-03-12 10:09:11 UTC
Created attachment 107134 [details]
Screenshot-egg-play-preview-test.png

Thanks to Matthew Martin the query duration problem is now gone :)
Comment 10 Ross Burton 2008-03-12 10:15:22 UTC
Very nice.  When you think its ready, I'll give it a go.
Comment 11 Luca Cavalli 2008-03-12 21:24:23 UTC
Created attachment 107177 [details]
egg-play-preview.tar.bz2

The widget is now complete (still need some code cleanup).
This is my first try with gstreamer, so comments and suggestions are even more appreciated than usual.
In the next few days I will prepare a patch to add a dialog similar to the mockup attached to comment #2.
Comment 12 Luca Cavalli 2008-03-15 00:42:41 UTC
Created attachment 107325 [details] [review]
sj-play-preview.patch

First of all a big warning:
With latest upgrade of my Ubuntu Hardy all gstreamer/audio related applications segfault when try to play something. This is my only PC, so I can't test the patch (the widget itself was already tested).

As already reported this is my first gstreamer work, so double check the patch if you want to commit it :)
Comment 13 Luca Cavalli 2008-03-21 21:30:09 UTC
Created attachment 107758 [details] [review]
sj-play-preview-2.patch

Today Ubuntu upgraded gstreamer package and now all sound related applications work again, so I could test the patch and fix a little bug.

> Very nice.  When you think its ready, I'll give it a go.

Ross, I think it is now ready for a first ride :)
Comment 14 Luca Cavalli 2008-03-21 21:31:54 UTC
Created attachment 107759 [details]
sound-juicer-skip-overwrite.png

Play preview widget live action!
What do you think about final dialog layout?
Comment 15 Luca Cavalli 2008-03-21 22:27:16 UTC
I forgot to add src/egg-play-preview.c to po/POTFILES. I will add it when I'll update the patch next time.
Comment 16 Ross Burton 2008-04-17 08:50:08 UTC
Luca, I've just committed this.  One problem remains though, when I tried skipping to near the end of the song it wouldn't play any more.

This is probably because I'm writing VBR files with broken duration headers, thanks to a gnome-profiles bug, but if you could have a quick look that would be great.
Comment 17 Luca Cavalli 2008-04-17 09:02:29 UTC
thanks Ross :)
Sure, I will give a look at the issue.
Can you send me the gstreamer pipeline, so I can create a new audio profile entry similar to yours?
Does playing those VBR files in a real media player like totem give you the same problem?
Comment 18 Ross Burton 2008-04-17 09:12:27 UTC
Yes, I'm seeing garbage duration headers everywhere with the standard MP3 pipeline in GNOME.   I've just tried adding xingmux to the pipeline which apparently helps, I'll try later.  That said, the widget should let me seek past the end and then back to the beginning, at the moment once I seek past the end I can't play it any more.