Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor + Cleanup ScanContext #33

Closed
Breakthrough opened this issue Aug 24, 2020 · 2 comments
Closed

Refactor + Cleanup ScanContext #33

Breakthrough opened this issue Aug 24, 2020 · 2 comments

Comments

@Breakthrough
Copy link
Owner

Breakthrough commented Aug 24, 2020

The number of lines in the scan_motion() method of ScanContext is quite high, and lots of development artifacts still exist. Cleanup and reduce max function length by breaking existing method down into smaller parts, to improve reusability + eventual integration with new PySceneDetect API.

@Breakthrough Breakthrough changed the title Rewrite using new PySceneDetect v0.6 API Refactor + Cleanup ScanContext Aug 30, 2020
Breakthrough added a commit that referenced this issue Feb 3, 2021
@Breakthrough Breakthrough added this to the v1.2 milestone Feb 3, 2021
@Breakthrough
Copy link
Owner Author

Further complexity reduction can be achieved by re-using certain classes/modules from PySceneDetect, as well as reduce code duplication. In particular:

The only downside to having scenedetect as a dependency is that it would bring in Click, which is not used by DVR-Scan. This may require splitting scenedetect into multiple packages, moving the CLI to an optional feature, or just transitioning DVR-Scan to use Click.

Breakthrough added a commit that referenced this issue Feb 8, 2021
After this change, FrameTimecode can be deprecated & removed in
place of scenedetect.FrameTimecode seamlessly.
Breakthrough added a commit that referenced this issue Feb 8, 2021
Add new _select_roi method to ScanContext.
Add new _create_progress_bar method to ScanContext.
Make line argument of ScanContext._stamp_text method optional.
Rename roi and draw_timestamp properties to indicate private.
@Breakthrough
Copy link
Owner Author

Replacements with equivalents will not happen until v2.0. Right now focus should be on minimum changes to get basic testing functionality up and running, and close out development of v1.x right after to focus on 2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant