Bugfix: proper usage of abort() for finishing a capture sequence queue

Authored by wreissenberger on Mar 18 2019, 5:09 AM.

Description

Bugfix: proper usage of abort() for finishing a capture sequence queue

Summary:
Before diff D19528, abort events in the capture module where not always communicated to the scheduler. As a result, an aborted guiding was never restarted and brought the scheduler and the capture module out of sync. The scheduler thought that the capture was running while it already had been aborted.

Unfortunately, the Capture::abort() function is also used for properly terminating a capture session. If a capture session has been completed, stop() is called and then abort(), resulting in an unexpected abort event in the scheduler.

If a scheduler restarts a capture session, this abort event from the previous run leads to the situation, that Capture::start() is called twice, which leads to the situation that the first entry of the capture sequence is skipped.

Test Plan:

  • Create a capture session with at least two entries.
  • Create a schedule that uses this session and runs at least twice.
  • Start the schedule and check, whether in the second run of the capture session all session entries are executed properly. Without this diff, the first session entry is skipped except for the first run. With this diff, everything should work properly.

Reviewers: mutlaqja, TallFurryMan

Reviewed By: mutlaqja

Subscribers: kde-edu

Tags: KDE Edu

Differential Revision: https://phabricator.kde.org/D19840