Skip to content

[camera] MediaSettings parameter for createCameraWithSettings - #3586

Merged
auto-submit[bot] merged 159 commits into
flutter:mainfrom
mtbo-org:main
May 6, 2024
Merged

[camera] MediaSettings parameter for createCameraWithSettings#3586
auto-submit[bot] merged 159 commits into
flutter:mainfrom
mtbo-org:main

Conversation

@PROGrand

@PROGrandPROGrand commented Mar 29, 2023

Copy link
Copy Markdown
Contributor

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).

Fixesflutter/flutter#54339

@PROGrand

PROGrand commented Mar 29, 2023

Copy link
Copy Markdown
ContributorAuthor

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

@hellohuanlinhellohuanlin left a comment

Copy link
Copy Markdown
Contributor

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?

Comment threadpackages/camera/camera/CHANGELOG.md Outdated
Comment threadpackages/camera/camera/README.md Outdated
Comment threadpackages/camera/camera/example/integration_test/camera_test.dart Outdated
Comment threadpackages/camera/camera/example/pubspec.yaml Outdated
Comment threadpackages/camera/camera/pubspec.yaml Outdated
Comment threadpackages/camera/camera_avfoundation/ios/Classes/FLTCam.m Outdated
Comment threadpackages/camera/camera_avfoundation/ios/Classes/FLTCam.m Outdated
Comment threadpackages/camera/camera_avfoundation/ios/Classes/FLTCam.m Outdated
Comment threadpackages/camera/camera_avfoundation/ios/Classes/FLTCam.m Outdated
Comment threadpackages/camera/camera/README.md Outdated
<?code-excerpt "readme_full_example.dart (FullAppExample)"?>
```dart
import 'package:camera/camera.dart';
import 'package:camera_platform_interface/camera_platform_interface.dart';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is still here.


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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same.

Comment threadpackages/camera/camera/README.md Outdated
Comment threadpackages/camera/camera/example/pubspec.yaml Outdated
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
Copy Markdown
Collaborator

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

PROGrand commented Apr 17, 2024

Copy link
Copy Markdown
ContributorAuthor

@stuartmorgan
#3586 (comment)

Sorry, what did you mean?

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

@stuartmorgan#3586 (comment)

Sorry, what did you mean?

#3586 (comment)

@PROGrand

Copy link
Copy Markdown
ContributorAuthor

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

@stuartmorgan-gstuartmorgan-g left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmitMerge PR when tree becomes green via auto submit Appfederated: all_changesPR that contains changes for all packages for a federated plugin changep: camera

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[camera] Support custom frame rate and bit rate

12 participants

@PROGrand@hellohuanlin@reidbaker@stuartmorgan-g@gmackall@ebjorklund01@deucks@yassinekassis@evaboen@ditman@bparrishMines@camsim99