- Changed the countdown display to show in the format hh:mm:ss (AutoRecordWidget.py)
- Completed the countdown display. Now both the time until the start of recording and the time remaining until end of recording show up on the screen (record.py)
- Added code for starting and stopping the auto-recording, in the case where user doesn't manually exit auto-recording (record.py). I spent a veeeeeeery long time debugging this part. The timer for the countdown display and the timer for the wait time before the start of the recording are different. For the wait timer, at first I tried to use QThread's wait(). Then I tried Python time module's sleep(). But this puts the whole Freeseer program to sleep(), including the countdown display. So then I switched to using two QTimer objects, one for waiting until the start of a recording, and the other for waiting until the end of a recording. But somehow the interaction between these two timers messes up the code. So I tried to use just one timer for both countdown. Theoretically it should work, since the two countdowns don't overlap. However, even though I stopped and reset the timer where I think is appropriate, after starting the recording, the timeout signal causes one method to be called repeatedly before the recording stops, thus starting the recording a second time, a third time, a fourth time,..., before it ever stops. In the end, I switched to using QTimer's static function singleShot(). This way, there is no timer instances, and thus no resetting problems. and FINALLY IT WORKED!!! YAY!!! \o/
Plans for next week
- Right before the start of recording, countdown shows 00:00:01 instead of 00:00:00. Need to fix it
- Make the countdown display more readable: change the font, size, and position of the text and countdown
- Implement the following cases for stop auto-recording:
- case 1: user doesn't manually exit auto-recording, but there are no more talks to record. We need to exit the auto-record screen after the last talk
- case 2: auto-recording isn't finished, but user decides to quit by pressing the "Stop auto-record". Then we need to exit and screen and stop recording right away
- If no talk satisfies the room and time condition for auto-recording in the first place, show message dialog box that informs the user of this
None.
No comments:
Post a Comment