-
Notifications
You must be signed in to change notification settings - Fork 0
Move Photo and Video Mode into plugins #16
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
Conversation
ISNIT0
commented
Jan 11, 2025
- Move photo and video mode logic and controls into plugins
- Implement video pause & snapshot functionality
- Improve dynamic use-case loading
julianharty
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved subject to the comments for consideration.
| CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY -> 1 | ||
| CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED -> 2 | ||
| CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL -> 3 | ||
| CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_3 -> 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is intended to be identical to the previous use-case (_FULL) how about adding a comment to say this rather than simply setting it to the same value?
| val requiredUseCases: List<PluginUseCase> = | ||
| selectedModePlugin?.modeUseCases ?: emptyList() | ||
|
|
||
| // All use-cases (including not needed by selected plugin), but retaining the order from the selected plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v.minor suggested change to the comment to improve the grammar: "All use-cases (including those not needed by selected plugin), retaining the order of the selected plugin"
| } | ||
|
|
||
| val modeLabel: String? | ||
| get() = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you planning to expand/extend this code later?
| get() = null | ||
|
|
||
| val renderModeControl: @Composable() (() -> Unit)? | ||
| get() = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto: are you planning to expand/extend this code later?
| previousMode: String, | ||
| nextMode: String | ||
| ): Unit { | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this empty code for? Why is it needed?
| // Settings for the plugin | ||
| val settings: List<PluginSetting> | ||
| val settings: (viewModel: StoneCameraViewModel) -> List<PluginSetting> | ||
| get() = { emptyList() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be a TODO here?
| // Shutter button | ||
| Box( | ||
| modifier = Modifier | ||
| .size(60.dp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of hardcoded sizes... A trap for future maintenance.
| horizontalArrangement = Arrangement.SpaceEvenly, | ||
| verticalAlignment = Alignment.CenterVertically | ||
| ) { | ||
| // Camera Switcher Button |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm very glad these comments exist, otherwise it'd be vary difficult to guess what the code does.
| if (isPaused) { | ||
| Icon( | ||
| imageVector = Icons.Filled.PlayArrow, | ||
| contentDescription = "Resume Recording", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Localisation to come, I hope.