diff --git a/packages/video_player/video_player_avfoundation/CHANGELOG.md b/packages/video_player/video_player_avfoundation/CHANGELOG.md index 26ee529c6fd01..955e182a1ac91 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 ef22338be36b6..dbee6ac64f612 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 #import -#import +#import -@interface FLTVideoPlayer : NSObject +@interface FVPVideoPlayer : NSObject @property(readonly, nonatomic) AVPlayer *player; @property(readonly, nonatomic) AVPlayerLayer *playerLayer; @property(readonly, nonatomic) int64_t position; @@ -18,9 +18,9 @@ @interface FLTVideoPlayer : NSObject - (void)onTextureUnregistered:(NSObject *)texture; @end -@interface FLTVideoPlayerPlugin (Test) +@interface FVPVideoPlayerPlugin (Test) @property(readonly, strong, nonatomic) - NSMutableDictionary *playersByTextureId; + NSMutableDictionary *playersByTextureId; @end @interface FakeAVAssetTrack : AVAssetTrack @@ -116,23 +116,23 @@ - (void)testBlankVideoBugWithEncryptedVideoStreamAndInvertedAspectRatioBugForSom (NSObject *)[[UIApplication sharedApplication] delegate]; NSObject *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 @@ - (void)testSeekToInvokesTextureFrameAvailableOnTextureRegistry { [registry registrarForPlugin:@"SeekToInvokestextureFrameAvailable"]; NSObject *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 @@ - (void)testSeekToInvokesTextureFrameAvailableOnTextureRegistry { [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 @@ - (void)testDeregistersFromPlayer { (NSObject *)[[UIApplication sharedApplication] delegate]; NSObject *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 @@ - (void)testBufferingStateFromPlayer { (NSObject *)[[UIApplication sharedApplication] delegate]; NSObject *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 @@ - (void)testVideoControls { (NSObject *)[[UIApplication sharedApplication] delegate]; NSObject *registrar = [registry registrarForPlugin:@"TestVideoControls"]; - FLTVideoPlayerPlugin *videoPlayerPlugin = - (FLTVideoPlayerPlugin *)[[FLTVideoPlayerPlugin alloc] initWithRegistrar:registrar]; + FVPVideoPlayerPlugin *videoPlayerPlugin = + (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; NSDictionary *videoInitialization = [self testPlugin:videoPlayerPlugin @@ -276,8 +276,8 @@ - (void)testAudioControls { (NSObject *)[[UIApplication sharedApplication] delegate]; NSObject *registrar = [registry registrarForPlugin:@"TestAudioControls"]; - FLTVideoPlayerPlugin *videoPlayerPlugin = - (FLTVideoPlayerPlugin *)[[FLTVideoPlayerPlugin alloc] initWithRegistrar:registrar]; + FVPVideoPlayerPlugin *videoPlayerPlugin = + (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; NSDictionary *audioInitialization = [self testPlugin:videoPlayerPlugin @@ -293,8 +293,8 @@ - (void)testHLSControls { (NSObject *)[[UIApplication sharedApplication] delegate]; NSObject *registrar = [registry registrarForPlugin:@"TestHLSControls"]; - FLTVideoPlayerPlugin *videoPlayerPlugin = - (FLTVideoPlayerPlugin *)[[FLTVideoPlayerPlugin alloc] initWithRegistrar:registrar]; + FVPVideoPlayerPlugin *videoPlayerPlugin = + (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; NSDictionary *videoInitialization = [self testPlugin:videoPlayerPlugin @@ -323,25 +323,25 @@ - (void)testSeekToleranceWhenNotSeekingToEnd { 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 @@ - (void)testSeekToleranceWhenSeekingToEnd { 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 @@ - (void)testSeekToleranceWhenSeekingToEnd { XCTAssertGreaterThan([stubAVPlayer.afterTolerance intValue], 0); } -- (NSDictionary *)testPlugin:(FLTVideoPlayerPlugin *)videoPlayerPlugin +- (NSDictionary *)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 @@ - (void)testSeekToleranceWhenSeekingToEnd { 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 @@ - (void)testSeekToleranceWhenSeekingToEnd { 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 @@ - (void)testDoesNotCrashOnRateObservationAfterDisposal { [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 @@ - (void)testDoesNotCrashOnRateObservationAfterDisposal { 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 @@ - (void)testDoesNotCrashOnRateObservationAfterDisposal { } // 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 *registry = @@ -507,24 +507,24 @@ - (void)testHotReloadDoesNotCrash { NSObject *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 @@ - (void)testHotReloadDoesNotCrash { 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)testHotReloadDoesNotCrash { - (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 9d736bc21afea..a09af39a90ef8 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 de75859a94a4c..858e1f289f25d 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 -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 a737d05628f82..b0ed49da22ae1 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 -@interface FLTVideoPlayerPlugin : NSObject +@interface FVPVideoPlayerPlugin : NSObject - (instancetype)initWithRegistrar:(NSObject *)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 f4504aac24174..5b00ab87fd90c 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 #import @@ -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 *registry; - (void)onDisplayLink:(CADisplayLink *)link; @end -@implementation FLTFrameUpdater -- (FLTFrameUpdater *)initWithRegistry:(NSObject *)registry { +@implementation FVPFrameUpdater +- (FVPFrameUpdater *)initWithRegistry:(NSObject *)registry { NSAssert(self, @"super init cannot be nil"); if (self == nil) return nil; _registry = registry; @@ -44,7 +44,7 @@ - (AVPlayer *)playerWithPlayerItem:(AVPlayerItem *)playerItem { @end -@interface FLTVideoPlayer : NSObject +@interface FVPVideoPlayer : NSObject @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 @@ @interface FLTVideoPlayer : NSObject @property(nonatomic) BOOL isLooping; @property(nonatomic, readonly) BOOL isInitialized; - (instancetype)initWithURL:(NSURL *)url - frameUpdater:(FLTFrameUpdater *)frameUpdater + frameUpdater:(FVPFrameUpdater *)frameUpdater httpHeaders:(nonnull NSDictionary *)headers playerFactory:(id)playerFactory; @end @@ -74,9 +74,9 @@ - (instancetype)initWithURL:(NSURL *)url static void *playbackLikelyToKeepUpContext = &playbackLikelyToKeepUpContext; static void *rateContext = &rateContext; -@implementation FLTVideoPlayer +@implementation FVPVideoPlayer - (instancetype)initWithAsset:(NSString *)asset - frameUpdater:(FLTFrameUpdater *)frameUpdater + frameUpdater:(FVPFrameUpdater *)frameUpdater playerFactory:(id)playerFactory { NSString *path = [[NSBundle mainBundle] pathForResource:asset ofType:nil]; return [self initWithURL:[NSURL fileURLWithPath:path] @@ -134,7 +134,7 @@ - (void)itemDidPlayToEndTime:(NSNotification *)notification { 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 @@ - (AVMutableVideoComposition *)getVideoCompositionWithTransform:(CGAffineTransfo return videoComposition; } -- (void)createVideoOutputAndDisplayLink:(FLTFrameUpdater *)frameUpdater { +- (void)createVideoOutputAndDisplayLink:(FVPFrameUpdater *)frameUpdater { NSDictionary *pixBuffAttributes = @{ (id)kCVPixelBufferPixelFormatTypeKey : @(kCVPixelFormatType_32BGRA), (id)kCVPixelBufferIOSurfacePropertiesKey : @{} @@ -209,7 +209,7 @@ - (void)createVideoOutputAndDisplayLink:(FLTFrameUpdater *)frameUpdater { } - (instancetype)initWithURL:(NSURL *)url - frameUpdater:(FLTFrameUpdater *)frameUpdater + frameUpdater:(FVPFrameUpdater *)frameUpdater httpHeaders:(nonnull NSDictionary *)headers playerFactory:(id)playerFactory { NSDictionary *options = nil; @@ -222,7 +222,7 @@ - (instancetype)initWithURL:(NSURL *)url } - (instancetype)initWithPlayerItem:(AVPlayerItem *)item - frameUpdater:(FLTFrameUpdater *)frameUpdater + frameUpdater:(FVPFrameUpdater *)frameUpdater playerFactory:(id)playerFactory { self = [super init]; NSAssert(self, @"super init cannot be nil"); @@ -238,7 +238,7 @@ - (instancetype)initWithPlayerItem:(AVPlayerItem *)item 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 @@ - (void)observeValueForKeyPath:(NSString *)path NSMutableArray *> *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 @@ - (void)pause { } - (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 @@ - (FlutterError *_Nullable)onListenWithArguments:(id _Nullable)arguments - (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 @@ - (void)dispose { @end -@interface FLTVideoPlayerPlugin () +@interface FVPVideoPlayerPlugin () @property(readonly, weak, nonatomic) NSObject *registry; @property(readonly, weak, nonatomic) NSObject *messenger; @property(readonly, strong, nonatomic) - NSMutableDictionary *playersByTextureId; + NSMutableDictionary *playersByTextureId; @property(readonly, strong, nonatomic) NSObject *registrar; @property(nonatomic, strong) id playerFactory; @end -@implementation FLTVideoPlayerPlugin +@implementation FVPVideoPlayerPlugin + (void)registerWithRegistrar:(NSObject *)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 *)registrar { @@ -573,11 +573,11 @@ - (void)detachFromEngineForRegistrar:(NSObject *)registr // 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 @@ - (FLTTextureMessage *)onPlayerSetup:(FLTVideoPlayer *)player [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 @@ - (void)initialize:(FlutterError *__autoreleasing *)error { [[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 @@ - (FLTTextureMessage *)create:(FLTCreateMessage *)input error:(FlutterError **)e 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 @@ - (FLTTextureMessage *)create:(FLTCreateMessage *)input error:(FlutterError **)e 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 @@ - (FLTTextureMessage *)create:(FLTCreateMessage *)input error:(FlutterError **)e } } -- (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)dispose:(FLTTextureMessage *)input error:(FlutterError **)error { }); } -- (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)seekTo:(FLTPositionMessage *)input }]; } -- (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 88% 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 4c52ba00f9637..a1e2804bb5dc3 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 @@ -11,7 +11,7 @@ - (AVPlayer *)playerWithPlayerItem:(AVPlayerItem *)playerItem; @end -@interface FLTVideoPlayerPlugin () +@interface FVPVideoPlayerPlugin () - (instancetype)initWithPlayerFactory:(id)playerFactory registrar:(NSObject *)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 19db3e92966f2..c66e5ad9d5536 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 @@ -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 @@ NS_ASSUME_NONNULL_BEGIN @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 @@ NS_ASSUME_NONNULL_BEGIN @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 @@ NS_ASSUME_NONNULL_BEGIN @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 @@ NS_ASSUME_NONNULL_BEGIN @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 @@ NS_ASSUME_NONNULL_BEGIN @property(nonatomic, strong) NSDictionary *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 *FLTAVFoundationVideoPlayerApiGetCodec(void); +/// The codec used by FVPAVFoundationVideoPlayerApi. +NSObject *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 binaryMessenger, - NSObject *_Nullable api); + NSObject *_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 12bc5c70dcdb2..3d2a73fc6b980 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 +#else #import +#endif #if !__has_feature(objc_arc) #error File requires ARC to be enabled. @@ -24,62 +29,62 @@ static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) { 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 @@ - (NSArray *)toList { } @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 @@ - (NSArray *)toList { } @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 @@ - (NSArray *)toList { } @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 @@ - (NSArray *)toList { } @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 @@ - (NSArray *)toList { } @end -@implementation FLTCreateMessage +@implementation FVPCreateMessage + (instancetype)makeWithAsset:(nullable NSString *)asset uri:(nullable NSString *)uri packageName:(nullable NSString *)packageName formatHint:(nullable NSString *)formatHint httpHeaders:(NSDictionary *)httpHeaders { - FLTCreateMessage *pigeonResult = [[FLTCreateMessage alloc] init]; + FVPCreateMessage *pigeonResult = [[FVPCreateMessage alloc] init]; pigeonResult.asset = asset; pigeonResult.uri = uri; pigeonResult.packageName = packageName; @@ -206,8 +211,8 @@ + (instancetype)makeWithAsset:(nullable NSString *)asset 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 @@ + (FLTCreateMessage *)fromList:(NSArray *)list { 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 @@ - (NSArray *)toList { } @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 @@ - (NSArray *)toList { } @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 @@ - (void)writeValue:(id)value { } @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 *FLTAVFoundationVideoPlayerApiGetCodec(void) { +NSObject *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 binaryMessenger, - NSObject *api) { +void FVPAVFoundationVideoPlayerApiSetup(id binaryMessenger, + NSObject *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 @@ void FLTAVFoundationVideoPlayerApiSetup(id binaryMesseng } { 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 @@ void FLTAVFoundationVideoPlayerApiSetup(id binaryMesseng } { 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 @@ void FLTAVFoundationVideoPlayerApiSetup(id binaryMesseng } { 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 @@ void FLTAVFoundationVideoPlayerApiSetup(id binaryMesseng } { 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 @@ void FLTAVFoundationVideoPlayerApiSetup(id binaryMesseng } { 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 @@ void FLTAVFoundationVideoPlayerApiSetup(id binaryMesseng } { 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 @@ void FLTAVFoundationVideoPlayerApiSetup(id binaryMesseng } { 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 @@ void FLTAVFoundationVideoPlayerApiSetup(id binaryMesseng } { 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 @@ void FLTAVFoundationVideoPlayerApiSetup(id binaryMesseng } { 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 @@ void FLTAVFoundationVideoPlayerApiSetup(id binaryMesseng } { 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 c283aee74d811..f620e22e608c2 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 @@ class AVFoundationVideoPlayerApi { Future initialize() async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.initialize', codec, + 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.initialize', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send(null) as List?; if (replyList == null) { @@ -285,7 +286,8 @@ class AVFoundationVideoPlayerApi { Future create(CreateMessage arg_msg) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.create', codec, + 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.create', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_msg]) as List?; @@ -312,7 +314,8 @@ class AVFoundationVideoPlayerApi { Future dispose(TextureMessage arg_msg) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.dispose', codec, + 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.dispose', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_msg]) as List?; @@ -334,7 +337,8 @@ class AVFoundationVideoPlayerApi { Future setLooping(LoopingMessage arg_msg) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.setLooping', codec, + 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setLooping', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_msg]) as List?; @@ -356,7 +360,8 @@ class AVFoundationVideoPlayerApi { Future setVolume(VolumeMessage arg_msg) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.setVolume', codec, + 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setVolume', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_msg]) as List?; @@ -378,7 +383,8 @@ class AVFoundationVideoPlayerApi { Future setPlaybackSpeed(PlaybackSpeedMessage arg_msg) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.setPlaybackSpeed', codec, + 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setPlaybackSpeed', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_msg]) as List?; @@ -400,7 +406,8 @@ class AVFoundationVideoPlayerApi { Future play(TextureMessage arg_msg) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.play', codec, + 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.play', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_msg]) as List?; @@ -422,7 +429,8 @@ class AVFoundationVideoPlayerApi { Future position(TextureMessage arg_msg) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.position', codec, + 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.position', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_msg]) as List?; @@ -449,7 +457,8 @@ class AVFoundationVideoPlayerApi { Future seekTo(PositionMessage arg_msg) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.seekTo', codec, + 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.seekTo', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_msg]) as List?; @@ -471,7 +480,8 @@ class AVFoundationVideoPlayerApi { Future pause(TextureMessage arg_msg) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.pause', codec, + 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.pause', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_msg]) as List?; @@ -493,7 +503,8 @@ class AVFoundationVideoPlayerApi { Future setMixWithOthers(MixWithOthersMessage arg_msg) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.setMixWithOthers', codec, + 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setMixWithOthers', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_msg]) as List?; diff --git a/packages/video_player/video_player_avfoundation/pigeons/messages.dart b/packages/video_player/video_player_avfoundation/pigeons/messages.dart index f4418dbcac65a..2aeacefffa648 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 @@ import 'package:pigeon/pigeon.dart'; 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 dc3de6fd44ce1..eb4292c05ce94 100644 --- a/packages/video_player/video_player_avfoundation/pubspec.yaml +++ b/packages/video_player/video_player_avfoundation/pubspec.yaml @@ -2,7 +2,7 @@ name: video_player_avfoundation 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 @@ flutter: platforms: ios: dartPluginClass: AVFoundationVideoPlayer - pluginClass: FLTVideoPlayerPlugin + pluginClass: FVPVideoPlayerPlugin dependencies: flutter: @@ -24,7 +24,7 @@ dependencies: 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 bdfb3568fb6f6..19d0c084ccc82 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 @@ abstract class TestHostVideoPlayerApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - '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 @@ abstract class TestHostVideoPlayerApi { } { final BasicMessageChannel channel = BasicMessageChannel( - '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 @@ abstract class TestHostVideoPlayerApi { .setMockDecodedMessageHandler(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 args = (message as List?)!; 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 [output]; }); @@ -136,7 +138,8 @@ abstract class TestHostVideoPlayerApi { } { final BasicMessageChannel channel = BasicMessageChannel( - '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 @@ abstract class TestHostVideoPlayerApi { .setMockDecodedMessageHandler(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 args = (message as List?)!; 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 []; }); @@ -158,7 +161,8 @@ abstract class TestHostVideoPlayerApi { } { final BasicMessageChannel channel = BasicMessageChannel( - '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 @@ abstract class TestHostVideoPlayerApi { .setMockDecodedMessageHandler(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 args = (message as List?)!; 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 []; }); @@ -180,7 +184,8 @@ abstract class TestHostVideoPlayerApi { } { final BasicMessageChannel channel = BasicMessageChannel( - '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 @@ abstract class TestHostVideoPlayerApi { .setMockDecodedMessageHandler(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 args = (message as List?)!; 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 []; }); @@ -202,7 +207,7 @@ abstract class TestHostVideoPlayerApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.setPlaybackSpeed', + 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setPlaybackSpeed', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -213,12 +218,12 @@ abstract class TestHostVideoPlayerApi { .setMockDecodedMessageHandler(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 args = (message as List?)!; 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 []; }); @@ -226,7 +231,8 @@ abstract class TestHostVideoPlayerApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.play', codec, + 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.play', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -236,11 +242,11 @@ abstract class TestHostVideoPlayerApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.play was null.'); + 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.play was null.'); final List args = (message as List?)!; 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.'); + 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.play was null, expected non-null TextureMessage.'); api.play(arg_msg!); return []; }); @@ -248,7 +254,8 @@ abstract class TestHostVideoPlayerApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.position', codec, + 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.position', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -258,11 +265,11 @@ abstract class TestHostVideoPlayerApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.position was null.'); + 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.position was null.'); final List args = (message as List?)!; 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.'); + 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.position was null, expected non-null TextureMessage.'); final PositionMessage output = api.position(arg_msg!); return [output]; }); @@ -270,7 +277,8 @@ abstract class TestHostVideoPlayerApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.seekTo', codec, + 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.seekTo', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -280,11 +288,11 @@ abstract class TestHostVideoPlayerApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.seekTo was null.'); + 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.seekTo was null.'); final List args = (message as List?)!; 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.'); + 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.seekTo was null, expected non-null PositionMessage.'); await api.seekTo(arg_msg!); return []; }); @@ -292,7 +300,8 @@ abstract class TestHostVideoPlayerApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.pause', codec, + 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.pause', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -302,11 +311,11 @@ abstract class TestHostVideoPlayerApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.AVFoundationVideoPlayerApi.pause was null.'); + 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.pause was null.'); final List args = (message as List?)!; 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.'); + 'Argument for dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.pause was null, expected non-null TextureMessage.'); api.pause(arg_msg!); return []; }); @@ -314,7 +323,7 @@ abstract class TestHostVideoPlayerApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.AVFoundationVideoPlayerApi.setMixWithOthers', + 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setMixWithOthers', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -325,12 +334,12 @@ abstract class TestHostVideoPlayerApi { .setMockDecodedMessageHandler(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.setMixWithOthers was null.'); final List args = (message as List?)!; 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 []; });