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

Rework Video Capture backend to allow better isolation. #573

Merged
merged 1 commit into from
Jul 29, 2018

Conversation

bsmiles32
Copy link
Member

By adding init and release methods to video capture backend interface
we can completely separate implementation details from usage.
We don't need to include (nor have) backend implementation header,
and therefore can use true C++ for opencv implementation
(no need for in-place ctor, explicit call to dtor, ...).

Also, backend selection is done by name and multiple instanciation (with
different parameters) can be done by selecting the right config section.

Default video capture backend may be overrided at compile-time by
defining DEFAULT_VIDEO_CAPTURE_BACKEND to appropriate value.

Video input has been renamed to Video Capture.

If this PR gets merged, I will try to use the same pattern for other backends. This is a prelimiary step before audio/input plugin inclusion (as backend) inside the core.

For those who remember, the design is quite similar to what I did in a defunct PR mupen64plus/mupen64plus-ui-console#19.

By adding init and release methods to video capture backend interface
we can completely separate implementation details from usage.
We don't need to include (nor have) implementation header,
and therefore can use true C++ for opencv implementation
(no need for in-place ctor, explicit call to dtor, ...).

Also, backend selection is done by name and multiple instanciation (with
different parameters) can be done by selecting the right config section.

Default video capture backend may be overrided at compile-time by
defining DEFAULT_VIDEO_CAPTURE_BACKEND to appropriate value.

Video input has been renamed to Video Capture.
@richard42 richard42 merged commit 2c66c25 into mupen64plus:master Jul 29, 2018
@bsmiles32 bsmiles32 deleted the vcap branch February 1, 2021 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants