forked from flutter/packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split code into fiels and fix implementations to separate texture app…
…roach from platform view approach
- Loading branch information
1 parent
fc88fc8
commit 282e746
Showing
7 changed files
with
39 additions
and
46 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
...ndation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPAVFactory.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#import <AVFoundation/AVFoundation.h> | ||
|
||
#import "FVPAVFactory.h" | ||
|
||
@implementation FVPDefaultAVFactory | ||
- (AVPlayer *)playerWithPlayerItem:(AVPlayerItem *)playerItem { | ||
return [AVPlayer playerWithPlayerItem:playerItem]; | ||
} | ||
- (AVPlayerItemVideoOutput *)videoOutputWithPixelBufferAttributes: | ||
(NSDictionary<NSString *, id> *)attributes { | ||
return [[AVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:attributes]; | ||
} | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...dation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPAVFactory.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#import <AVFoundation/AVFoundation.h> | ||
|
||
// Protocol for AVFoundation object instance factory. Used for injecting framework objects in tests. | ||
@protocol FVPAVFactory | ||
@required | ||
- (AVPlayer *)playerWithPlayerItem:(AVPlayerItem *)playerItem; | ||
- (AVPlayerItemVideoOutput *)videoOutputWithPixelBufferAttributes: | ||
(NSDictionary<NSString *, id> *)attributes; | ||
@end | ||
|
||
@interface FVPDefaultAVFactory : NSObject <FVPAVFactory> | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters