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: Avoid hanging when capture device permissions denied on macOS. #300

Merged
merged 3 commits into from
Dec 25, 2024

Conversation

iphydf
Copy link
Member

@iphydf iphydf commented Dec 24, 2024

This would happen e.g. on activating screen capture, but then denying permissions for it in the popup dialog. This doesn't exactly hang the program, but prevents any further changes to the capture device setting, and will hang the program on shutdown (in the destructor of the camera device).

The drive-by cleanups seem to have fixed the crash when changing video devices as well.


This change is Reviewable

@iphydf iphydf added this to the v1.18.0 milestone Dec 24, 2024
@github-actions github-actions bot added the bug Bug fix for the user, not a fix to a build script label Dec 24, 2024
@iphydf iphydf force-pushed the no-hang-on-perms branch 17 times, most recently from 95b45b6 to 75a357b Compare December 24, 2024 15:51
This would happen e.g. on activating screen capture, but then denying
permissions for it in the popup dialog. This doesn't exactly hang the
program, but prevents any further changes to the capture device setting,
and will hang the program on shutdown (in the destructor of the camera
device).
Copy link

codecov bot commented Dec 25, 2024

Codecov Report

Attention: Patch coverage is 0.90909% with 109 lines in your changes missing coverage. Please review.

Project coverage is 11.02%. Comparing base (ffcef56) to head (52d8c6d).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
src/video/cameradevice.cpp 0.00% 67 Missing ⚠️
src/widget/form/settings/avform.cpp 0.00% 15 Missing ⚠️
src/video/scopedavdictionary.cpp 0.00% 12 Missing ⚠️
src/video/camerasource.cpp 0.00% 6 Missing ⚠️
src/video/videomode.h 0.00% 6 Missing ⚠️
src/video/videomode.cpp 0.00% 2 Missing ⚠️
src/platform/camera/v4l2.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #300      +/-   ##
==========================================
- Coverage   11.03%   11.02%   -0.01%     
==========================================
  Files         294      296       +2     
  Lines       21449    21442       -7     
==========================================
- Hits         2366     2365       -1     
+ Misses      19083    19077       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@iphydf iphydf merged commit 52d8c6d into TokTok:master Dec 25, 2024
24 of 27 checks passed
@iphydf iphydf deleted the no-hang-on-perms branch December 25, 2024 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug fix for the user, not a fix to a build script
Development

Successfully merging this pull request may close these issues.

2 participants