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

[camera] MediaSettings parameter for createCameraWithSettings #3586

Merged
merged 159 commits into from
May 6, 2024

Conversation

PROGrand
Copy link
Contributor

@PROGrand PROGrand commented Mar 29, 2023

This PR is for enabling fps and bitrate control of recorded video.
Allow users to more control over recorded video size.
CameraPlatform.createCameraWithSettings is added, leaving original CameraPlatform.createCamera commented as deprecated. So this is not breaking change.
Tested on a set of mobile devices.
Web support depends on browser (perfect with Firefox).

Fixes flutter/flutter#54339

@PROGrand
Copy link
Contributor Author

PROGrand commented Mar 29, 2023

This is main PR. Platform interface's PR is here: #3615

Copy link
Contributor

@hellohuanlin hellohuanlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. This is very nice feature to have. Can you share a video capture after this change?

packages/camera/camera/CHANGELOG.md Outdated Show resolved Hide resolved
packages/camera/camera/README.md Outdated Show resolved Hide resolved
packages/camera/camera/example/pubspec.yaml Outdated Show resolved Hide resolved
packages/camera/camera/pubspec.yaml Outdated Show resolved Hide resolved
packages/camera/camera_avfoundation/ios/Classes/FLTCam.m Outdated Show resolved Hide resolved
packages/camera/camera_avfoundation/ios/Classes/FLTCam.m Outdated Show resolved Hide resolved
packages/camera/camera_avfoundation/ios/Classes/FLTCam.m Outdated Show resolved Hide resolved
packages/camera/camera_avfoundation/ios/Classes/FLTCam.m Outdated Show resolved Hide resolved
PROGrand and others added 5 commits March 31, 2023 01:12
@@ -100,6 +100,7 @@ Here is a small example flutter app displaying a full screen camera preview.
<?code-excerpt "readme_full_example.dart (FullAppExample)"?>
```dart
import 'package:camera/camera.dart';
import 'package:camera_platform_interface/camera_platform_interface.dart';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still here.

@@ -4,6 +4,7 @@

// #docregion FullAppExample
import 'package:camera/camera.dart';
import 'package:camera_platform_interface/camera_platform_interface.dart';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.

packages/camera/camera/README.md Outdated Show resolved Hide resolved
packages/camera/camera/example/pubspec.yaml Outdated Show resolved Hide resolved
Comment on lines 237 to 244
CameraController(
CameraDescription description,
this.resolutionPreset, {
this.enableAudio = true,
ResolutionPreset resolutionPreset, {
bool enableAudio = true,
this.imageFormatGroup,
}) : mediaSettings = MediaSettings(
resolutionPreset: resolutionPreset, enableAudio: enableAudio),
super(CameraValue.uninitialized(description));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hasn't been addressed.

@PROGrand
Copy link
Contributor Author

PROGrand commented Apr 17, 2024

@stuartmorgan
#3586 (comment)

Sorry, what did you mean?

@stuartmorgan
Copy link
Contributor

@stuartmorgan #3586 (comment)

Sorry, what did you mean?

#3586 (comment)

@PROGrand
Copy link
Contributor Author

@stuartmorgan
Unwrapped media settings class into parameters and added to CameraController constructor as optionals. Is it acceptable?

@PROGrand PROGrand requested a review from stuartmorgan April 20, 2024 08:32
Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stuartmorgan stuartmorgan added the autosubmit Merge PR when tree becomes green via auto submit App label May 6, 2024
@auto-submit auto-submit bot merged commit 2dfe645 into flutter:main May 6, 2024
78 checks passed
vashworth pushed a commit to vashworth/packages that referenced this pull request May 6, 2024
…r#3586)

This PR is for enabling fps and bitrate control of recorded video.
Allow users to more control over recorded video size.
`CameraPlatform.createCameraWithSettings` is added, leaving original `CameraPlatform.createCamera` commented as deprecated. So this is not breaking change.
Tested on a set of mobile devices.
Web support depends on browser (perfect with Firefox).

Fixes flutter/flutter#54339
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request May 6, 2024
flutter/packages@f4719ca...2dfe645

2024-05-06 [email protected] [camera] MediaSettings parameter for createCameraWithSettings (flutter/packages#3586)
2024-05-06 [email protected] Fix unnecessary toList/fromList calls during encode/decode process (flutter/packages#6426)
2024-05-03 [email protected] Roll Flutter from bf7191f to f1037a0 (21 revisions) (flutter/packages#6641)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
TecHaxter pushed a commit to TecHaxter/flutter_packages that referenced this pull request May 22, 2024
…ed) (flutter#5223)

This is the `platform implementations` part of `camera` PR flutter#3586.

`camera_platform_interface: 2.6.0` merged and published in PR flutter#3615.

Now repeating steps 3,4 (see [Changing federated plugins](https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#changing-federated-plugins)), because `camera/camera` depends on implementations `camera/camera_android`, `camera/camera_web` etc.
TecHaxter pushed a commit to TecHaxter/flutter_packages that referenced this pull request May 22, 2024
…r#3586)

This PR is for enabling fps and bitrate control of recorded video.
Allow users to more control over recorded video size.
`CameraPlatform.createCameraWithSettings` is added, leaving original `CameraPlatform.createCamera` commented as deprecated. So this is not breaking change.
Tested on a set of mobile devices.
Web support depends on browser (perfect with Firefox).

Fixes flutter/flutter#54339
arc-yong pushed a commit to Arctuition/packages-arc that referenced this pull request Jun 14, 2024
…ed) (flutter#5223)

## Platform implementations of federated plugin

This is the `platform implementations` part of `camera` PR flutter#3586.

`camera_platform_interface: 2.6.0` merged and published in PR flutter#3615.

Now repeating steps 3,4 (see [Changing federated plugins](https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#changing-federated-plugins)), because `camera/camera` depends on implementations `camera/camera_android`, `camera/camera_web` etc.
arc-yong pushed a commit to Arctuition/packages-arc that referenced this pull request Jun 14, 2024
…r#3586)

This PR is for enabling fps and bitrate control of recorded video.
Allow users to more control over recorded video size.
`CameraPlatform.createCameraWithSettings` is added, leaving original `CameraPlatform.createCamera` commented as deprecated. So this is not breaking change.
Tested on a set of mobile devices.
Web support depends on browser (perfect with Firefox).

Fixes flutter/flutter#54339
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App federated: all_changes PR that contains changes for all packages for a federated plugin change p: camera
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[camera] Support custom frame rate and bit rate