[video_player] Update iOS prefixes (#4994)
Renames all classes and stand-alone functions to use the `FVP` prefix instead of `FLT`.
Because https://github.com/ollyde/flutter_macos_video_player/issues/9 was never fixed, there are projects in the wild using macOS classes with all of the same names as our classes, but with different implementation/behavior. If we add macOS support to the plugin as-is, developers using that package will end up with two copies of classes with the same name, which has undefined behavior at runtime in Obj-C (and in this case would very likely result in exceptions and/or crashes).
While a third-party should never have published code using the Flutter team's code prefixes, since we wanted to change prefixes anyway we can do so before adding macOS support and just avoid the issue entirely.
Since this involved regenerating Pigeon anyway, this also includes a Pigeon update.
Part of https://github.com/flutter/flutter/issues/102601
diff --git a/packages/video_player/video_player_avfoundation/CHANGELOG.md b/packages/video_player/video_player_avfoundation/CHANGELOG.md
index 26ee529..955e182 100644
--- a/packages/video_player/video_player_avfoundation/CHANGELOG.md
+++ b/packages/video_player/video_player_avfoundation/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 2.4.11
+
+* Updates Pigeon.
+* Changes Objective-C class prefixes to avoid future collisions.
+
## 2.4.10
* Adds pub topics to package metadata.
diff --git a/packages/video_player/video_player_avfoundation/example/ios/RunnerTests/VideoPlayerTests.m b/packages/video_player/video_player_avfoundation/example/ios/RunnerTests/VideoPlayerTests.m
index ef22338..dbee6ac 100644
--- a/packages/video_player/video_player_avfoundation/example/ios/RunnerTests/VideoPlayerTests.m
+++ b/packages/video_player/video_player_avfoundation/example/ios/RunnerTests/VideoPlayerTests.m
@@ -8,9 +8,9 @@
#import <OCMock/OCMock.h>
#import <video_player_avfoundation/AVAssetTrackUtils.h>
-#import <video_player_avfoundation/FLTVideoPlayerPlugin_Test.h>
+#import <video_player_avfoundation/FVPVideoPlayerPlugin_Test.h>
-@interface FLTVideoPlayer : NSObject <FlutterStreamHandler>
+@interface FVPVideoPlayer : NSObject <FlutterStreamHandler>
@property(readonly, nonatomic) AVPlayer *player;
@property(readonly, nonatomic) AVPlayerLayer *playerLayer;
@property(readonly, nonatomic) int64_t position;
@@ -18,9 +18,9 @@
- (void)onTextureUnregistered:(NSObject<FlutterTexture> *)texture;
@end
-@interface FLTVideoPlayerPlugin (Test) <FLTAVFoundationVideoPlayerApi>
+@interface FVPVideoPlayerPlugin (Test) <FVPAVFoundationVideoPlayerApi>
@property(readonly, strong, nonatomic)
- NSMutableDictionary<NSNumber *, FLTVideoPlayer *> *playersByTextureId;
+ NSMutableDictionary<NSNumber *, FVPVideoPlayer *> *playersByTextureId;
@end
@interface FakeAVAssetTrack : AVAssetTrack
@@ -116,23 +116,23 @@
(NSObject<FlutterPluginRegistry> *)[[UIApplication sharedApplication] delegate];
NSObject<FlutterPluginRegistrar> *registrar =
[registry registrarForPlugin:@"testPlayerLayerWorkaround"];
- FLTVideoPlayerPlugin *videoPlayerPlugin =
- [[FLTVideoPlayerPlugin alloc] initWithRegistrar:registrar];
+ FVPVideoPlayerPlugin *videoPlayerPlugin =
+ [[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar];
FlutterError *error;
[videoPlayerPlugin initialize:&error];
XCTAssertNil(error);
- FLTCreateMessage *create = [FLTCreateMessage
+ FVPCreateMessage *create = [FVPCreateMessage
makeWithAsset:nil
uri:@"https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4"
packageName:nil
formatHint:nil
httpHeaders:@{}];
- FLTTextureMessage *textureMessage = [videoPlayerPlugin create:create error:&error];
+ FVPTextureMessage *textureMessage = [videoPlayerPlugin create:create error:&error];
XCTAssertNil(error);
XCTAssertNotNil(textureMessage);
- FLTVideoPlayer *player = videoPlayerPlugin.playersByTextureId[textureMessage.textureId];
+ FVPVideoPlayer *player = videoPlayerPlugin.playersByTextureId[textureMessage.textureId];
XCTAssertNotNil(player);
XCTAssertNotNil(player.playerLayer, @"AVPlayerLayer should be present.");
@@ -148,23 +148,23 @@
[registry registrarForPlugin:@"SeekToInvokestextureFrameAvailable"];
NSObject<FlutterPluginRegistrar> *partialRegistrar = OCMPartialMock(registrar);
OCMStub([partialRegistrar textures]).andReturn(mockTextureRegistry);
- FLTVideoPlayerPlugin *videoPlayerPlugin =
- (FLTVideoPlayerPlugin *)[[FLTVideoPlayerPlugin alloc] initWithRegistrar:partialRegistrar];
+ FVPVideoPlayerPlugin *videoPlayerPlugin =
+ (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:partialRegistrar];
FlutterError *error;
[videoPlayerPlugin initialize:&error];
XCTAssertNil(error);
- FLTCreateMessage *create = [FLTCreateMessage
+ FVPCreateMessage *create = [FVPCreateMessage
makeWithAsset:nil
uri:@"https://flutter.github.io/assets-for-api-docs/assets/videos/hls/bee.m3u8"
packageName:nil
formatHint:nil
httpHeaders:@{}];
- FLTTextureMessage *textureMessage = [videoPlayerPlugin create:create error:&error];
+ FVPTextureMessage *textureMessage = [videoPlayerPlugin create:create error:&error];
NSNumber *textureId = textureMessage.textureId;
XCTestExpectation *initializedExpectation = [self expectationWithDescription:@"seekTo completes"];
- FLTPositionMessage *message = [FLTPositionMessage makeWithTextureId:textureId position:@1234];
+ FVPPositionMessage *message = [FVPPositionMessage makeWithTextureId:textureId position:@1234];
[videoPlayerPlugin seekTo:message
completion:^(FlutterError *_Nullable error) {
[initializedExpectation fulfill];
@@ -172,7 +172,7 @@
[self waitForExpectationsWithTimeout:30.0 handler:nil];
OCMVerify([mockTextureRegistry textureFrameAvailable:message.textureId.intValue]);
- FLTVideoPlayer *player = videoPlayerPlugin.playersByTextureId[textureId];
+ FVPVideoPlayer *player = videoPlayerPlugin.playersByTextureId[textureId];
XCTAssertEqual([player position], 1234);
}
@@ -181,23 +181,23 @@
(NSObject<FlutterPluginRegistry> *)[[UIApplication sharedApplication] delegate];
NSObject<FlutterPluginRegistrar> *registrar =
[registry registrarForPlugin:@"testDeregistersFromPlayer"];
- FLTVideoPlayerPlugin *videoPlayerPlugin =
- (FLTVideoPlayerPlugin *)[[FLTVideoPlayerPlugin alloc] initWithRegistrar:registrar];
+ FVPVideoPlayerPlugin *videoPlayerPlugin =
+ (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar];
FlutterError *error;
[videoPlayerPlugin initialize:&error];
XCTAssertNil(error);
- FLTCreateMessage *create = [FLTCreateMessage
+ FVPCreateMessage *create = [FVPCreateMessage
makeWithAsset:nil
uri:@"https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4"
packageName:nil
formatHint:nil
httpHeaders:@{}];
- FLTTextureMessage *textureMessage = [videoPlayerPlugin create:create error:&error];
+ FVPTextureMessage *textureMessage = [videoPlayerPlugin create:create error:&error];
XCTAssertNil(error);
XCTAssertNotNil(textureMessage);
- FLTVideoPlayer *player = videoPlayerPlugin.playersByTextureId[textureMessage.textureId];
+ FVPVideoPlayer *player = videoPlayerPlugin.playersByTextureId[textureMessage.textureId];
XCTAssertNotNil(player);
AVPlayer *avPlayer = player.player;
@@ -214,23 +214,23 @@
(NSObject<FlutterPluginRegistry> *)[[UIApplication sharedApplication] delegate];
NSObject<FlutterPluginRegistrar> *registrar =
[registry registrarForPlugin:@"testLiveStreamBufferEndFromPlayer"];
- FLTVideoPlayerPlugin *videoPlayerPlugin =
- (FLTVideoPlayerPlugin *)[[FLTVideoPlayerPlugin alloc] initWithRegistrar:registrar];
+ FVPVideoPlayerPlugin *videoPlayerPlugin =
+ (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar];
FlutterError *error;
[videoPlayerPlugin initialize:&error];
XCTAssertNil(error);
- FLTCreateMessage *create = [FLTCreateMessage
+ FVPCreateMessage *create = [FVPCreateMessage
makeWithAsset:nil
uri:@"https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4"
packageName:nil
formatHint:nil
httpHeaders:@{}];
- FLTTextureMessage *textureMessage = [videoPlayerPlugin create:create error:&error];
+ FVPTextureMessage *textureMessage = [videoPlayerPlugin create:create error:&error];
XCTAssertNil(error);
XCTAssertNotNil(textureMessage);
- FLTVideoPlayer *player = videoPlayerPlugin.playersByTextureId[textureMessage.textureId];
+ FVPVideoPlayer *player = videoPlayerPlugin.playersByTextureId[textureMessage.textureId];
XCTAssertNotNil(player);
AVPlayer *avPlayer = player.player;
[avPlayer play];
@@ -260,8 +260,8 @@
(NSObject<FlutterPluginRegistry> *)[[UIApplication sharedApplication] delegate];
NSObject<FlutterPluginRegistrar> *registrar = [registry registrarForPlugin:@"TestVideoControls"];
- FLTVideoPlayerPlugin *videoPlayerPlugin =
- (FLTVideoPlayerPlugin *)[[FLTVideoPlayerPlugin alloc] initWithRegistrar:registrar];
+ FVPVideoPlayerPlugin *videoPlayerPlugin =
+ (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar];
NSDictionary<NSString *, id> *videoInitialization =
[self testPlugin:videoPlayerPlugin
@@ -276,8 +276,8 @@
(NSObject<FlutterPluginRegistry> *)[[UIApplication sharedApplication] delegate];
NSObject<FlutterPluginRegistrar> *registrar = [registry registrarForPlugin:@"TestAudioControls"];
- FLTVideoPlayerPlugin *videoPlayerPlugin =
- (FLTVideoPlayerPlugin *)[[FLTVideoPlayerPlugin alloc] initWithRegistrar:registrar];
+ FVPVideoPlayerPlugin *videoPlayerPlugin =
+ (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar];
NSDictionary<NSString *, id> *audioInitialization =
[self testPlugin:videoPlayerPlugin
@@ -293,8 +293,8 @@
(NSObject<FlutterPluginRegistry> *)[[UIApplication sharedApplication] delegate];
NSObject<FlutterPluginRegistrar> *registrar = [registry registrarForPlugin:@"TestHLSControls"];
- FLTVideoPlayerPlugin *videoPlayerPlugin =
- (FLTVideoPlayerPlugin *)[[FLTVideoPlayerPlugin alloc] initWithRegistrar:registrar];
+ FVPVideoPlayerPlugin *videoPlayerPlugin =
+ (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar];
NSDictionary<NSString *, id> *videoInitialization =
[self testPlugin:videoPlayerPlugin
@@ -323,25 +323,25 @@
StubAVPlayer *stubAVPlayer = [[StubAVPlayer alloc] init];
StubFVPPlayerFactory *stubFVPPlayerFactory =
[[StubFVPPlayerFactory alloc] initWithPlayer:stubAVPlayer];
- FLTVideoPlayerPlugin *pluginWithMockAVPlayer =
- [[FLTVideoPlayerPlugin alloc] initWithPlayerFactory:stubFVPPlayerFactory registrar:registrar];
+ FVPVideoPlayerPlugin *pluginWithMockAVPlayer =
+ [[FVPVideoPlayerPlugin alloc] initWithPlayerFactory:stubFVPPlayerFactory registrar:registrar];
FlutterError *error;
[pluginWithMockAVPlayer initialize:&error];
XCTAssertNil(error);
- FLTCreateMessage *create = [FLTCreateMessage
+ FVPCreateMessage *create = [FVPCreateMessage
makeWithAsset:nil
uri:@"https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4"
packageName:nil
formatHint:nil
httpHeaders:@{}];
- FLTTextureMessage *textureMessage = [pluginWithMockAVPlayer create:create error:&error];
+ FVPTextureMessage *textureMessage = [pluginWithMockAVPlayer create:create error:&error];
NSNumber *textureId = textureMessage.textureId;
XCTestExpectation *initializedExpectation =
[self expectationWithDescription:@"seekTo has zero tolerance when seeking not to end"];
- FLTPositionMessage *message = [FLTPositionMessage makeWithTextureId:textureId position:@1234];
+ FVPPositionMessage *message = [FVPPositionMessage makeWithTextureId:textureId position:@1234];
[pluginWithMockAVPlayer seekTo:message
completion:^(FlutterError *_Nullable error) {
[initializedExpectation fulfill];
@@ -361,26 +361,26 @@
StubAVPlayer *stubAVPlayer = [[StubAVPlayer alloc] init];
StubFVPPlayerFactory *stubFVPPlayerFactory =
[[StubFVPPlayerFactory alloc] initWithPlayer:stubAVPlayer];
- FLTVideoPlayerPlugin *pluginWithMockAVPlayer =
- [[FLTVideoPlayerPlugin alloc] initWithPlayerFactory:stubFVPPlayerFactory registrar:registrar];
+ FVPVideoPlayerPlugin *pluginWithMockAVPlayer =
+ [[FVPVideoPlayerPlugin alloc] initWithPlayerFactory:stubFVPPlayerFactory registrar:registrar];
FlutterError *error;
[pluginWithMockAVPlayer initialize:&error];
XCTAssertNil(error);
- FLTCreateMessage *create = [FLTCreateMessage
+ FVPCreateMessage *create = [FVPCreateMessage
makeWithAsset:nil
uri:@"https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4"
packageName:nil
formatHint:nil
httpHeaders:@{}];
- FLTTextureMessage *textureMessage = [pluginWithMockAVPlayer create:create error:&error];
+ FVPTextureMessage *textureMessage = [pluginWithMockAVPlayer create:create error:&error];
NSNumber *textureId = textureMessage.textureId;
XCTestExpectation *initializedExpectation =
[self expectationWithDescription:@"seekTo has non-zero tolerance when seeking to end"];
// The duration of this video is "0" due to the non standard initiliatazion process.
- FLTPositionMessage *message = [FLTPositionMessage makeWithTextureId:textureId position:@0];
+ FVPPositionMessage *message = [FVPPositionMessage makeWithTextureId:textureId position:@0];
[pluginWithMockAVPlayer seekTo:message
completion:^(FlutterError *_Nullable error) {
[initializedExpectation fulfill];
@@ -390,21 +390,21 @@
XCTAssertGreaterThan([stubAVPlayer.afterTolerance intValue], 0);
}
-- (NSDictionary<NSString *, id> *)testPlugin:(FLTVideoPlayerPlugin *)videoPlayerPlugin
+- (NSDictionary<NSString *, id> *)testPlugin:(FVPVideoPlayerPlugin *)videoPlayerPlugin
uri:(NSString *)uri {
FlutterError *error;
[videoPlayerPlugin initialize:&error];
XCTAssertNil(error);
- FLTCreateMessage *create = [FLTCreateMessage makeWithAsset:nil
+ FVPCreateMessage *create = [FVPCreateMessage makeWithAsset:nil
uri:uri
packageName:nil
formatHint:nil
httpHeaders:@{}];
- FLTTextureMessage *textureMessage = [videoPlayerPlugin create:create error:&error];
+ FVPTextureMessage *textureMessage = [videoPlayerPlugin create:create error:&error];
NSNumber *textureId = textureMessage.textureId;
- FLTVideoPlayer *player = videoPlayerPlugin.playersByTextureId[textureId];
+ FVPVideoPlayer *player = videoPlayerPlugin.playersByTextureId[textureId];
XCTAssertNotNil(player);
XCTestExpectation *initializedExpectation = [self expectationWithDescription:@"initialized"];
@@ -426,7 +426,7 @@
XCTAssertEqual(avPlayer.timeControlStatus, AVPlayerTimeControlStatusPaused);
// Change playback speed.
- FLTPlaybackSpeedMessage *playback = [FLTPlaybackSpeedMessage makeWithTextureId:textureId
+ FVPPlaybackSpeedMessage *playback = [FVPPlaybackSpeedMessage makeWithTextureId:textureId
speed:@2];
[videoPlayerPlugin setPlaybackSpeed:playback error:&error];
XCTAssertNil(error);
@@ -434,7 +434,7 @@
XCTAssertEqual(avPlayer.timeControlStatus, AVPlayerTimeControlStatusWaitingToPlayAtSpecifiedRate);
// Volume
- FLTVolumeMessage *volume = [FLTVolumeMessage makeWithTextureId:textureId volume:@0.1];
+ FVPVolumeMessage *volume = [FVPVolumeMessage makeWithTextureId:textureId volume:@0.1];
[videoPlayerPlugin setVolume:volume error:&error];
XCTAssertNil(error);
XCTAssertEqual(avPlayer.volume, 0.1f);
@@ -455,24 +455,24 @@
[registry registrarForPlugin:@"testDoesNotCrashOnRateObservationAfterDisposal"];
AVPlayer *avPlayer = nil;
- __weak FLTVideoPlayer *player = nil;
+ __weak FVPVideoPlayer *player = nil;
- // Autoreleasepool is needed to simulate conditions of FLTVideoPlayer deallocation.
+ // Autoreleasepool is needed to simulate conditions of FVPVideoPlayer deallocation.
@autoreleasepool {
- FLTVideoPlayerPlugin *videoPlayerPlugin =
- (FLTVideoPlayerPlugin *)[[FLTVideoPlayerPlugin alloc] initWithRegistrar:registrar];
+ FVPVideoPlayerPlugin *videoPlayerPlugin =
+ (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar];
FlutterError *error;
[videoPlayerPlugin initialize:&error];
XCTAssertNil(error);
- FLTCreateMessage *create = [FLTCreateMessage
+ FVPCreateMessage *create = [FVPCreateMessage
makeWithAsset:nil
uri:@"https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4"
packageName:nil
formatHint:nil
httpHeaders:@{}];
- FLTTextureMessage *textureMessage = [videoPlayerPlugin create:create error:&error];
+ FVPTextureMessage *textureMessage = [videoPlayerPlugin create:create error:&error];
XCTAssertNil(error);
XCTAssertNotNil(textureMessage);
@@ -484,7 +484,7 @@
XCTAssertNil(error);
}
- // [FLTVideoPlayerPlugin dispose:error:] selector is dispatching the [FLTVideoPlayer dispose] call
+ // [FVPVideoPlayerPlugin dispose:error:] selector is dispatching the [FVPVideoPlayer dispose] call
// with a 1-second delay keeping a strong reference to the player. The polling ensures the player
// was truly deallocated.
[self expectationForPredicate:[NSPredicate predicateWithFormat:@"self != nil"]
@@ -496,10 +496,10 @@
}
// During the hot reload:
-// 1. `[FLTVideoPlayer onTextureUnregistered:]` gets called.
-// 2. `[FLTVideoPlayerPlugin initialize:]` gets called.
+// 1. `[FVPVideoPlayer onTextureUnregistered:]` gets called.
+// 2. `[FVPVideoPlayerPlugin initialize:]` gets called.
//
-// Both of these methods dispatch [FLTVideoPlayer dispose] on the main thread
+// Both of these methods dispatch [FVPVideoPlayer dispose] on the main thread
// leading to a possible crash when de-registering observers twice.
- (void)testHotReloadDoesNotCrash {
NSObject<FlutterPluginRegistry> *registry =
@@ -507,24 +507,24 @@
NSObject<FlutterPluginRegistrar> *registrar =
[registry registrarForPlugin:@"testHotReloadDoesNotCrash"];
- __weak FLTVideoPlayer *player = nil;
+ __weak FVPVideoPlayer *player = nil;
- // Autoreleasepool is needed to simulate conditions of FLTVideoPlayer deallocation.
+ // Autoreleasepool is needed to simulate conditions of FVPVideoPlayer deallocation.
@autoreleasepool {
- FLTVideoPlayerPlugin *videoPlayerPlugin =
- (FLTVideoPlayerPlugin *)[[FLTVideoPlayerPlugin alloc] initWithRegistrar:registrar];
+ FVPVideoPlayerPlugin *videoPlayerPlugin =
+ (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar];
FlutterError *error;
[videoPlayerPlugin initialize:&error];
XCTAssertNil(error);
- FLTCreateMessage *create = [FLTCreateMessage
+ FVPCreateMessage *create = [FVPCreateMessage
makeWithAsset:nil
uri:@"https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4"
packageName:nil
formatHint:nil
httpHeaders:@{}];
- FLTTextureMessage *textureMessage = [videoPlayerPlugin create:create error:&error];
+ FVPTextureMessage *textureMessage = [videoPlayerPlugin create:create error:&error];
XCTAssertNil(error);
XCTAssertNotNil(textureMessage);
@@ -538,7 +538,7 @@
XCTAssertNil(error);
}
- // [FLTVideoPlayerPlugin dispose:error:] selector is dispatching the [FLTVideoPlayer dispose] call
+ // [FVPVideoPlayerPlugin dispose:error:] selector is dispatching the [FVPVideoPlayer dispose] call
// with a 1-second delay keeping a strong reference to the player. The polling ensures the player
// was truly deallocated.
[self expectationForPredicate:[NSPredicate predicateWithFormat:@"self != nil"]
@@ -550,7 +550,7 @@
- (void)validateTransformFixForOrientation:(UIImageOrientation)orientation {
AVAssetTrack *track = [[FakeAVAssetTrack alloc] initWithOrientation:orientation];
- CGAffineTransform t = FLTGetStandardizedTransformForTrack(track);
+ CGAffineTransform t = FVPGetStandardizedTransformForTrack(track);
CGSize size = track.naturalSize;
CGFloat expectX, expectY;
switch (orientation) {
diff --git a/packages/video_player/video_player_avfoundation/ios/Classes/AVAssetTrackUtils.h b/packages/video_player/video_player_avfoundation/ios/Classes/AVAssetTrackUtils.h
index 9d736bc..a09af39 100644
--- a/packages/video_player/video_player_avfoundation/ios/Classes/AVAssetTrackUtils.h
+++ b/packages/video_player/video_player_avfoundation/ios/Classes/AVAssetTrackUtils.h
@@ -11,4 +11,4 @@
* Note: https://stackoverflow.com/questions/64161544
* `AVAssetTrack.preferredTransform` can have wrong `tx` and `ty`.
*/
-CGAffineTransform FLTGetStandardizedTransformForTrack(AVAssetTrack* track);
+CGAffineTransform FVPGetStandardizedTransformForTrack(AVAssetTrack* track);
diff --git a/packages/video_player/video_player_avfoundation/ios/Classes/AVAssetTrackUtils.m b/packages/video_player/video_player_avfoundation/ios/Classes/AVAssetTrackUtils.m
index de75859..858e1f2 100644
--- a/packages/video_player/video_player_avfoundation/ios/Classes/AVAssetTrackUtils.m
+++ b/packages/video_player/video_player_avfoundation/ios/Classes/AVAssetTrackUtils.m
@@ -4,7 +4,7 @@
#import <AVFoundation/AVFoundation.h>
-CGAffineTransform FLTGetStandardizedTransformForTrack(AVAssetTrack *track) {
+CGAffineTransform FVPGetStandardizedTransformForTrack(AVAssetTrack *track) {
CGAffineTransform t = track.preferredTransform;
CGSize size = track.naturalSize;
// Each case of control flows corresponds to a specific
diff --git a/packages/video_player/video_player_avfoundation/ios/Classes/FLTVideoPlayerPlugin.h b/packages/video_player/video_player_avfoundation/ios/Classes/FVPVideoPlayerPlugin.h
similarity index 82%
rename from packages/video_player/video_player_avfoundation/ios/Classes/FLTVideoPlayerPlugin.h
rename to packages/video_player/video_player_avfoundation/ios/Classes/FVPVideoPlayerPlugin.h
index a737d05..b0ed49d 100644
--- a/packages/video_player/video_player_avfoundation/ios/Classes/FLTVideoPlayerPlugin.h
+++ b/packages/video_player/video_player_avfoundation/ios/Classes/FVPVideoPlayerPlugin.h
@@ -4,6 +4,6 @@
#import <Flutter/Flutter.h>
-@interface FLTVideoPlayerPlugin : NSObject <FlutterPlugin>
+@interface FVPVideoPlayerPlugin : NSObject <FlutterPlugin>
- (instancetype)initWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar;
@end
diff --git a/packages/video_player/video_player_avfoundation/ios/Classes/FLTVideoPlayerPlugin.m b/packages/video_player/video_player_avfoundation/ios/Classes/FVPVideoPlayerPlugin.m
similarity index 89%
rename from packages/video_player/video_player_avfoundation/ios/Classes/FLTVideoPlayerPlugin.m
rename to packages/video_player/video_player_avfoundation/ios/Classes/FVPVideoPlayerPlugin.m
index f4504aa..5b00ab8 100644
--- a/packages/video_player/video_player_avfoundation/ios/Classes/FLTVideoPlayerPlugin.m
+++ b/packages/video_player/video_player_avfoundation/ios/Classes/FVPVideoPlayerPlugin.m
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#import "FLTVideoPlayerPlugin.h"
-#import "FLTVideoPlayerPlugin_Test.h"
+#import "FVPVideoPlayerPlugin.h"
+#import "FVPVideoPlayerPlugin_Test.h"
#import <AVFoundation/AVFoundation.h>
#import <GLKit/GLKit.h>
@@ -15,14 +15,14 @@
#error Code Requires ARC.
#endif
-@interface FLTFrameUpdater : NSObject
+@interface FVPFrameUpdater : NSObject
@property(nonatomic) int64_t textureId;
@property(nonatomic, weak, readonly) NSObject<FlutterTextureRegistry> *registry;
- (void)onDisplayLink:(CADisplayLink *)link;
@end
-@implementation FLTFrameUpdater
-- (FLTFrameUpdater *)initWithRegistry:(NSObject<FlutterTextureRegistry> *)registry {
+@implementation FVPFrameUpdater
+- (FVPFrameUpdater *)initWithRegistry:(NSObject<FlutterTextureRegistry> *)registry {
NSAssert(self, @"super init cannot be nil");
if (self == nil) return nil;
_registry = registry;
@@ -44,7 +44,7 @@
@end
-@interface FLTVideoPlayer : NSObject <FlutterTexture, FlutterStreamHandler>
+@interface FVPVideoPlayer : NSObject <FlutterTexture, FlutterStreamHandler>
@property(readonly, nonatomic) AVPlayer *player;
@property(readonly, nonatomic) AVPlayerItemVideoOutput *videoOutput;
// This is to fix 2 bugs: 1. blank video for encrypted video streams on iOS 16
@@ -62,7 +62,7 @@
@property(nonatomic) BOOL isLooping;
@property(nonatomic, readonly) BOOL isInitialized;
- (instancetype)initWithURL:(NSURL *)url
- frameUpdater:(FLTFrameUpdater *)frameUpdater
+ frameUpdater:(FVPFrameUpdater *)frameUpdater
httpHeaders:(nonnull NSDictionary<NSString *, NSString *> *)headers
playerFactory:(id<FVPPlayerFactory>)playerFactory;
@end
@@ -74,9 +74,9 @@
static void *playbackLikelyToKeepUpContext = &playbackLikelyToKeepUpContext;
static void *rateContext = &rateContext;
-@implementation FLTVideoPlayer
+@implementation FVPVideoPlayer
- (instancetype)initWithAsset:(NSString *)asset
- frameUpdater:(FLTFrameUpdater *)frameUpdater
+ frameUpdater:(FVPFrameUpdater *)frameUpdater
playerFactory:(id<FVPPlayerFactory>)playerFactory {
NSString *path = [[NSBundle mainBundle] pathForResource:asset ofType:nil];
return [self initWithURL:[NSURL fileURLWithPath:path]
@@ -134,7 +134,7 @@
const int64_t TIME_UNSET = -9223372036854775807;
-NS_INLINE int64_t FLTCMTimeToMillis(CMTime time) {
+NS_INLINE int64_t FVPCMTimeToMillis(CMTime time) {
// When CMTIME_IS_INDEFINITE return a value that matches TIME_UNSET from ExoPlayer2 on Android.
// Fixes https://github.com/flutter/flutter/issues/48670
if (CMTIME_IS_INDEFINITE(time)) return TIME_UNSET;
@@ -195,7 +195,7 @@
return videoComposition;
}
-- (void)createVideoOutputAndDisplayLink:(FLTFrameUpdater *)frameUpdater {
+- (void)createVideoOutputAndDisplayLink:(FVPFrameUpdater *)frameUpdater {
NSDictionary *pixBuffAttributes = @{
(id)kCVPixelBufferPixelFormatTypeKey : @(kCVPixelFormatType_32BGRA),
(id)kCVPixelBufferIOSurfacePropertiesKey : @{}
@@ -209,7 +209,7 @@
}
- (instancetype)initWithURL:(NSURL *)url
- frameUpdater:(FLTFrameUpdater *)frameUpdater
+ frameUpdater:(FVPFrameUpdater *)frameUpdater
httpHeaders:(nonnull NSDictionary<NSString *, NSString *> *)headers
playerFactory:(id<FVPPlayerFactory>)playerFactory {
NSDictionary<NSString *, id> *options = nil;
@@ -222,7 +222,7 @@
}
- (instancetype)initWithPlayerItem:(AVPlayerItem *)item
- frameUpdater:(FLTFrameUpdater *)frameUpdater
+ frameUpdater:(FVPFrameUpdater *)frameUpdater
playerFactory:(id<FVPPlayerFactory>)playerFactory {
self = [super init];
NSAssert(self, @"super init cannot be nil");
@@ -238,7 +238,7 @@
if ([videoTrack statusOfValueForKey:@"preferredTransform"
error:nil] == AVKeyValueStatusLoaded) {
// Rotate the video by using a videoComposition and the preferredTransform
- self->_preferredTransform = FLTGetStandardizedTransformForTrack(videoTrack);
+ self->_preferredTransform = FVPGetStandardizedTransformForTrack(videoTrack);
// Note:
// https://developer.apple.com/documentation/avfoundation/avplayeritem/1388818-videocomposition
// Video composition can only be used with file-based media and is not supported for
@@ -285,8 +285,8 @@
NSMutableArray<NSArray<NSNumber *> *> *values = [[NSMutableArray alloc] init];
for (NSValue *rangeValue in [object loadedTimeRanges]) {
CMTimeRange range = [rangeValue CMTimeRangeValue];
- int64_t start = FLTCMTimeToMillis(range.start);
- [values addObject:@[ @(start), @(start + FLTCMTimeToMillis(range.duration)) ]];
+ int64_t start = FVPCMTimeToMillis(range.start);
+ [values addObject:@[ @(start), @(start + FVPCMTimeToMillis(range.duration)) ]];
}
_eventSink(@{@"event" : @"bufferingUpdate", @"values" : values});
}
@@ -414,14 +414,14 @@
}
- (int64_t)position {
- return FLTCMTimeToMillis([_player currentTime]);
+ return FVPCMTimeToMillis([_player currentTime]);
}
- (int64_t)duration {
// Note: https://openradar.appspot.com/radar?id=4968600712511488
// `[AVPlayerItem duration]` can be `kCMTimeIndefinite`,
// use `[[AVPlayerItem asset] duration]` instead.
- return FLTCMTimeToMillis([[[_player currentItem] asset] duration]);
+ return FVPCMTimeToMillis([[[_player currentItem] asset] duration]);
}
- (void)seekTo:(int)location completionHandler:(void (^)(BOOL))completionHandler {
@@ -507,8 +507,8 @@
- (void)disposeSansEventChannel {
// This check prevents the crash caused by removing the KVO observers twice.
// When performing a Hot Restart, the leftover players are disposed once directly
- // by [FLTVideoPlayerPlugin initialize:] method and then disposed again by
- // [FLTVideoPlayer onTextureUnregistered:] call leading to possible over-release.
+ // by [FVPVideoPlayerPlugin initialize:] method and then disposed again by
+ // [FVPVideoPlayer onTextureUnregistered:] call leading to possible over-release.
if (_disposed) {
return;
}
@@ -535,20 +535,20 @@
@end
-@interface FLTVideoPlayerPlugin () <FLTAVFoundationVideoPlayerApi>
+@interface FVPVideoPlayerPlugin () <FVPAVFoundationVideoPlayerApi>
@property(readonly, weak, nonatomic) NSObject<FlutterTextureRegistry> *registry;
@property(readonly, weak, nonatomic) NSObject<FlutterBinaryMessenger> *messenger;
@property(readonly, strong, nonatomic)
- NSMutableDictionary<NSNumber *, FLTVideoPlayer *> *playersByTextureId;
+ NSMutableDictionary<NSNumber *, FVPVideoPlayer *> *playersByTextureId;
@property(readonly, strong, nonatomic) NSObject<FlutterPluginRegistrar> *registrar;
@property(nonatomic, strong) id<FVPPlayerFactory> playerFactory;
@end
-@implementation FLTVideoPlayerPlugin
+@implementation FVPVideoPlayerPlugin
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
- FLTVideoPlayerPlugin *instance = [[FLTVideoPlayerPlugin alloc] initWithRegistrar:registrar];
+ FVPVideoPlayerPlugin *instance = [[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar];
[registrar publish:instance];
- FLTAVFoundationVideoPlayerApiSetup(registrar.messenger, instance);
+ FVPAVFoundationVideoPlayerApiSetup(registrar.messenger, instance);
}
- (instancetype)initWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
@@ -573,11 +573,11 @@
// TODO(57151): This should be commented out when 57151's fix lands on stable.
// This is the correct behavior we never did it in the past and the engine
// doesn't currently support it.
- // FLTAVFoundationVideoPlayerApiSetup(registrar.messenger, nil);
+ // FVPAVFoundationVideoPlayerApiSetup(registrar.messenger, nil);
}
-- (FLTTextureMessage *)onPlayerSetup:(FLTVideoPlayer *)player
- frameUpdater:(FLTFrameUpdater *)frameUpdater {
+- (FVPTextureMessage *)onPlayerSetup:(FVPVideoPlayer *)player
+ frameUpdater:(FVPFrameUpdater *)frameUpdater {
int64_t textureId = [self.registry registerTexture:player];
frameUpdater.textureId = textureId;
FlutterEventChannel *eventChannel = [FlutterEventChannel
@@ -587,7 +587,7 @@
[eventChannel setStreamHandler:player];
player.eventChannel = eventChannel;
self.playersByTextureId[@(textureId)] = player;
- FLTTextureMessage *result = [FLTTextureMessage makeWithTextureId:@(textureId)];
+ FVPTextureMessage *result = [FVPTextureMessage makeWithTextureId:@(textureId)];
return result;
}
@@ -596,16 +596,16 @@
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
[self.playersByTextureId
- enumerateKeysAndObjectsUsingBlock:^(NSNumber *textureId, FLTVideoPlayer *player, BOOL *stop) {
+ enumerateKeysAndObjectsUsingBlock:^(NSNumber *textureId, FVPVideoPlayer *player, BOOL *stop) {
[self.registry unregisterTexture:textureId.unsignedIntegerValue];
[player dispose];
}];
[self.playersByTextureId removeAllObjects];
}
-- (FLTTextureMessage *)create:(FLTCreateMessage *)input error:(FlutterError **)error {
- FLTFrameUpdater *frameUpdater = [[FLTFrameUpdater alloc] initWithRegistry:_registry];
- FLTVideoPlayer *player;
+- (FVPTextureMessage *)create:(FVPCreateMessage *)input error:(FlutterError **)error {
+ FVPFrameUpdater *frameUpdater = [[FVPFrameUpdater alloc] initWithRegistry:_registry];
+ FVPVideoPlayer *player;
if (input.asset) {
NSString *assetPath;
if (input.packageName) {
@@ -614,7 +614,7 @@
assetPath = [_registrar lookupKeyForAsset:input.asset];
}
@try {
- player = [[FLTVideoPlayer alloc] initWithAsset:assetPath
+ player = [[FVPVideoPlayer alloc] initWithAsset:assetPath
frameUpdater:frameUpdater
playerFactory:_playerFactory];
return [self onPlayerSetup:player frameUpdater:frameUpdater];
@@ -623,7 +623,7 @@
return nil;
}
} else if (input.uri) {
- player = [[FLTVideoPlayer alloc] initWithURL:[NSURL URLWithString:input.uri]
+ player = [[FVPVideoPlayer alloc] initWithURL:[NSURL URLWithString:input.uri]
frameUpdater:frameUpdater
httpHeaders:input.httpHeaders
playerFactory:_playerFactory];
@@ -634,8 +634,8 @@
}
}
-- (void)dispose:(FLTTextureMessage *)input error:(FlutterError **)error {
- FLTVideoPlayer *player = self.playersByTextureId[input.textureId];
+- (void)dispose:(FVPTextureMessage *)input error:(FlutterError **)error {
+ FVPVideoPlayer *player = self.playersByTextureId[input.textureId];
[self.registry unregisterTexture:input.textureId.intValue];
[self.playersByTextureId removeObjectForKey:input.textureId];
// If the Flutter contains https://github.com/flutter/engine/pull/12695,
@@ -656,36 +656,36 @@
});
}
-- (void)setLooping:(FLTLoopingMessage *)input error:(FlutterError **)error {
- FLTVideoPlayer *player = self.playersByTextureId[input.textureId];
+- (void)setLooping:(FVPLoopingMessage *)input error:(FlutterError **)error {
+ FVPVideoPlayer *player = self.playersByTextureId[input.textureId];
player.isLooping = input.isLooping.boolValue;
}
-- (void)setVolume:(FLTVolumeMessage *)input error:(FlutterError **)error {
- FLTVideoPlayer *player = self.playersByTextureId[input.textureId];
+- (void)setVolume:(FVPVolumeMessage *)input error:(FlutterError **)error {
+ FVPVideoPlayer *player = self.playersByTextureId[input.textureId];
[player setVolume:input.volume.doubleValue];
}
-- (void)setPlaybackSpeed:(FLTPlaybackSpeedMessage *)input error:(FlutterError **)error {
- FLTVideoPlayer *player = self.playersByTextureId[input.textureId];
+- (void)setPlaybackSpeed:(FVPPlaybackSpeedMessage *)input error:(FlutterError **)error {
+ FVPVideoPlayer *player = self.playersByTextureId[input.textureId];
[player setPlaybackSpeed:input.speed.doubleValue];
}
-- (void)play:(FLTTextureMessage *)input error:(FlutterError **)error {
- FLTVideoPlayer *player = self.playersByTextureId[input.textureId];
+- (void)play:(FVPTextureMessage *)input error:(FlutterError **)error {
+ FVPVideoPlayer *player = self.playersByTextureId[input.textureId];
[player play];
}
-- (FLTPositionMessage *)position:(FLTTextureMessage *)input error:(FlutterError **)error {
- FLTVideoPlayer *player = self.playersByTextureId[input.textureId];
- FLTPositionMessage *result = [FLTPositionMessage makeWithTextureId:input.textureId
+- (FVPPositionMessage *)position:(FVPTextureMessage *)input error:(FlutterError **)error {
+ FVPVideoPlayer *player = self.playersByTextureId[input.textureId];
+ FVPPositionMessage *result = [FVPPositionMessage makeWithTextureId:input.textureId
position:@([player position])];
return result;
}
-- (void)seekTo:(FLTPositionMessage *)input
+- (void)seekTo:(FVPPositionMessage *)input
completion:(void (^)(FlutterError *_Nullable))completion {
- FLTVideoPlayer *player = self.playersByTextureId[input.textureId];
+ FVPVideoPlayer *player = self.playersByTextureId[input.textureId];
[player seekTo:input.position.intValue
completionHandler:^(BOOL finished) {
dispatch_async(dispatch_get_main_queue(), ^{
@@ -695,12 +695,12 @@
}];
}
-- (void)pause:(FLTTextureMessage *)input error:(FlutterError **)error {
- FLTVideoPlayer *player = self.playersByTextureId[input.textureId];
+- (void)pause:(FVPTextureMessage *)input error:(FlutterError **)error {
+ FVPVideoPlayer *player = self.playersByTextureId[input.textureId];
[player pause];
}
-- (void)setMixWithOthers:(FLTMixWithOthersMessage *)input
+- (void)setMixWithOthers:(FVPMixWithOthersMessage *)input
error:(FlutterError *_Nullable __autoreleasing *)error {
if (input.mixWithOthers.boolValue) {
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback
diff --git a/packages/video_player/video_player_avfoundation/ios/Classes/FLTVideoPlayerPlugin_Test.h b/packages/video_player/video_player_avfoundation/ios/Classes/FVPVideoPlayerPlugin_Test.h
similarity index 89%
rename from packages/video_player/video_player_avfoundation/ios/Classes/FLTVideoPlayerPlugin_Test.h
rename to packages/video_player/video_player_avfoundation/ios/Classes/FVPVideoPlayerPlugin_Test.h
index 4c52ba0..a1e2804 100644
--- a/packages/video_player/video_player_avfoundation/ios/Classes/FLTVideoPlayerPlugin_Test.h
+++ b/packages/video_player/video_player_avfoundation/ios/Classes/FVPVideoPlayerPlugin_Test.h
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#import "FLTVideoPlayerPlugin.h"
+#import "FVPVideoPlayerPlugin.h"
#import <AVFoundation/AVFoundation.h>
@@ -11,7 +11,7 @@
- (AVPlayer *)playerWithPlayerItem:(AVPlayerItem *)playerItem;
@end
-@interface FLTVideoPlayerPlugin ()
+@interface FVPVideoPlayerPlugin ()
- (instancetype)initWithPlayerFactory:(id<FVPPlayerFactory>)playerFactory
registrar:(NSObject<FlutterPluginRegistrar> *)registrar;
diff --git a/packages/video_player/video_player_avfoundation/ios/Classes/messages.g.h b/packages/video_player/video_player_avfoundation/ios/Classes/messages.g.h
index 19db3e9..c66e5ad 100644
--- a/packages/video_player/video_player_avfoundation/ios/Classes/messages.g.h
+++ b/packages/video_player/video_player_avfoundation/ios/Classes/messages.g.h
@@ -1,7 +1,7 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Autogenerated from Pigeon (v9.2.4), do not edit directly.
+// Autogenerated from Pigeon (v11.0.1), do not edit directly.
// See also: https://pub.dev/packages/pigeon
#import <Foundation/Foundation.h>
@@ -13,22 +13,22 @@
NS_ASSUME_NONNULL_BEGIN
-@class FLTTextureMessage;
-@class FLTLoopingMessage;
-@class FLTVolumeMessage;
-@class FLTPlaybackSpeedMessage;
-@class FLTPositionMessage;
-@class FLTCreateMessage;
-@class FLTMixWithOthersMessage;
+@class FVPTextureMessage;
+@class FVPLoopingMessage;
+@class FVPVolumeMessage;
+@class FVPPlaybackSpeedMessage;
+@class FVPPositionMessage;
+@class FVPCreateMessage;
+@class FVPMixWithOthersMessage;
-@interface FLTTextureMessage : NSObject
+@interface FVPTextureMessage : NSObject
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)makeWithTextureId:(NSNumber *)textureId;
@property(nonatomic, strong) NSNumber *textureId;
@end
-@interface FLTLoopingMessage : NSObject
+@interface FVPLoopingMessage : NSObject
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)makeWithTextureId:(NSNumber *)textureId isLooping:(NSNumber *)isLooping;
@@ -36,7 +36,7 @@
@property(nonatomic, strong) NSNumber *isLooping;
@end
-@interface FLTVolumeMessage : NSObject
+@interface FVPVolumeMessage : NSObject
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)makeWithTextureId:(NSNumber *)textureId volume:(NSNumber *)volume;
@@ -44,7 +44,7 @@
@property(nonatomic, strong) NSNumber *volume;
@end
-@interface FLTPlaybackSpeedMessage : NSObject
+@interface FVPPlaybackSpeedMessage : NSObject
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)makeWithTextureId:(NSNumber *)textureId speed:(NSNumber *)speed;
@@ -52,7 +52,7 @@
@property(nonatomic, strong) NSNumber *speed;
@end
-@interface FLTPositionMessage : NSObject
+@interface FVPPositionMessage : NSObject
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)makeWithTextureId:(NSNumber *)textureId position:(NSNumber *)position;
@@ -60,7 +60,7 @@
@property(nonatomic, strong) NSNumber *position;
@end
-@interface FLTCreateMessage : NSObject
+@interface FVPCreateMessage : NSObject
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)makeWithAsset:(nullable NSString *)asset
@@ -75,38 +75,38 @@
@property(nonatomic, strong) NSDictionary<NSString *, NSString *> *httpHeaders;
@end
-@interface FLTMixWithOthersMessage : NSObject
+@interface FVPMixWithOthersMessage : NSObject
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)makeWithMixWithOthers:(NSNumber *)mixWithOthers;
@property(nonatomic, strong) NSNumber *mixWithOthers;
@end
-/// The codec used by FLTAVFoundationVideoPlayerApi.
-NSObject<FlutterMessageCodec> *FLTAVFoundationVideoPlayerApiGetCodec(void);
+/// The codec used by FVPAVFoundationVideoPlayerApi.
+NSObject<FlutterMessageCodec> *FVPAVFoundationVideoPlayerApiGetCodec(void);
-@protocol FLTAVFoundationVideoPlayerApi
+@protocol FVPAVFoundationVideoPlayerApi
- (void)initialize:(FlutterError *_Nullable *_Nonnull)error;
/// @return `nil` only when `error != nil`.
-- (nullable FLTTextureMessage *)create:(FLTCreateMessage *)msg
+- (nullable FVPTextureMessage *)create:(FVPCreateMessage *)msg
error:(FlutterError *_Nullable *_Nonnull)error;
-- (void)dispose:(FLTTextureMessage *)msg error:(FlutterError *_Nullable *_Nonnull)error;
-- (void)setLooping:(FLTLoopingMessage *)msg error:(FlutterError *_Nullable *_Nonnull)error;
-- (void)setVolume:(FLTVolumeMessage *)msg error:(FlutterError *_Nullable *_Nonnull)error;
-- (void)setPlaybackSpeed:(FLTPlaybackSpeedMessage *)msg
+- (void)dispose:(FVPTextureMessage *)msg error:(FlutterError *_Nullable *_Nonnull)error;
+- (void)setLooping:(FVPLoopingMessage *)msg error:(FlutterError *_Nullable *_Nonnull)error;
+- (void)setVolume:(FVPVolumeMessage *)msg error:(FlutterError *_Nullable *_Nonnull)error;
+- (void)setPlaybackSpeed:(FVPPlaybackSpeedMessage *)msg
error:(FlutterError *_Nullable *_Nonnull)error;
-- (void)play:(FLTTextureMessage *)msg error:(FlutterError *_Nullable *_Nonnull)error;
+- (void)play:(FVPTextureMessage *)msg error:(FlutterError *_Nullable *_Nonnull)error;
/// @return `nil` only when `error != nil`.
-- (nullable FLTPositionMessage *)position:(FLTTextureMessage *)msg
+- (nullable FVPPositionMessage *)position:(FVPTextureMessage *)msg
error:(FlutterError *_Nullable *_Nonnull)error;
-- (void)seekTo:(FLTPositionMessage *)msg completion:(void (^)(FlutterError *_Nullable))completion;
-- (void)pause:(FLTTextureMessage *)msg error:(FlutterError *_Nullable *_Nonnull)error;
-- (void)setMixWithOthers:(FLTMixWithOthersMessage *)msg
+- (void)seekTo:(FVPPositionMessage *)msg completion:(void (^)(FlutterError *_Nullable))completion;
+- (void)pause:(FVPTextureMessage *)msg error:(FlutterError *_Nullable *_Nonnull)error;
+- (void)setMixWithOthers:(FVPMixWithOthersMessage *)msg
error:(FlutterError *_Nullable *_Nonnull)error;
@end
-extern void FLTAVFoundationVideoPlayerApiSetup(
+extern void FVPAVFoundationVideoPlayerApiSetup(
id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FLTAVFoundationVideoPlayerApi> *_Nullable api);
+ NSObject<FVPAVFoundationVideoPlayerApi> *_Nullable api);
NS_ASSUME_NONNULL_END
diff --git a/packages/video_player/video_player_avfoundation/ios/Classes/messages.g.m b/packages/video_player/video_player_avfoundation/ios/Classes/messages.g.m
index 12bc5c7..3d2a73f 100644
--- a/packages/video_player/video_player_avfoundation/ios/Classes/messages.g.m
+++ b/packages/video_player/video_player_avfoundation/ios/Classes/messages.g.m
@@ -1,11 +1,16 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Autogenerated from Pigeon (v9.2.4), do not edit directly.
+// Autogenerated from Pigeon (v11.0.1), do not edit directly.
// See also: https://pub.dev/packages/pigeon
#import "messages.g.h"
+
+#if TARGET_OS_OSX
+#import <FlutterMacOS/FlutterMacOS.h>
+#else
#import <Flutter/Flutter.h>
+#endif
#if !__has_feature(objc_arc)
#error File requires ARC to be enabled.
@@ -24,62 +29,62 @@
return (result == [NSNull null]) ? nil : result;
}
-@interface FLTTextureMessage ()
-+ (FLTTextureMessage *)fromList:(NSArray *)list;
-+ (nullable FLTTextureMessage *)nullableFromList:(NSArray *)list;
+@interface FVPTextureMessage ()
++ (FVPTextureMessage *)fromList:(NSArray *)list;
++ (nullable FVPTextureMessage *)nullableFromList:(NSArray *)list;
- (NSArray *)toList;
@end
-@interface FLTLoopingMessage ()
-+ (FLTLoopingMessage *)fromList:(NSArray *)list;
-+ (nullable FLTLoopingMessage *)nullableFromList:(NSArray *)list;
+@interface FVPLoopingMessage ()
++ (FVPLoopingMessage *)fromList:(NSArray *)list;
++ (nullable FVPLoopingMessage *)nullableFromList:(NSArray *)list;
- (NSArray *)toList;
@end
-@interface FLTVolumeMessage ()
-+ (FLTVolumeMessage *)fromList:(NSArray *)list;
-+ (nullable FLTVolumeMessage *)nullableFromList:(NSArray *)list;
+@interface FVPVolumeMessage ()
++ (FVPVolumeMessage *)fromList:(NSArray *)list;
++ (nullable FVPVolumeMessage *)nullableFromList:(NSArray *)list;
- (NSArray *)toList;
@end
-@interface FLTPlaybackSpeedMessage ()
-+ (FLTPlaybackSpeedMessage *)fromList:(NSArray *)list;
-+ (nullable FLTPlaybackSpeedMessage *)nullableFromList:(NSArray *)list;
+@interface FVPPlaybackSpeedMessage ()
++ (FVPPlaybackSpeedMessage *)fromList:(NSArray *)list;
++ (nullable FVPPlaybackSpeedMessage *)nullableFromList:(NSArray *)list;
- (NSArray *)toList;
@end
-@interface FLTPositionMessage ()
-+ (FLTPositionMessage *)fromList:(NSArray *)list;
-+ (nullable FLTPositionMessage *)nullableFromList:(NSArray *)list;
+@interface FVPPositionMessage ()
++ (FVPPositionMessage *)fromList:(NSArray *)list;
++ (nullable FVPPositionMessage *)nullableFromList:(NSArray *)list;
- (NSArray *)toList;
@end
-@interface FLTCreateMessage ()
-+ (FLTCreateMessage *)fromList:(NSArray *)list;
-+ (nullable FLTCreateMessage *)nullableFromList:(NSArray *)list;
+@interface FVPCreateMessage ()
++ (FVPCreateMessage *)fromList:(NSArray *)list;
++ (nullable FVPCreateMessage *)nullableFromList:(NSArray *)list;
- (NSArray *)toList;
@end
-@interface FLTMixWithOthersMessage ()
-+ (FLTMixWithOthersMessage *)fromList:(NSArray *)list;
-+ (nullable FLTMixWithOthersMessage *)nullableFromList:(NSArray *)list;
+@interface FVPMixWithOthersMessage ()
++ (FVPMixWithOthersMessage *)fromList:(NSArray *)list;
++ (nullable FVPMixWithOthersMessage *)nullableFromList:(NSArray *)list;
- (NSArray *)toList;
@end
-@implementation FLTTextureMessage
+@implementation FVPTextureMessage
+ (instancetype)makeWithTextureId:(NSNumber *)textureId {
- FLTTextureMessage *pigeonResult = [[FLTTextureMessage alloc] init];
+ FVPTextureMessage *pigeonResult = [[FVPTextureMessage alloc] init];
pigeonResult.textureId = textureId;
return pigeonResult;
}
-+ (FLTTextureMessage *)fromList:(NSArray *)list {
- FLTTextureMessage *pigeonResult = [[FLTTextureMessage alloc] init];
++ (FVPTextureMessage *)fromList:(NSArray *)list {
+ FVPTextureMessage *pigeonResult = [[FVPTextureMessage alloc] init];
pigeonResult.textureId = GetNullableObjectAtIndex(list, 0);
NSAssert(pigeonResult.textureId != nil, @"");
return pigeonResult;
}
-+ (nullable FLTTextureMessage *)nullableFromList:(NSArray *)list {
- return (list) ? [FLTTextureMessage fromList:list] : nil;
++ (nullable FVPTextureMessage *)nullableFromList:(NSArray *)list {
+ return (list) ? [FVPTextureMessage fromList:list] : nil;
}
- (NSArray *)toList {
return @[
@@ -88,23 +93,23 @@
}
@end
-@implementation FLTLoopingMessage
+@implementation FVPLoopingMessage
+ (instancetype)makeWithTextureId:(NSNumber *)textureId isLooping:(NSNumber *)isLooping {
- FLTLoopingMessage *pigeonResult = [[FLTLoopingMessage alloc] init];
+ FVPLoopingMessage *pigeonResult = [[FVPLoopingMessage alloc] init];
pigeonResult.textureId = textureId;
pigeonResult.isLooping = isLooping;
return pigeonResult;
}
-+ (FLTLoopingMessage *)fromList:(NSArray *)list {
- FLTLoopingMessage *pigeonResult = [[FLTLoopingMessage alloc] init];
++ (FVPLoopingMessage *)fromList:(NSArray *)list {
+ FVPLoopingMessage *pigeonResult = [[FVPLoopingMessage alloc] init];
pigeonResult.textureId = GetNullableObjectAtIndex(list, 0);
NSAssert(pigeonResult.textureId != nil, @"");
pigeonResult.isLooping = GetNullableObjectAtIndex(list, 1);
NSAssert(pigeonResult.isLooping != nil, @"");
return pigeonResult;
}
-+ (nullable FLTLoopingMessage *)nullableFromList:(NSArray *)list {
- return (list) ? [FLTLoopingMessage fromList:list] : nil;
++ (nullable FVPLoopingMessage *)nullableFromList:(NSArray *)list {
+ return (list) ? [FVPLoopingMessage fromList:list] : nil;
}
- (NSArray *)toList {
return @[
@@ -114,23 +119,23 @@
}
@end
-@implementation FLTVolumeMessage
+@implementation FVPVolumeMessage
+ (instancetype)makeWithTextureId:(NSNumber *)textureId volume:(NSNumber *)volume {
- FLTVolumeMessage *pigeonResult = [[FLTVolumeMessage alloc] init];
+ FVPVolumeMessage *pigeonResult = [[FVPVolumeMessage alloc] init];
pigeonResult.textureId = textureId;
pigeonResult.volume = volume;
return pigeonResult;
}
-+ (FLTVolumeMessage *)fromList:(NSArray *)list {
- FLTVolumeMessage *pigeonResult = [[FLTVolumeMessage alloc] init];
++ (FVPVolumeMessage *)fromList:(NSArray *)list {
+ FVPVolumeMessage *pigeonResult = [[FVPVolumeMessage alloc] init];
pigeonResult.textureId = GetNullableObjectAtIndex(list, 0);
NSAssert(pigeonResult.textureId != nil, @"");
pigeonResult.volume = GetNullableObjectAtIndex(list, 1);
NSAssert(pigeonResult.volume != nil, @"");
return pigeonResult;
}
-+ (nullable FLTVolumeMessage *)nullableFromList:(NSArray *)list {
- return (list) ? [FLTVolumeMessage fromList:list] : nil;
++ (nullable FVPVolumeMessage *)nullableFromList:(NSArray *)list {
+ return (list) ? [FVPVolumeMessage fromList:list] : nil;
}
- (NSArray *)toList {
return @[
@@ -140,23 +145,23 @@
}
@end
-@implementation FLTPlaybackSpeedMessage
+@implementation FVPPlaybackSpeedMessage
+ (instancetype)makeWithTextureId:(NSNumber *)textureId speed:(NSNumber *)speed {
- FLTPlaybackSpeedMessage *pigeonResult = [[FLTPlaybackSpeedMessage alloc] init];
+ FVPPlaybackSpeedMessage *pigeonResult = [[FVPPlaybackSpeedMessage alloc] init];
pigeonResult.textureId = textureId;
pigeonResult.speed = speed;
return pigeonResult;
}
-+ (FLTPlaybackSpeedMessage *)fromList:(NSArray *)list {
- FLTPlaybackSpeedMessage *pigeonResult = [[FLTPlaybackSpeedMessage alloc] init];
++ (FVPPlaybackSpeedMessage *)fromList:(NSArray *)list {
+ FVPPlaybackSpeedMessage *pigeonResult = [[FVPPlaybackSpeedMessage alloc] init];
pigeonResult.textureId = GetNullableObjectAtIndex(list, 0);
NSAssert(pigeonResult.textureId != nil, @"");
pigeonResult.speed = GetNullableObjectAtIndex(list, 1);
NSAssert(pigeonResult.speed != nil, @"");
return pigeonResult;
}
-+ (nullable FLTPlaybackSpeedMessage *)nullableFromList:(NSArray *)list {
- return (list) ? [FLTPlaybackSpeedMessage fromList:list] : nil;
++ (nullable FVPPlaybackSpeedMessage *)nullableFromList:(NSArray *)list {
+ return (list) ? [FVPPlaybackSpeedMessage fromList:list] : nil;
}
- (NSArray *)toList {
return @[
@@ -166,23 +171,23 @@
}
@end
-@implementation FLTPositionMessage
+@implementation FVPPositionMessage
+ (instancetype)makeWithTextureId:(NSNumber *)textureId position:(NSNumber *)position {
- FLTPositionMessage *pigeonResult = [[FLTPositionMessage alloc] init];
+ FVPPositionMessage *pigeonResult = [[FVPPositionMessage alloc] init];
pigeonResult.textureId = textureId;
pigeonResult.position = position;
return pigeonResult;
}
-+ (FLTPositionMessage *)fromList:(NSArray *)list {
- FLTPositionMessage *pigeonResult = [[FLTPositionMessage alloc] init];
++ (FVPPositionMessage *)fromList:(NSArray *)list {
+ FVPPositionMessage *pigeonResult = [[FVPPositionMessage alloc] init];
pigeonResult.textureId = GetNullableObjectAtIndex(list, 0);
NSAssert(pigeonResult.textureId != nil, @"");
pigeonResult.position = GetNullableObjectAtIndex(list, 1);
NSAssert(pigeonResult.position != nil, @"");
return pigeonResult;
}
-+ (nullable FLTPositionMessage *)nullableFromList:(NSArray *)list {
- return (list) ? [FLTPositionMessage fromList:list] : nil;
++ (nullable FVPPositionMessage *)nullableFromList:(NSArray *)list {
+ return (list) ? [FVPPositionMessage fromList:list] : nil;
}
- (NSArray *)toList {
return @[
@@ -192,13 +197,13 @@
}
@end
-@implementation FLTCreateMessage
+@implementation FVPCreateMessage
+ (instancetype)makeWithAsset:(nullable NSString *)asset
uri:(nullable NSString *)uri
packageName:(nullable NSString *)packageName
formatHint:(nullable NSString *)formatHint
httpHeaders:(NSDictionary<NSString *, NSString *> *)httpHeaders {
- FLTCreateMessage *pigeonResult = [[FLTCreateMessage alloc] init];
+ FVPCreateMessage *pigeonResult = [[FVPCreateMessage alloc] init];
pigeonResult.asset = asset;
pigeonResult.uri = uri;
pigeonResult.packageName = packageName;
@@ -206,8 +211,8 @@
pigeonResult.httpHeaders = httpHeaders;
return pigeonResult;
}
-+ (FLTCreateMessage *)fromList:(NSArray *)list {
- FLTCreateMessage *pigeonResult = [[FLTCreateMessage alloc] init];
++ (FVPCreateMessage *)fromList:(NSArray *)list {
+ FVPCreateMessage *pigeonResult = [[FVPCreateMessage alloc] init];
pigeonResult.asset = GetNullableObjectAtIndex(list, 0);
pigeonResult.uri = GetNullableObjectAtIndex(list, 1);
pigeonResult.packageName = GetNullableObjectAtIndex(list, 2);
@@ -216,8 +221,8 @@
NSAssert(pigeonResult.httpHeaders != nil, @"");
return pigeonResult;
}
-+ (nullable FLTCreateMessage *)nullableFromList:(NSArray *)list {
- return (list) ? [FLTCreateMessage fromList:list] : nil;
++ (nullable FVPCreateMessage *)nullableFromList:(NSArray *)list {
+ return (list) ? [FVPCreateMessage fromList:list] : nil;
}
- (NSArray *)toList {
return @[
@@ -230,20 +235,20 @@
}
@end
-@implementation FLTMixWithOthersMessage
+@implementation FVPMixWithOthersMessage
+ (instancetype)makeWithMixWithOthers:(NSNumber *)mixWithOthers {
- FLTMixWithOthersMessage *pigeonResult = [[FLTMixWithOthersMessage alloc] init];
+ FVPMixWithOthersMessage *pigeonResult = [[FVPMixWithOthersMessage alloc] init];
pigeonResult.mixWithOthers = mixWithOthers;
return pigeonResult;
}
-+ (FLTMixWithOthersMessage *)fromList:(NSArray *)list {
- FLTMixWithOthersMessage *pigeonResult = [[FLTMixWithOthersMessage alloc] init];
++ (FVPMixWithOthersMessage *)fromList:(NSArray *)list {
+ FVPMixWithOthersMessage *pigeonResult = [[FVPMixWithOthersMessage alloc] init];
pigeonResult.mixWithOthers = GetNullableObjectAtIndex(list, 0);
NSAssert(pigeonResult.mixWithOthers != nil, @"");
return pigeonResult;
}
-+ (nullable FLTMixWithOthersMessage *)nullableFromList:(NSArray *)list {
- return (list) ? [FLTMixWithOthersMessage fromList:list] : nil;
++ (nullable FVPMixWithOthersMessage *)nullableFromList:(NSArray *)list {
+ return (list) ? [FVPMixWithOthersMessage fromList:list] : nil;
}
- (NSArray *)toList {
return @[
@@ -252,54 +257,54 @@
}
@end
-@interface FLTAVFoundationVideoPlayerApiCodecReader : FlutterStandardReader
+@interface FVPAVFoundationVideoPlayerApiCodecReader : FlutterStandardReader
@end
-@implementation FLTAVFoundationVideoPlayerApiCodecReader
+@implementation FVPAVFoundationVideoPlayerApiCodecReader
- (nullable id)readValueOfType:(UInt8)type {
switch (type) {
case 128:
- return [FLTCreateMessage fromList:[self readValue]];
+ return [FVPCreateMessage fromList:[self readValue]];
case 129:
- return [FLTLoopingMessage fromList:[self readValue]];
+ return [FVPLoopingMessage fromList:[self readValue]];
case 130:
- return [FLTMixWithOthersMessage fromList:[self readValue]];
+ return [FVPMixWithOthersMessage fromList:[self readValue]];
case 131:
- return [FLTPlaybackSpeedMessage fromList:[self readValue]];
+ return [FVPPlaybackSpeedMessage fromList:[self readValue]];
case 132:
- return [FLTPositionMessage fromList:[self readValue]];
+ return [FVPPositionMessage fromList:[self readValue]];
case 133:
- return [FLTTextureMessage fromList:[self readValue]];
+ return [FVPTextureMessage fromList:[self readValue]];
case 134:
- return [FLTVolumeMessage fromList:[self readValue]];
+ return [FVPVolumeMessage fromList:[self readValue]];
default:
return [super readValueOfType:type];
}
}
@end
-@interface FLTAVFoundationVideoPlayerApiCodecWriter : FlutterStandardWriter
+@interface FVPAVFoundationVideoPlayerApiCodecWriter : FlutterStandardWriter
@end
-@implementation FLTAVFoundationVideoPlayerApiCodecWriter
+@implementation FVPAVFoundationVideoPlayerApiCodecWriter
- (void)writeValue:(id)value {
- if ([value isKindOfClass:[FLTCreateMessage class]]) {
+ if ([value isKindOfClass:[FVPCreateMessage class]]) {
[self writeByte:128];
[self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FLTLoopingMessage class]]) {
+ } else if ([value isKindOfClass:[FVPLoopingMessage class]]) {
[self writeByte:129];
[self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FLTMixWithOthersMessage class]]) {
+ } else if ([value isKindOfClass:[FVPMixWithOthersMessage class]]) {
[self writeByte:130];
[self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FLTPlaybackSpeedMessage class]]) {
+ } else if ([value isKindOfClass:[FVPPlaybackSpeedMessage class]]) {
[self writeByte:131];
[self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FLTPositionMessage class]]) {
+ } else if ([value isKindOfClass:[FVPPositionMessage class]]) {
[self writeByte:132];
[self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FLTTextureMessage class]]) {
+ } else if ([value isKindOfClass:[FVPTextureMessage class]]) {
[self writeByte:133];
[self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FLTVolumeMessage class]]) {
+ } else if ([value isKindOfClass:[FVPVolumeMessage class]]) {
[self writeByte:134];
[self writeValue:[value toList]];
} else {
@@ -308,38 +313,39 @@
}
@end
-@interface FLTAVFoundationVideoPlayerApiCodecReaderWriter : FlutterStandardReaderWriter
+@interface FVPAVFoundationVideoPlayerApiCodecReaderWriter : FlutterStandardReaderWriter
@end
-@implementation FLTAVFoundationVideoPlayerApiCodecReaderWriter
+@implementation FVPAVFoundationVideoPlayerApiCodecReaderWriter
- (FlutterStandardWriter *)writerWithData:(NSMutableData *)data {
- return [[FLTAVFoundationVideoPlayerApiCodecWriter alloc] initWithData:data];
+ return [[FVPAVFoundationVideoPlayerApiCodecWriter alloc] initWithData:data];
}
- (FlutterStandardReader *)readerWithData:(NSData *)data {
- return [[FLTAVFoundationVideoPlayerApiCodecReader alloc] initWithData:data];
+ return [[FVPAVFoundationVideoPlayerApiCodecReader alloc] initWithData:data];
}
@end
-NSObject<FlutterMessageCodec> *FLTAVFoundationVideoPlayerApiGetCodec(void) {
+NSObject<FlutterMessageCodec> *FVPAVFoundationVideoPlayerApiGetCodec(void) {
static FlutterStandardMessageCodec *sSharedObject = nil;
static dispatch_once_t sPred = 0;
dispatch_once(&sPred, ^{
- FLTAVFoundationVideoPlayerApiCodecReaderWriter *readerWriter =
- [[FLTAVFoundationVideoPlayerApiCodecReaderWriter alloc] init];
+ FVPAVFoundationVideoPlayerApiCodecReaderWriter *readerWriter =
+ [[FVPAVFoundationVideoPlayerApiCodecReaderWriter alloc] init];
sSharedObject = [FlutterStandardMessageCodec codecWithReaderWriter:readerWriter];
});
return sSharedObject;
}
-void FLTAVFoundationVideoPlayerApiSetup(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FLTAVFoundationVideoPlayerApi> *api) {
+void FVPAVFoundationVideoPlayerApiSetup(id<FlutterBinaryMessenger> binaryMessenger,
+ NSObject<FVPAVFoundationVideoPlayerApi> *api) {
{
FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:@"dev.flutter.pigeon.AVFoundationVideoPlayerApi.initialize"
+ initWithName:
+ @"dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.initialize"
binaryMessenger:binaryMessenger
- codec:FLTAVFoundationVideoPlayerApiGetCodec()];
+ codec:FVPAVFoundationVideoPlayerApiGetCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(initialize:)],
- @"FLTAVFoundationVideoPlayerApi api (%@) doesn't respond to @selector(initialize:)",
+ @"FVPAVFoundationVideoPlayerApi api (%@) doesn't respond to @selector(initialize:)",
api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
FlutterError *error;
@@ -352,19 +358,20 @@
}
{
FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:@"dev.flutter.pigeon.AVFoundationVideoPlayerApi.create"
+ initWithName:
+ @"dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.create"
binaryMessenger:binaryMessenger
- codec:FLTAVFoundationVideoPlayerApiGetCodec()];
+ codec:FVPAVFoundationVideoPlayerApiGetCodec()];
if (api) {
NSCAssert(
[api respondsToSelector:@selector(create:error:)],
- @"FLTAVFoundationVideoPlayerApi api (%@) doesn't respond to @selector(create:error:)",
+ @"FVPAVFoundationVideoPlayerApi api (%@) doesn't respond to @selector(create:error:)",
api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray *args = message;
- FLTCreateMessage *arg_msg = GetNullableObjectAtIndex(args, 0);
+ FVPCreateMessage *arg_msg = GetNullableObjectAtIndex(args, 0);
FlutterError *error;
- FLTTextureMessage *output = [api create:arg_msg error:&error];
+ FVPTextureMessage *output = [api create:arg_msg error:&error];
callback(wrapResult(output, error));
}];
} else {
@@ -373,17 +380,18 @@
}
{
FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:@"dev.flutter.pigeon.AVFoundationVideoPlayerApi.dispose"
+ initWithName:
+ @"dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.dispose"
binaryMessenger:binaryMessenger
- codec:FLTAVFoundationVideoPlayerApiGetCodec()];
+ codec:FVPAVFoundationVideoPlayerApiGetCodec()];
if (api) {
NSCAssert(
[api respondsToSelector:@selector(dispose:error:)],
- @"FLTAVFoundationVideoPlayerApi api (%@) doesn't respond to @selector(dispose:error:)",
+ @"FVPAVFoundationVideoPlayerApi api (%@) doesn't respond to @selector(dispose:error:)",
api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray *args = message;
- FLTTextureMessage *arg_msg = GetNullableObjectAtIndex(args, 0);
+ FVPTextureMessage *arg_msg = GetNullableObjectAtIndex(args, 0);
FlutterError *error;
[api dispose:arg_msg error:&error];
callback(wrapResult(nil, error));
@@ -394,17 +402,18 @@
}
{
FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:@"dev.flutter.pigeon.AVFoundationVideoPlayerApi.setLooping"
+ initWithName:
+ @"dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setLooping"
binaryMessenger:binaryMessenger
- codec:FLTAVFoundationVideoPlayerApiGetCodec()];
+ codec:FVPAVFoundationVideoPlayerApiGetCodec()];
if (api) {
NSCAssert(
[api respondsToSelector:@selector(setLooping:error:)],
- @"FLTAVFoundationVideoPlayerApi api (%@) doesn't respond to @selector(setLooping:error:)",
+ @"FVPAVFoundationVideoPlayerApi api (%@) doesn't respond to @selector(setLooping:error:)",
api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray *args = message;
- FLTLoopingMessage *arg_msg = GetNullableObjectAtIndex(args, 0);
+ FVPLoopingMessage *arg_msg = GetNullableObjectAtIndex(args, 0);
FlutterError *error;
[api setLooping:arg_msg error:&error];
callback(wrapResult(nil, error));
@@ -415,17 +424,18 @@
}
{
FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:@"dev.flutter.pigeon.AVFoundationVideoPlayerApi.setVolume"
+ initWithName:
+ @"dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setVolume"
binaryMessenger:binaryMessenger
- codec:FLTAVFoundationVideoPlayerApiGetCodec()];
+ codec:FVPAVFoundationVideoPlayerApiGetCodec()];
if (api) {
NSCAssert(
[api respondsToSelector:@selector(setVolume:error:)],
- @"FLTAVFoundationVideoPlayerApi api (%@) doesn't respond to @selector(setVolume:error:)",
+ @"FVPAVFoundationVideoPlayerApi api (%@) doesn't respond to @selector(setVolume:error:)",
api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray *args = message;
- FLTVolumeMessage *arg_msg = GetNullableObjectAtIndex(args, 0);
+ FVPVolumeMessage *arg_msg = GetNullableObjectAtIndex(args, 0);
FlutterError *error;
[api setVolume:arg_msg error:&error];
callback(wrapResult(nil, error));
@@ -436,17 +446,18 @@
}
{
FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:@"dev.flutter.pigeon.AVFoundationVideoPlayerApi.setPlaybackSpeed"
+ initWithName:@"dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi."
+ @"setPlaybackSpeed"
binaryMessenger:binaryMessenger
- codec:FLTAVFoundationVideoPlayerApiGetCodec()];
+ codec:FVPAVFoundationVideoPlayerApiGetCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(setPlaybackSpeed:error:)],
- @"FLTAVFoundationVideoPlayerApi api (%@) doesn't respond to "
+ @"FVPAVFoundationVideoPlayerApi api (%@) doesn't respond to "
@"@selector(setPlaybackSpeed:error:)",
api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray *args = message;
- FLTPlaybackSpeedMessage *arg_msg = GetNullableObjectAtIndex(args, 0);
+ FVPPlaybackSpeedMessage *arg_msg = GetNullableObjectAtIndex(args, 0);
FlutterError *error;
[api setPlaybackSpeed:arg_msg error:&error];
callback(wrapResult(nil, error));
@@ -457,16 +468,17 @@
}
{
FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:@"dev.flutter.pigeon.AVFoundationVideoPlayerApi.play"
+ initWithName:
+ @"dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.play"
binaryMessenger:binaryMessenger
- codec:FLTAVFoundationVideoPlayerApiGetCodec()];
+ codec:FVPAVFoundationVideoPlayerApiGetCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(play:error:)],
- @"FLTAVFoundationVideoPlayerApi api (%@) doesn't respond to @selector(play:error:)",
+ @"FVPAVFoundationVideoPlayerApi api (%@) doesn't respond to @selector(play:error:)",
api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray *args = message;
- FLTTextureMessage *arg_msg = GetNullableObjectAtIndex(args, 0);
+ FVPTextureMessage *arg_msg = GetNullableObjectAtIndex(args, 0);
FlutterError *error;
[api play:arg_msg error:&error];
callback(wrapResult(nil, error));
@@ -477,19 +489,20 @@
}
{
FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:@"dev.flutter.pigeon.AVFoundationVideoPlayerApi.position"
+ initWithName:
+ @"dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.position"
binaryMessenger:binaryMessenger
- codec:FLTAVFoundationVideoPlayerApiGetCodec()];
+ codec:FVPAVFoundationVideoPlayerApiGetCodec()];
if (api) {
NSCAssert(
[api respondsToSelector:@selector(position:error:)],
- @"FLTAVFoundationVideoPlayerApi api (%@) doesn't respond to @selector(position:error:)",
+ @"FVPAVFoundationVideoPlayerApi api (%@) doesn't respond to @selector(position:error:)",
api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray *args = message;
- FLTTextureMessage *arg_msg = GetNullableObjectAtIndex(args, 0);
+ FVPTextureMessage *arg_msg = GetNullableObjectAtIndex(args, 0);
FlutterError *error;
- FLTPositionMessage *output = [api position:arg_msg error:&error];
+ FVPPositionMessage *output = [api position:arg_msg error:&error];
callback(wrapResult(output, error));
}];
} else {
@@ -498,17 +511,18 @@
}
{
FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:@"dev.flutter.pigeon.AVFoundationVideoPlayerApi.seekTo"
+ initWithName:
+ @"dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.seekTo"
binaryMessenger:binaryMessenger
- codec:FLTAVFoundationVideoPlayerApiGetCodec()];
+ codec:FVPAVFoundationVideoPlayerApiGetCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(seekTo:completion:)],
- @"FLTAVFoundationVideoPlayerApi api (%@) doesn't respond to "
+ @"FVPAVFoundationVideoPlayerApi api (%@) doesn't respond to "
@"@selector(seekTo:completion:)",
api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray *args = message;
- FLTPositionMessage *arg_msg = GetNullableObjectAtIndex(args, 0);
+ FVPPositionMessage *arg_msg = GetNullableObjectAtIndex(args, 0);
[api seekTo:arg_msg
completion:^(FlutterError *_Nullable error) {
callback(wrapResult(nil, error));
@@ -520,17 +534,18 @@
}
{
FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:@"dev.flutter.pigeon.AVFoundationVideoPlayerApi.pause"
+ initWithName:
+ @"dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.pause"
binaryMessenger:binaryMessenger
- codec:FLTAVFoundationVideoPlayerApiGetCodec()];
+ codec:FVPAVFoundationVideoPlayerApiGetCodec()];
if (api) {
NSCAssert(
[api respondsToSelector:@selector(pause:error:)],
- @"FLTAVFoundationVideoPlayerApi api (%@) doesn't respond to @selector(pause:error:)",
+ @"FVPAVFoundationVideoPlayerApi api (%@) doesn't respond to @selector(pause:error:)",
api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray *args = message;
- FLTTextureMessage *arg_msg = GetNullableObjectAtIndex(args, 0);
+ FVPTextureMessage *arg_msg = GetNullableObjectAtIndex(args, 0);
FlutterError *error;
[api pause:arg_msg error:&error];
callback(wrapResult(nil, error));
@@ -541,17 +556,18 @@
}
{
FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:@"dev.flutter.pigeon.AVFoundationVideoPlayerApi.setMixWithOthers"
+ initWithName:@"dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi."
+ @"setMixWithOthers"
binaryMessenger:binaryMessenger
- codec:FLTAVFoundationVideoPlayerApiGetCodec()];
+ codec:FVPAVFoundationVideoPlayerApiGetCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(setMixWithOthers:error:)],
- @"FLTAVFoundationVideoPlayerApi api (%@) doesn't respond to "
+ @"FVPAVFoundationVideoPlayerApi api (%@) doesn't respond to "
@"@selector(setMixWithOthers:error:)",
api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray *args = message;
- FLTMixWithOthersMessage *arg_msg = GetNullableObjectAtIndex(args, 0);
+ FVPMixWithOthersMessage *arg_msg = GetNullableObjectAtIndex(args, 0);
FlutterError *error;
[api setMixWithOthers:arg_msg error:&error];
callback(wrapResult(nil, error));
diff --git a/packages/video_player/video_player_avfoundation/lib/src/messages.g.dart b/packages/video_player/video_player_avfoundation/lib/src/messages.g.dart
index c283aee..f620e22 100644
--- a/packages/video_player/video_player_avfoundation/lib/src/messages.g.dart
+++ b/packages/video_player/video_player_avfoundation/lib/src/messages.g.dart
@@ -1,7 +1,7 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Autogenerated from Pigeon (v9.2.4), do not edit directly.
+// Autogenerated from Pigeon (v11.0.1), do not edit directly.
// See also: https://pub.dev/packages/pigeon
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import
@@ -264,7 +264,8 @@
Future<void> initialize() async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.initialize', codec,
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.initialize',
+ codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList = await channel.send(null) as List<Object?>?;
if (replyList == null) {
@@ -285,7 +286,8 @@
Future<TextureMessage> create(CreateMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.create', codec,
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.create',
+ codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
@@ -312,7 +314,8 @@
Future<void> dispose(TextureMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.dispose', codec,
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.dispose',
+ codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
@@ -334,7 +337,8 @@
Future<void> setLooping(LoopingMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.setLooping', codec,
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setLooping',
+ codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
@@ -356,7 +360,8 @@
Future<void> setVolume(VolumeMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.setVolume', codec,
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setVolume',
+ codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
@@ -378,7 +383,8 @@
Future<void> setPlaybackSpeed(PlaybackSpeedMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.setPlaybackSpeed', codec,
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setPlaybackSpeed',
+ codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
@@ -400,7 +406,8 @@
Future<void> play(TextureMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.play', codec,
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.play',
+ codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
@@ -422,7 +429,8 @@
Future<PositionMessage> position(TextureMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.position', codec,
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.position',
+ codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
@@ -449,7 +457,8 @@
Future<void> seekTo(PositionMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.seekTo', codec,
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.seekTo',
+ codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
@@ -471,7 +480,8 @@
Future<void> pause(TextureMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.pause', codec,
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.pause',
+ codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
@@ -493,7 +503,8 @@
Future<void> setMixWithOthers(MixWithOthersMessage arg_msg) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.setMixWithOthers', codec,
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setMixWithOthers',
+ codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_msg]) as List<Object?>?;
diff --git a/packages/video_player/video_player_avfoundation/pigeons/messages.dart b/packages/video_player/video_player_avfoundation/pigeons/messages.dart
index f4418db..2aeacef 100644
--- a/packages/video_player/video_player_avfoundation/pigeons/messages.dart
+++ b/packages/video_player/video_player_avfoundation/pigeons/messages.dart
@@ -10,7 +10,7 @@
objcHeaderOut: 'ios/Classes/messages.g.h',
objcSourceOut: 'ios/Classes/messages.g.m',
objcOptions: ObjcOptions(
- prefix: 'FLT',
+ prefix: 'FVP',
),
copyrightHeader: 'pigeons/copyright.txt',
))
diff --git a/packages/video_player/video_player_avfoundation/pubspec.yaml b/packages/video_player/video_player_avfoundation/pubspec.yaml
index dc3de6f..eb4292c 100644
--- a/packages/video_player/video_player_avfoundation/pubspec.yaml
+++ b/packages/video_player/video_player_avfoundation/pubspec.yaml
@@ -2,7 +2,7 @@
description: iOS 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.4.10
+version: 2.4.11
environment:
sdk: ">=2.19.0 <4.0.0"
@@ -14,7 +14,7 @@
platforms:
ios:
dartPluginClass: AVFoundationVideoPlayer
- pluginClass: FLTVideoPlayerPlugin
+ pluginClass: FVPVideoPlayerPlugin
dependencies:
flutter:
@@ -24,7 +24,7 @@
dev_dependencies:
flutter_test:
sdk: flutter
- pigeon: ^9.2.4
+ pigeon: ^11.0.1
topics:
- video
diff --git a/packages/video_player/video_player_avfoundation/test/test_api.g.dart b/packages/video_player/video_player_avfoundation/test/test_api.g.dart
index bdfb356..19d0c08 100644
--- a/packages/video_player/video_player_avfoundation/test/test_api.g.dart
+++ b/packages/video_player/video_player_avfoundation/test/test_api.g.dart
@@ -1,7 +1,7 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Autogenerated from Pigeon (v9.2.4), do not edit directly.
+// Autogenerated from Pigeon (v11.0.1), do not edit directly.
// See also: https://pub.dev/packages/pigeon
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, unnecessary_import
// ignore_for_file: avoid_relative_lib_imports
@@ -97,7 +97,8 @@
{BinaryMessenger? binaryMessenger}) {
{
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.initialize', codec,
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.initialize',
+ codec,
binaryMessenger: binaryMessenger);
if (api == null) {
_testBinaryMessengerBinding!.defaultBinaryMessenger
@@ -114,7 +115,8 @@
}
{
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.create', codec,
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.create',
+ codec,
binaryMessenger: binaryMessenger);
if (api == null) {
_testBinaryMessengerBinding!.defaultBinaryMessenger
@@ -124,11 +126,11 @@
.setMockDecodedMessageHandler<Object?>(channel,
(Object? message) async {
assert(message != null,
- 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.create was null.');
+ 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.create was null.');
final List<Object?> args = (message as List<Object?>?)!;
final CreateMessage? arg_msg = (args[0] as CreateMessage?);
assert(arg_msg != null,
- 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.create was null, expected non-null CreateMessage.');
+ 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.create was null, expected non-null CreateMessage.');
final TextureMessage output = api.create(arg_msg!);
return <Object?>[output];
});
@@ -136,7 +138,8 @@
}
{
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.dispose', codec,
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.dispose',
+ codec,
binaryMessenger: binaryMessenger);
if (api == null) {
_testBinaryMessengerBinding!.defaultBinaryMessenger
@@ -146,11 +149,11 @@
.setMockDecodedMessageHandler<Object?>(channel,
(Object? message) async {
assert(message != null,
- 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.dispose was null.');
+ 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.dispose was null.');
final List<Object?> args = (message as List<Object?>?)!;
final TextureMessage? arg_msg = (args[0] as TextureMessage?);
assert(arg_msg != null,
- 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.dispose was null, expected non-null TextureMessage.');
+ 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.dispose was null, expected non-null TextureMessage.');
api.dispose(arg_msg!);
return <Object?>[];
});
@@ -158,7 +161,8 @@
}
{
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.setLooping', codec,
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setLooping',
+ codec,
binaryMessenger: binaryMessenger);
if (api == null) {
_testBinaryMessengerBinding!.defaultBinaryMessenger
@@ -168,11 +172,11 @@
.setMockDecodedMessageHandler<Object?>(channel,
(Object? message) async {
assert(message != null,
- 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.setLooping was null.');
+ 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setLooping was null.');
final List<Object?> args = (message as List<Object?>?)!;
final LoopingMessage? arg_msg = (args[0] as LoopingMessage?);
assert(arg_msg != null,
- 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.setLooping was null, expected non-null LoopingMessage.');
+ 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setLooping was null, expected non-null LoopingMessage.');
api.setLooping(arg_msg!);
return <Object?>[];
});
@@ -180,7 +184,8 @@
}
{
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.setVolume', codec,
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setVolume',
+ codec,
binaryMessenger: binaryMessenger);
if (api == null) {
_testBinaryMessengerBinding!.defaultBinaryMessenger
@@ -190,11 +195,11 @@
.setMockDecodedMessageHandler<Object?>(channel,
(Object? message) async {
assert(message != null,
- 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.setVolume was null.');
+ 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setVolume was null.');
final List<Object?> args = (message as List<Object?>?)!;
final VolumeMessage? arg_msg = (args[0] as VolumeMessage?);
assert(arg_msg != null,
- 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.setVolume was null, expected non-null VolumeMessage.');
+ 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setVolume was null, expected non-null VolumeMessage.');
api.setVolume(arg_msg!);
return <Object?>[];
});
@@ -202,7 +207,7 @@
}
{
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.setPlaybackSpeed',
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setPlaybackSpeed',
codec,
binaryMessenger: binaryMessenger);
if (api == null) {
@@ -213,12 +218,12 @@
.setMockDecodedMessageHandler<Object?>(channel,
(Object? message) async {
assert(message != null,
- 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.setPlaybackSpeed was null.');
+ 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setPlaybackSpeed was null.');
final List<Object?> args = (message as List<Object?>?)!;
final PlaybackSpeedMessage? arg_msg =
(args[0] as PlaybackSpeedMessage?);
assert(arg_msg != null,
- 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.setPlaybackSpeed was null, expected non-null PlaybackSpeedMessage.');
+ 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setPlaybackSpeed was null, expected non-null PlaybackSpeedMessage.');
api.setPlaybackSpeed(arg_msg!);
return <Object?>[];
});
@@ -226,95 +231,7 @@
}
{
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.play', codec,
- binaryMessenger: binaryMessenger);
- if (api == null) {
- _testBinaryMessengerBinding!.defaultBinaryMessenger
- .setMockDecodedMessageHandler<Object?>(channel, null);
- } else {
- _testBinaryMessengerBinding!.defaultBinaryMessenger
- .setMockDecodedMessageHandler<Object?>(channel,
- (Object? message) async {
- assert(message != null,
- 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.play was null.');
- final List<Object?> args = (message as List<Object?>?)!;
- final TextureMessage? arg_msg = (args[0] as TextureMessage?);
- assert(arg_msg != null,
- 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.play was null, expected non-null TextureMessage.');
- api.play(arg_msg!);
- return <Object?>[];
- });
- }
- }
- {
- final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.position', codec,
- binaryMessenger: binaryMessenger);
- if (api == null) {
- _testBinaryMessengerBinding!.defaultBinaryMessenger
- .setMockDecodedMessageHandler<Object?>(channel, null);
- } else {
- _testBinaryMessengerBinding!.defaultBinaryMessenger
- .setMockDecodedMessageHandler<Object?>(channel,
- (Object? message) async {
- assert(message != null,
- 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.position was null.');
- final List<Object?> args = (message as List<Object?>?)!;
- final TextureMessage? arg_msg = (args[0] as TextureMessage?);
- assert(arg_msg != null,
- 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.position was null, expected non-null TextureMessage.');
- final PositionMessage output = api.position(arg_msg!);
- return <Object?>[output];
- });
- }
- }
- {
- final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.seekTo', codec,
- binaryMessenger: binaryMessenger);
- if (api == null) {
- _testBinaryMessengerBinding!.defaultBinaryMessenger
- .setMockDecodedMessageHandler<Object?>(channel, null);
- } else {
- _testBinaryMessengerBinding!.defaultBinaryMessenger
- .setMockDecodedMessageHandler<Object?>(channel,
- (Object? message) async {
- assert(message != null,
- 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.seekTo was null.');
- final List<Object?> args = (message as List<Object?>?)!;
- final PositionMessage? arg_msg = (args[0] as PositionMessage?);
- assert(arg_msg != null,
- 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.seekTo was null, expected non-null PositionMessage.');
- await api.seekTo(arg_msg!);
- return <Object?>[];
- });
- }
- }
- {
- final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.pause', codec,
- binaryMessenger: binaryMessenger);
- if (api == null) {
- _testBinaryMessengerBinding!.defaultBinaryMessenger
- .setMockDecodedMessageHandler<Object?>(channel, null);
- } else {
- _testBinaryMessengerBinding!.defaultBinaryMessenger
- .setMockDecodedMessageHandler<Object?>(channel,
- (Object? message) async {
- assert(message != null,
- 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.pause was null.');
- final List<Object?> args = (message as List<Object?>?)!;
- final TextureMessage? arg_msg = (args[0] as TextureMessage?);
- assert(arg_msg != null,
- 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.pause was null, expected non-null TextureMessage.');
- api.pause(arg_msg!);
- return <Object?>[];
- });
- }
- }
- {
- final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
- 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.setMixWithOthers',
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.play',
codec,
binaryMessenger: binaryMessenger);
if (api == null) {
@@ -325,12 +242,104 @@
.setMockDecodedMessageHandler<Object?>(channel,
(Object? message) async {
assert(message != null,
- 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.setMixWithOthers was null.');
+ 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.play was null.');
+ final List<Object?> args = (message as List<Object?>?)!;
+ final TextureMessage? arg_msg = (args[0] as TextureMessage?);
+ assert(arg_msg != null,
+ 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.play was null, expected non-null TextureMessage.');
+ api.play(arg_msg!);
+ return <Object?>[];
+ });
+ }
+ }
+ {
+ final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.position',
+ codec,
+ binaryMessenger: binaryMessenger);
+ if (api == null) {
+ _testBinaryMessengerBinding!.defaultBinaryMessenger
+ .setMockDecodedMessageHandler<Object?>(channel, null);
+ } else {
+ _testBinaryMessengerBinding!.defaultBinaryMessenger
+ .setMockDecodedMessageHandler<Object?>(channel,
+ (Object? message) async {
+ assert(message != null,
+ 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.position was null.');
+ final List<Object?> args = (message as List<Object?>?)!;
+ final TextureMessage? arg_msg = (args[0] as TextureMessage?);
+ assert(arg_msg != null,
+ 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.position was null, expected non-null TextureMessage.');
+ final PositionMessage output = api.position(arg_msg!);
+ return <Object?>[output];
+ });
+ }
+ }
+ {
+ final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.seekTo',
+ codec,
+ binaryMessenger: binaryMessenger);
+ if (api == null) {
+ _testBinaryMessengerBinding!.defaultBinaryMessenger
+ .setMockDecodedMessageHandler<Object?>(channel, null);
+ } else {
+ _testBinaryMessengerBinding!.defaultBinaryMessenger
+ .setMockDecodedMessageHandler<Object?>(channel,
+ (Object? message) async {
+ assert(message != null,
+ 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.seekTo was null.');
+ final List<Object?> args = (message as List<Object?>?)!;
+ final PositionMessage? arg_msg = (args[0] as PositionMessage?);
+ assert(arg_msg != null,
+ 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.seekTo was null, expected non-null PositionMessage.');
+ await api.seekTo(arg_msg!);
+ return <Object?>[];
+ });
+ }
+ }
+ {
+ final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.pause',
+ codec,
+ binaryMessenger: binaryMessenger);
+ if (api == null) {
+ _testBinaryMessengerBinding!.defaultBinaryMessenger
+ .setMockDecodedMessageHandler<Object?>(channel, null);
+ } else {
+ _testBinaryMessengerBinding!.defaultBinaryMessenger
+ .setMockDecodedMessageHandler<Object?>(channel,
+ (Object? message) async {
+ assert(message != null,
+ 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.pause was null.');
+ final List<Object?> args = (message as List<Object?>?)!;
+ final TextureMessage? arg_msg = (args[0] as TextureMessage?);
+ assert(arg_msg != null,
+ 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.pause was null, expected non-null TextureMessage.');
+ api.pause(arg_msg!);
+ return <Object?>[];
+ });
+ }
+ }
+ {
+ final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
+ 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setMixWithOthers',
+ codec,
+ binaryMessenger: binaryMessenger);
+ if (api == null) {
+ _testBinaryMessengerBinding!.defaultBinaryMessenger
+ .setMockDecodedMessageHandler<Object?>(channel, null);
+ } else {
+ _testBinaryMessengerBinding!.defaultBinaryMessenger
+ .setMockDecodedMessageHandler<Object?>(channel,
+ (Object? message) async {
+ assert(message != null,
+ 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setMixWithOthers was null.');
final List<Object?> args = (message as List<Object?>?)!;
final MixWithOthersMessage? arg_msg =
(args[0] as MixWithOthersMessage?);
assert(arg_msg != null,
- 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.setMixWithOthers was null, expected non-null MixWithOthersMessage.');
+ 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setMixWithOthers was null, expected non-null MixWithOthersMessage.');
api.setMixWithOthers(arg_msg!);
return <Object?>[];
});