Package: jack / 3.1.1+cvs20050801-31

31_real_bitrate_progress.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Put the real bitrate in the progress file.  In case of VBR, jack used to
put the bitrate of CBR into the jack.progress file.  (Actually, why does
track[RATE] not always contain the real rate?)  Or maybe we should put the
chosen quality rating in the progress file in case of OGG?

diff -urN c/jack_main_loop.py jack-3.1.1+cvs20050801/jack_main_loop.py
--- c/jack_main_loop.py	2006-02-07 00:57:23.000000000 +0000
+++ jack-3.1.1+cvs20050801/jack_main_loop.py	2006-02-07 01:17:15.000000000 +0000
@@ -344,13 +344,14 @@
                     else:
                         global_done = global_done + exited_proc['track'][LEN]
                         if cf['_vbr']:
-                            jack_status.enc_stat_upd(num, "[coding @" + '%s' % jack_functions.pprint_speed(speed) + "x done, %03.0fkbit]" % ((jack_utils.filesize(track[NAME] + ext) * 0.008) / (track[LEN] / 75.0)))
+                            rate = int((jack_utils.filesize(track[NAME] + ext) * 0.008) / (track[LEN] / 75.0))
                         else:
-                            jack_status.enc_stat_upd(num, "[coding @" + '%s' % jack_functions.pprint_speed(speed) + "x done, mp3 OK]")
+                            rate = track[RATE]
+                        jack_status.enc_stat_upd(num, "[coding @" + '%s' % jack_functions.pprint_speed(speed) + "x done, %dkbit" % rate)
+                        jack_functions.progress(num, "enc", `rate`, jack_status.enc_status[num])
                         if not cf['_otf'] and not cf['_keep_wavs']:
                             os.remove(track[NAME] + ".wav")
                             space = space + jack_functions.tracksize(track)[WAV]
-                        jack_functions.progress(num, "enc", `track[RATE]`, jack_status.enc_status[num])
 
                 else:
                     error("child process of unknown type (" + exited_proc['type'] + ") exited")