-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[video_player_avfoundation] Adds Swift Package Manager compatibility #6634
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
[video_player_avfoundation] Adds Swift Package Manager compatibility #6634
Conversation
@@ -4,7 +4,7 @@ | |||
// Autogenerated from Pigeon (v18.0.0), do not edit directly. | |||
// See also: https://pub.dev/packages/pigeon | |||
|
|||
#import "messages.g.h" | |||
#import "./include/video_player_avfoundation/messages.g.h" |
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 changed this manually. This will get overwritten by pigeon until flutter/flutter#147587 is fixed.
@@ -5,7 +5,7 @@ | |||
import Cocoa | |||
import FlutterMacOS | |||
|
|||
@NSApplicationMain | |||
@main |
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.
@NSApplicationMain
was deprecated, tool migrated it: flutter/flutter#146848
@@ -9,6 +9,7 @@ | |||
/* Begin PBXBuildFile section */ | |||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; | |||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; | |||
78CF8D742BC5CEA80051231B /* OCMock in Frameworks */ = {isa = PBXBuildFile; productRef = 78CF8D732BC5CEA80051231B /* OCMock */; }; |
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.
Note: pbxproj file does not contain Swift Package Manager migration changes so that it will continue to build with stable. Migration will happen on the fly.
@vashworth From my poor understanding, this doesn't quite follow the WIP migration guide because the guide assumes that macOS and iOS are implemented in separate plugins. Is |
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.
This looks good to me but my understanding here is shaky! 😅
.headerSearchPath("include/video_player_avfoundation") | ||
] | ||
), | ||
.target( |
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.
Interesting, so SPM doesn't allow source filtering without making separate targets?
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.
Correct, it doesn't allow you to conditionalize by platform very much, only target dependencies, CSettings, CXXSettings, SwiftSettings, and LinkerSettings.
Sources can only be nil or an array of strings
#import "messages.g.h" | ||
#import "./include/video_player_avfoundation/AVAssetTrackUtils.h" | ||
#import "./include/video_player_avfoundation/FVPDisplayLink.h" | ||
#import "./include/video_player_avfoundation/messages.g.h" |
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.
Do we know why include paths aren't taking care of this?
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.
So for most of the headers, include paths is sufficient. However, messages.g.h
is a problem when there's multiple plugins that also have a messages.g.h
. Seems like it can't resolve which to use. More explanation here: flutter/flutter#147587 (comment)
So I decided to change all of them to relative paths to keep it uniform
@@ -2,7 +2,7 @@ name: video_player_avfoundation | |||
description: iOS and macOS implementation of the video_player plugin. | |||
repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player_avfoundation | |||
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22 | |||
version: 2.5.7 | |||
version: 2.5.8 |
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.
Optional: I would probably make this a minor bump, since it's more of a new feature than a fix.
- **Rename getCountryCode to country code for ios and android IAP** - **Add changelog** fixes flutter/flutter#147230
flutter/flutter@bf7191f...f1037a0 2024-05-03 [email protected] Roll Flutter Engine from 445c3bfc0d5b to 8cce00433073 (1 revision) (flutter/flutter#147778) 2024-05-03 [email protected] Roll Flutter Engine from 1f9edbeeceb3 to 445c3bfc0d5b (1 revision) (flutter/flutter#147776) 2024-05-03 [email protected] Roll Flutter Engine from 75eb18090510 to 1f9edbeeceb3 (1 revision) (flutter/flutter#147769) 2024-05-03 [email protected] Improved documentation for SpringSimulation (flutter/flutter#146674) 2024-05-03 [email protected] Roll Flutter Engine from b8d81a4f6e5a to 75eb18090510 (1 revision) (flutter/flutter#147766) 2024-05-03 [email protected] Roll Flutter Engine from d8c8cf4384f0 to b8d81a4f6e5a (2 revisions) (flutter/flutter#147765) 2024-05-03 [email protected] Move snippets package back into flutter repo (flutter/flutter#147690) 2024-05-03 [email protected] Roll Flutter Engine from 98a800b00cfc to d8c8cf4384f0 (2 revisions) (flutter/flutter#147763) 2024-05-03 [email protected] Roll Flutter Engine from c380e9fd4122 to 98a800b00cfc (3 revisions) (flutter/flutter#147761) 2024-05-03 [email protected] Roll Flutter Engine from fc71b650a70a to c380e9fd4122 (4 revisions) (flutter/flutter#147759) 2024-05-03 [email protected] Roll pub packages (flutter/flutter#147741) 2024-05-03 [email protected] Roll Flutter Engine from 3f1f81915620 to fc71b650a70a (2 revisions) (flutter/flutter#147753) 2024-05-02 [email protected] Roll Flutter Engine from 5088f63ecee2 to 3f1f81915620 (3 revisions) (flutter/flutter#147748) 2024-05-02 [email protected] [web] skip debug mode CanvasKit e2e tests due to flakiness; unskip all other modes (flutter/flutter#147736) 2024-05-02 [email protected] Control flow collections: `flutter_tools/` (flutter/flutter#147450) 2024-05-02 [email protected] Add default arguments to `AnimatedPhysicalModel` (flutter/flutter#147424) 2024-05-02 [email protected] Roll Flutter Engine from 9982b5ffd913 to 5088f63ecee2 (3 revisions) (flutter/flutter#147740) 2024-05-02 [email protected] `_RenderDecorator.computeDryBaseline` (flutter/flutter#146365) 2024-05-02 [email protected] Roll Flutter Engine from e1126e59b698 to 9982b5ffd913 (1 revision) (flutter/flutter#147727) 2024-05-02 [email protected] [web] increase chromedriver logging level (flutter/flutter#147687) 2024-05-02 [email protected] Roll Flutter Engine from 1fb36ac9d718 to e1126e59b698 (1 revision) (flutter/flutter#147720) 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 Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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
…lutter#6426) Fix unnecessary toList/fromList calls during encode/decode process. also makes some kotlin code more idiomatic. removes the ability to have collisions with the name `list`. fixes flutter/flutter#119351
…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
…ter#6608) Adds logic + documentation to prevent the usage of unsupported (by CameraX) concurrent camera use cases. The CameraX plugin should only support the concurrent camera use cases supported by Camerax; see [their documentation](https://developer.android.com/media/camera/camerax/architecture#combine-use-cases) for more information. To avoid the usage of unsupported concurrent use cases, this PR changes the plugin so that it behaves according to the following: * If the preview is paused (via `pausePreview`), concurrent video recording and image streaming (via `startVideoCapturing(cameraId, VideoCaptureOptions(streamCallback:...))`) is supported. * If the preview is not paused * **and** the camera device is at least supported hardware [`LIMITED`](https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED), then concurrent image capture and video recording is supported. * **and** the camera device is at least supported hardware [`LEVEL_3`](https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_3), then concurrent video recording and image streaming is supported, but if used, concurrent image capture alongside this is not supported. Also changes `Surface` constants to match Dart style and small documentation nits I noticed. Fixes flutter/flutter#146395, fixes flutter/flutter#144414.
Shoot I did something wrong with git. I'm going to start over this PR |
If you look at "Converting an existing Objective-C Flutter Plugin to a Swift Package" Step 1, it tells you to use either Other resources: |
…6675) Makes `video_player_avfoundation` available as a Swift Package to Flutter. Also, remains compatible with CocoaPods. Fixes flutter/flutter#146921. Redo of #6634.
…lutter#6675) Makes `video_player_avfoundation` available as a Swift Package to Flutter. Also, remains compatible with CocoaPods. Fixes flutter/flutter#146921. Redo of flutter#6634.
…(#6675) Makes `video_player_avfoundation` available as a Swift Package to Flutter. Also, remains compatible with CocoaPods. Fixes flutter/flutter#146921. Redo of flutter/packages#6634.
Makes
video_player_avfoundation
available as a Swift Package to Flutter. Also, remains compatible with CocoaPods.Fixes flutter/flutter#146921.
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.