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

fix start/stop preview #1481

Merged
merged 1 commit into from May 12, 2024
Merged

fix start/stop preview #1481

merged 1 commit into from May 12, 2024

Conversation

constambeys
Copy link
Contributor

No description provided.

@pedroSG94
Copy link
Owner

Hello,

Can you tell me the reason to change it?
This changes provide side effects that I don't like in Camera1Base. For example in stopPreview, if you call is while streaming/recording the camera will be stoppped.

@constambeys
Copy link
Contributor Author

Hi,

I liked your project, is very good, and I use it with some modifications to monitor my house from a mobile device.

However the last time I used it the phone was getting very hot because it was processing the camera feed continuously.

So I call stopPreview and startPreview every time I connect/disconnect but these methods did not work, so I made this change !

I think this change is logical because the only variable that changes in these methods is the onPreview.

Thanks
Timotheos Constambeys

@pedroSG94
Copy link
Owner

I see but this change the backwards compatibility so I think that the best idea is create a new method for it.

@pedroSG94 pedroSG94 merged commit 2c36a34 into pedroSG94:master May 12, 2024
@pedroSG94
Copy link
Owner

pedroSG94 commented May 12, 2024

Hello,

I fixed it. To allow this feature I added the method stopCamera.
stopCamera method is the same that stopPreview but allow do it while streaming/recording
stopPreview keep the same functionality for backwards compatibility

Thank your for the PR

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.

None yet

2 participants