Skip to content

Commit 23c881b

Browse files
committed
Update the Xcode Project and readme
1 parent c8f1342 commit 23c881b

File tree

4 files changed

+212
-5
lines changed

4 files changed

+212
-5
lines changed

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SDWebImageVideoCoder
22

3-
[![CI Status](https://img.shields.io/travis/lizhuoli1126@126.com/SDWebImageVideoCoder.svg?style=flat)](https://travis-ci.org/lizhuoli1126@126.com/SDWebImageVideoCoder)
3+
[![CI Status](https://img.shields.io/travis/SDWebImage/SDWebImageVideoCoder.svg?style=flat)](https://travis-ci.org/SDWebImage/SDWebImageVideoCoder)
44
[![Version](https://img.shields.io/cocoapods/v/SDWebImageVideoCoder.svg?style=flat)](https://cocoapods.org/pods/SDWebImageVideoCoder)
55
[![License](https://img.shields.io/cocoapods/l/SDWebImageVideoCoder.svg?style=flat)](https://cocoapods.org/pods/SDWebImageVideoCoder)
66
[![Platform](https://img.shields.io/cocoapods/p/SDWebImageVideoCoder.svg?style=flat)](https://cocoapods.org/pods/SDWebImageVideoCoder)
@@ -11,13 +11,13 @@ This is just a toy coder plugin for [SDWebImage](https://github.com/SDWebImage).
1111

1212
**Important**: This project is just a toy, which means, it does not provide any production ready features, and the performances is really slow.
1313

14-
For real world rendering for small video files (like [Imgur's GIFV format](https://help.imgur.com/hc/en-us/articles/208606616-What-is-GIFV-)). You should always prefers to use the video player and rendering components, like AVKit's [AVPlayerViewController](https://developer.apple.com/documentation/avkit/avplayerviewcontroller) .
14+
For real world rendering for short video files (like [Imgur's GIFV format](https://help.imgur.com/hc/en-us/articles/208606616-What-is-GIFV-)). You should always prefers to use the video player and rendering components, like AVKit's [AVPlayerViewController](https://developer.apple.com/documentation/avkit/avplayerviewcontroller) .
1515

1616
This coder plugin, provide the animation loading support for video format, including:
1717

1818
+ MP4 (MPEG/4)
19+
+ M4V (Apple iTunes Movie)
1920
+ MOV (QuickTime Movie)
20-
+ AVI (Audio Video Interleave)
2121

2222
## Requirements
2323

@@ -43,6 +43,9 @@ For coder plugin usage, see [Wiki - Coder Usage](https://github.com/SDWebImage/S
4343
+ Objective-C
4444

4545
```objective-c
46+
// register coder
47+
[SDImageCodersManager.sharedCoder addCoder:SDImageVideoCoder.sharedCoder];
48+
// load URL
4649
SDAnimatedImageView *imageView;
4750
NSURL *videoURL = [NSURL URLWithString:@"https://i.imgur.com/FY1AbSo.mp4"];
4851
[imageView sd_setImageWithURL:videoURL];
@@ -51,6 +54,9 @@ NSURL *videoURL = [NSURL URLWithString:@"https://i.imgur.com/FY1AbSo.mp4"];
5154
+ Swift
5255
5356
```swift
57+
// register coder
58+
SDImageCodersManager.shared.addCoder(SDImageVideoCoder.shared)
59+
// load URL
5460
let imageView: SDAnimatedImageView
5561
let url = URL(string: "https://i.imgur.com/FY1AbSo.mp4")
5662
imageView.sd_setImage(url: url)
@@ -69,7 +75,7 @@ AVAssetImageGenerator *generator = [AVAssetImageGenerator assetImageGeneratorWit
6975
generator.appliesPreferredTrackTransform = YES;
7076
generator.requestedTimeToleranceBefore = kCMTimeZero;
7177
generator.requestedTimeToleranceAfter = kCMTimeZero;
72-
// Player
78+
// player
7379
SDAnimatedImagePlayer *player = [SDAnimatedImagePlayer playerWithProvider:generator];
7480
player.animationFrameHandler = ^(NSUInteger index, UIImage * frame) {
7581
// frames
@@ -101,7 +107,7 @@ To run the example project, clone the repo, and run `pod install` from the Examp
101107

102108
<img src="https://raw.githubusercontent.com/SDWebImage/SDWebImageVideoCoder/master/Example/Screenshot/MP4Demo.png" width="600" />
103109

104-
These MP4 video is from [Imgur](https://imgur.com/).
110+
This demo MP4 video is from [Imgur](https://imgur.com/). You can always try you short video files as well.
105111

106112
## Author
107113

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1120"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "324AC238238131920065C9BF"
18+
BuildableName = "SDWebImageVideoCoder.framework"
19+
BlueprintName = "SDWebImageVideoCoder-macOS"
20+
ReferencedContainer = "container:SDWebImageVideoCoder.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
</LaunchAction>
44+
<ProfileAction
45+
buildConfiguration = "Release"
46+
shouldUseLaunchSchemeArgsEnv = "YES"
47+
savedToolIdentifier = ""
48+
useCustomWorkingDirectory = "NO"
49+
debugDocumentVersioning = "YES">
50+
<MacroExpansion>
51+
<BuildableReference
52+
BuildableIdentifier = "primary"
53+
BlueprintIdentifier = "324AC238238131920065C9BF"
54+
BuildableName = "SDWebImageVideoCoder.framework"
55+
BlueprintName = "SDWebImageVideoCoder-macOS"
56+
ReferencedContainer = "container:SDWebImageVideoCoder.xcodeproj">
57+
</BuildableReference>
58+
</MacroExpansion>
59+
</ProfileAction>
60+
<AnalyzeAction
61+
buildConfiguration = "Debug">
62+
</AnalyzeAction>
63+
<ArchiveAction
64+
buildConfiguration = "Release"
65+
revealArchiveInOrganizer = "YES">
66+
</ArchiveAction>
67+
</Scheme>
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1120"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "324AC245238131990065C9BF"
18+
BuildableName = "SDWebImageVideoCoder.framework"
19+
BlueprintName = "SDWebImageVideoCoder-tvOS"
20+
ReferencedContainer = "container:SDWebImageVideoCoder.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
</LaunchAction>
44+
<ProfileAction
45+
buildConfiguration = "Release"
46+
shouldUseLaunchSchemeArgsEnv = "YES"
47+
savedToolIdentifier = ""
48+
useCustomWorkingDirectory = "NO"
49+
debugDocumentVersioning = "YES">
50+
<MacroExpansion>
51+
<BuildableReference
52+
BuildableIdentifier = "primary"
53+
BlueprintIdentifier = "324AC245238131990065C9BF"
54+
BuildableName = "SDWebImageVideoCoder.framework"
55+
BlueprintName = "SDWebImageVideoCoder-tvOS"
56+
ReferencedContainer = "container:SDWebImageVideoCoder.xcodeproj">
57+
</BuildableReference>
58+
</MacroExpansion>
59+
</ProfileAction>
60+
<AnalyzeAction
61+
buildConfiguration = "Debug">
62+
</AnalyzeAction>
63+
<ArchiveAction
64+
buildConfiguration = "Release"
65+
revealArchiveInOrganizer = "YES">
66+
</ArchiveAction>
67+
</Scheme>
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1120"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "324AC20F23812D4C0065C9BF"
18+
BuildableName = "SDWebImageVideoCoder.framework"
19+
BlueprintName = "SDWebImageVideoCoder"
20+
ReferencedContainer = "container:SDWebImageVideoCoder.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
</LaunchAction>
44+
<ProfileAction
45+
buildConfiguration = "Release"
46+
shouldUseLaunchSchemeArgsEnv = "YES"
47+
savedToolIdentifier = ""
48+
useCustomWorkingDirectory = "NO"
49+
debugDocumentVersioning = "YES">
50+
<MacroExpansion>
51+
<BuildableReference
52+
BuildableIdentifier = "primary"
53+
BlueprintIdentifier = "324AC20F23812D4C0065C9BF"
54+
BuildableName = "SDWebImageVideoCoder.framework"
55+
BlueprintName = "SDWebImageVideoCoder"
56+
ReferencedContainer = "container:SDWebImageVideoCoder.xcodeproj">
57+
</BuildableReference>
58+
</MacroExpansion>
59+
</ProfileAction>
60+
<AnalyzeAction
61+
buildConfiguration = "Debug">
62+
</AnalyzeAction>
63+
<ArchiveAction
64+
buildConfiguration = "Release"
65+
revealArchiveInOrganizer = "YES">
66+
</ArchiveAction>
67+
</Scheme>

0 commit comments

Comments
 (0)