├── .gitignore
├── .swiftpm
└── xcode
│ └── package.xcworkspace
│ └── contents.xcworkspacedata
├── .travis.yml
├── Cartfile
├── Cartfile.resolved
├── Example
├── Podfile
├── SDWebImageVideoCoder.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ ├── SDWebImageVideoCoder-Example.xcscheme
│ │ └── SDWebImageVideoCoder_Tests.xcscheme
├── SDWebImageVideoCoder.xcworkspace
│ └── contents.xcworkspacedata
├── SDWebImageVideoCoder
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── SDAppDelegate.h
│ ├── SDAppDelegate.m
│ ├── SDViewController.h
│ ├── SDViewController.m
│ ├── SDWebImageVideoCoder-Info.plist
│ ├── SDWebImageVideoCoder-Prefix.pch
│ ├── en.lproj
│ │ └── InfoPlist.strings
│ └── main.m
├── Screenshot
│ └── MP4Demo.png
└── Tests
│ ├── Tests-Info.plist
│ ├── Tests-Prefix.pch
│ ├── Tests.m
│ └── en.lproj
│ └── InfoPlist.strings
├── LICENSE
├── Package.resolved
├── Package.swift
├── README.md
├── SDWebImageVideoCoder.podspec
├── SDWebImageVideoCoder.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
└── xcshareddata
│ └── xcschemes
│ ├── SDWebImageVideoCoder-macOS.xcscheme
│ ├── SDWebImageVideoCoder-tvOS.xcscheme
│ └── SDWebImageVideoCoder.xcscheme
└── SDWebImageVideoCoder
├── Assets
└── .gitkeep
├── Classes
├── .gitkeep
├── AVAssetImageGenerator+SDAdditions.h
├── AVAssetImageGenerator+SDAdditions.m
├── SDImageVideoCoder.h
└── SDImageVideoCoder.m
└── Module
├── Info.plist
└── SDWebImageVideoCoder.h
/.gitignore:
--------------------------------------------------------------------------------
1 | # OS X
2 | .DS_Store
3 |
4 | # Xcode
5 | build/
6 | *.pbxuser
7 | !default.pbxuser
8 | *.mode1v3
9 | !default.mode1v3
10 | *.mode2v3
11 | !default.mode2v3
12 | *.perspectivev3
13 | !default.perspectivev3
14 | xcuserdata/
15 | *.xccheckout
16 | profile
17 | *.moved-aside
18 | DerivedData
19 | *.hmap
20 | *.ipa
21 |
22 | # Bundler
23 | .bundle
24 |
25 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
26 | Carthage/Checkouts
27 | Carthage/Build
28 |
29 | # We recommend against adding the Pods directory to your .gitignore. However
30 | # you should judge for yourself, the pros and cons are mentioned at:
31 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
32 | #
33 | # Note: if you ignore the Pods directory, make sure to uncomment
34 | # `pod install` in .travis.yml
35 | #
36 | Example/Pods
37 | Example/Podfile.lock
38 |
39 | # SwiftPM
40 | .swiftpm
41 | .build
42 |
--------------------------------------------------------------------------------
/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: objective-c
2 | osx_image: xcode11.2
3 |
4 | env:
5 | global:
6 | - LC_CTYPE=en_US.UTF-8
7 | - LANG=en_US.UTF-8
8 |
9 | addons:
10 | ssh_known_hosts: github.com
11 |
12 | notifications:
13 | email: false
14 |
15 | before_install:
16 | - env
17 | - locale
18 | - gem install cocoapods --no-document --quiet
19 | - gem install xcpretty --no-document --quiet
20 | - pod --version
21 | - pod repo update --silent
22 | - xcpretty --version
23 | - xcodebuild -version
24 | - xcodebuild -showsdks
25 |
26 | script:
27 | - set -o pipefail
28 |
29 | - echo Check if the library described by the podspec can be built
30 | - pod lib lint --allow-warnings
31 |
32 | - echo Build example
33 | - pod install --project-directory=Example
34 | - xcodebuild build -workspace Example/SDWebImageVideoCoder.xcworkspace -scheme SDWebImageVideoCoder-Example -destination 'platform=iOS Simulator,name=iPhone 11 Pro' -configuration Debug | xcpretty -c
35 |
--------------------------------------------------------------------------------
/Cartfile:
--------------------------------------------------------------------------------
1 | github "SDWebImage/SDWebImage" ~> 5.10
--------------------------------------------------------------------------------
/Cartfile.resolved:
--------------------------------------------------------------------------------
1 | github "SDWebImage/SDWebImage" "5.3.1"
2 |
--------------------------------------------------------------------------------
/Example/Podfile:
--------------------------------------------------------------------------------
1 | use_frameworks!
2 |
3 | platform :ios, '9.0'
4 |
5 | target 'SDWebImageVideoCoder_Example' do
6 | pod 'SDWebImageVideoCoder', :path => '../'
7 |
8 | target 'SDWebImageVideoCoder_Tests' do
9 | inherit! :search_paths
10 |
11 |
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/Example/SDWebImageVideoCoder.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 0C6F08E6E5E9ADE272438858 /* Pods_SDWebImageVideoCoder_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5781C0ABBB31B397593F7A11 /* Pods_SDWebImageVideoCoder_Tests.framework */; };
11 | 0DFAA40F1BB443CA0539720E /* Pods_SDWebImageVideoCoder_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BFD68E907325C427F724F2FD /* Pods_SDWebImageVideoCoder_Example.framework */; };
12 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
13 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; };
14 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
15 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; };
16 | 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; };
17 | 6003F59E195388D20070C39A /* SDAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* SDAppDelegate.m */; };
18 | 6003F5A7195388D20070C39A /* SDViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* SDViewController.m */; };
19 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; };
20 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; };
21 | 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
22 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
23 | 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; };
24 | 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; };
25 | 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; };
26 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; };
27 | /* End PBXBuildFile section */
28 |
29 | /* Begin PBXContainerItemProxy section */
30 | 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = {
31 | isa = PBXContainerItemProxy;
32 | containerPortal = 6003F582195388D10070C39A /* Project object */;
33 | proxyType = 1;
34 | remoteGlobalIDString = 6003F589195388D20070C39A;
35 | remoteInfo = SDWebImageVideoCoder;
36 | };
37 | /* End PBXContainerItemProxy section */
38 |
39 | /* Begin PBXFileReference section */
40 | 258B6DC6EEEDC77F76AF429B /* Pods-SDWebImageVideoCoder_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImageVideoCoder_Tests.debug.xcconfig"; path = "Target Support Files/Pods-SDWebImageVideoCoder_Tests/Pods-SDWebImageVideoCoder_Tests.debug.xcconfig"; sourceTree = ""; };
41 | 3452EC1873EB4B3575545D55 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; name = LICENSE; path = ../LICENSE; sourceTree = ""; };
42 | 4B646AD68CDD9E0501F04DEF /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; name = README.md; path = ../README.md; sourceTree = ""; };
43 | 5781C0ABBB31B397593F7A11 /* Pods_SDWebImageVideoCoder_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SDWebImageVideoCoder_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
44 | 6003F58A195388D20070C39A /* SDWebImageVideoCoder_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SDWebImageVideoCoder_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
45 | 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
46 | 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
47 | 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
48 | 6003F595195388D20070C39A /* SDWebImageVideoCoder-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SDWebImageVideoCoder-Info.plist"; sourceTree = ""; };
49 | 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
50 | 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
51 | 6003F59B195388D20070C39A /* SDWebImageVideoCoder-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SDWebImageVideoCoder-Prefix.pch"; sourceTree = ""; };
52 | 6003F59C195388D20070C39A /* SDAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDAppDelegate.h; sourceTree = ""; };
53 | 6003F59D195388D20070C39A /* SDAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDAppDelegate.m; sourceTree = ""; };
54 | 6003F5A5195388D20070C39A /* SDViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDViewController.h; sourceTree = ""; };
55 | 6003F5A6195388D20070C39A /* SDViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDViewController.m; sourceTree = ""; };
56 | 6003F5A8195388D20070C39A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
57 | 6003F5AE195388D20070C39A /* SDWebImageVideoCoder_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SDWebImageVideoCoder_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
58 | 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
59 | 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = ""; };
60 | 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
61 | 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = ""; };
62 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; };
63 | 71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
64 | 80F08C851E4D0CE7EE986870 /* Pods-SDWebImageVideoCoder_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImageVideoCoder_Example.release.xcconfig"; path = "Target Support Files/Pods-SDWebImageVideoCoder_Example/Pods-SDWebImageVideoCoder_Example.release.xcconfig"; sourceTree = ""; };
65 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = ""; };
66 | 98249B31AA0FE7F5A52AAD3D /* SDWebImageVideoCoder.podspec */ = {isa = PBXFileReference; includeInIndex = 1; name = SDWebImageVideoCoder.podspec; path = ../SDWebImageVideoCoder.podspec; sourceTree = ""; };
67 | BFD68E907325C427F724F2FD /* Pods_SDWebImageVideoCoder_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SDWebImageVideoCoder_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
68 | C7AF37533D91AFD89F44174A /* Pods-SDWebImageVideoCoder_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImageVideoCoder_Example.debug.xcconfig"; path = "Target Support Files/Pods-SDWebImageVideoCoder_Example/Pods-SDWebImageVideoCoder_Example.debug.xcconfig"; sourceTree = ""; };
69 | D666626513ED5CECC713E7DC /* Pods-SDWebImageVideoCoder_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImageVideoCoder_Tests.release.xcconfig"; path = "Target Support Files/Pods-SDWebImageVideoCoder_Tests/Pods-SDWebImageVideoCoder_Tests.release.xcconfig"; sourceTree = ""; };
70 | /* End PBXFileReference section */
71 |
72 | /* Begin PBXFrameworksBuildPhase section */
73 | 6003F587195388D20070C39A /* Frameworks */ = {
74 | isa = PBXFrameworksBuildPhase;
75 | buildActionMask = 2147483647;
76 | files = (
77 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */,
78 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */,
79 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */,
80 | 0DFAA40F1BB443CA0539720E /* Pods_SDWebImageVideoCoder_Example.framework in Frameworks */,
81 | );
82 | runOnlyForDeploymentPostprocessing = 0;
83 | };
84 | 6003F5AB195388D20070C39A /* Frameworks */ = {
85 | isa = PBXFrameworksBuildPhase;
86 | buildActionMask = 2147483647;
87 | files = (
88 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */,
89 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */,
90 | 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */,
91 | 0C6F08E6E5E9ADE272438858 /* Pods_SDWebImageVideoCoder_Tests.framework in Frameworks */,
92 | );
93 | runOnlyForDeploymentPostprocessing = 0;
94 | };
95 | /* End PBXFrameworksBuildPhase section */
96 |
97 | /* Begin PBXGroup section */
98 | 3BC2CE0A812A796DBF1CA591 /* Pods */ = {
99 | isa = PBXGroup;
100 | children = (
101 | C7AF37533D91AFD89F44174A /* Pods-SDWebImageVideoCoder_Example.debug.xcconfig */,
102 | 80F08C851E4D0CE7EE986870 /* Pods-SDWebImageVideoCoder_Example.release.xcconfig */,
103 | 258B6DC6EEEDC77F76AF429B /* Pods-SDWebImageVideoCoder_Tests.debug.xcconfig */,
104 | D666626513ED5CECC713E7DC /* Pods-SDWebImageVideoCoder_Tests.release.xcconfig */,
105 | );
106 | name = Pods;
107 | path = Pods;
108 | sourceTree = "";
109 | };
110 | 6003F581195388D10070C39A = {
111 | isa = PBXGroup;
112 | children = (
113 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */,
114 | 6003F593195388D20070C39A /* Example for SDWebImageVideoCoder */,
115 | 6003F5B5195388D20070C39A /* Tests */,
116 | 6003F58C195388D20070C39A /* Frameworks */,
117 | 6003F58B195388D20070C39A /* Products */,
118 | 3BC2CE0A812A796DBF1CA591 /* Pods */,
119 | );
120 | sourceTree = "";
121 | };
122 | 6003F58B195388D20070C39A /* Products */ = {
123 | isa = PBXGroup;
124 | children = (
125 | 6003F58A195388D20070C39A /* SDWebImageVideoCoder_Example.app */,
126 | 6003F5AE195388D20070C39A /* SDWebImageVideoCoder_Tests.xctest */,
127 | );
128 | name = Products;
129 | sourceTree = "";
130 | };
131 | 6003F58C195388D20070C39A /* Frameworks */ = {
132 | isa = PBXGroup;
133 | children = (
134 | 6003F58D195388D20070C39A /* Foundation.framework */,
135 | 6003F58F195388D20070C39A /* CoreGraphics.framework */,
136 | 6003F591195388D20070C39A /* UIKit.framework */,
137 | 6003F5AF195388D20070C39A /* XCTest.framework */,
138 | BFD68E907325C427F724F2FD /* Pods_SDWebImageVideoCoder_Example.framework */,
139 | 5781C0ABBB31B397593F7A11 /* Pods_SDWebImageVideoCoder_Tests.framework */,
140 | );
141 | name = Frameworks;
142 | sourceTree = "";
143 | };
144 | 6003F593195388D20070C39A /* Example for SDWebImageVideoCoder */ = {
145 | isa = PBXGroup;
146 | children = (
147 | 6003F59C195388D20070C39A /* SDAppDelegate.h */,
148 | 6003F59D195388D20070C39A /* SDAppDelegate.m */,
149 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */,
150 | 6003F5A5195388D20070C39A /* SDViewController.h */,
151 | 6003F5A6195388D20070C39A /* SDViewController.m */,
152 | 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */,
153 | 6003F5A8195388D20070C39A /* Images.xcassets */,
154 | 6003F594195388D20070C39A /* Supporting Files */,
155 | );
156 | name = "Example for SDWebImageVideoCoder";
157 | path = SDWebImageVideoCoder;
158 | sourceTree = "";
159 | };
160 | 6003F594195388D20070C39A /* Supporting Files */ = {
161 | isa = PBXGroup;
162 | children = (
163 | 6003F595195388D20070C39A /* SDWebImageVideoCoder-Info.plist */,
164 | 6003F596195388D20070C39A /* InfoPlist.strings */,
165 | 6003F599195388D20070C39A /* main.m */,
166 | 6003F59B195388D20070C39A /* SDWebImageVideoCoder-Prefix.pch */,
167 | );
168 | name = "Supporting Files";
169 | sourceTree = "";
170 | };
171 | 6003F5B5195388D20070C39A /* Tests */ = {
172 | isa = PBXGroup;
173 | children = (
174 | 6003F5BB195388D20070C39A /* Tests.m */,
175 | 6003F5B6195388D20070C39A /* Supporting Files */,
176 | );
177 | path = Tests;
178 | sourceTree = "";
179 | };
180 | 6003F5B6195388D20070C39A /* Supporting Files */ = {
181 | isa = PBXGroup;
182 | children = (
183 | 6003F5B7195388D20070C39A /* Tests-Info.plist */,
184 | 6003F5B8195388D20070C39A /* InfoPlist.strings */,
185 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */,
186 | );
187 | name = "Supporting Files";
188 | sourceTree = "";
189 | };
190 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = {
191 | isa = PBXGroup;
192 | children = (
193 | 98249B31AA0FE7F5A52AAD3D /* SDWebImageVideoCoder.podspec */,
194 | 4B646AD68CDD9E0501F04DEF /* README.md */,
195 | 3452EC1873EB4B3575545D55 /* LICENSE */,
196 | );
197 | name = "Podspec Metadata";
198 | sourceTree = "";
199 | };
200 | /* End PBXGroup section */
201 |
202 | /* Begin PBXNativeTarget section */
203 | 6003F589195388D20070C39A /* SDWebImageVideoCoder_Example */ = {
204 | isa = PBXNativeTarget;
205 | buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "SDWebImageVideoCoder_Example" */;
206 | buildPhases = (
207 | D030104E916EF70D850AFDF5 /* [CP] Check Pods Manifest.lock */,
208 | 6003F586195388D20070C39A /* Sources */,
209 | 6003F587195388D20070C39A /* Frameworks */,
210 | 6003F588195388D20070C39A /* Resources */,
211 | F81E6AB01984B03D204E8A36 /* [CP] Embed Pods Frameworks */,
212 | );
213 | buildRules = (
214 | );
215 | dependencies = (
216 | );
217 | name = SDWebImageVideoCoder_Example;
218 | productName = SDWebImageVideoCoder;
219 | productReference = 6003F58A195388D20070C39A /* SDWebImageVideoCoder_Example.app */;
220 | productType = "com.apple.product-type.application";
221 | };
222 | 6003F5AD195388D20070C39A /* SDWebImageVideoCoder_Tests */ = {
223 | isa = PBXNativeTarget;
224 | buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "SDWebImageVideoCoder_Tests" */;
225 | buildPhases = (
226 | 140AEB21CECFD6AB2B8FD43F /* [CP] Check Pods Manifest.lock */,
227 | 6003F5AA195388D20070C39A /* Sources */,
228 | 6003F5AB195388D20070C39A /* Frameworks */,
229 | 6003F5AC195388D20070C39A /* Resources */,
230 | );
231 | buildRules = (
232 | );
233 | dependencies = (
234 | 6003F5B4195388D20070C39A /* PBXTargetDependency */,
235 | );
236 | name = SDWebImageVideoCoder_Tests;
237 | productName = SDWebImageVideoCoderTests;
238 | productReference = 6003F5AE195388D20070C39A /* SDWebImageVideoCoder_Tests.xctest */;
239 | productType = "com.apple.product-type.bundle.unit-test";
240 | };
241 | /* End PBXNativeTarget section */
242 |
243 | /* Begin PBXProject section */
244 | 6003F582195388D10070C39A /* Project object */ = {
245 | isa = PBXProject;
246 | attributes = {
247 | CLASSPREFIX = SD;
248 | LastUpgradeCheck = 0720;
249 | ORGANIZATIONNAME = "lizhuoli1126@126.com";
250 | TargetAttributes = {
251 | 6003F5AD195388D20070C39A = {
252 | TestTargetID = 6003F589195388D20070C39A;
253 | };
254 | };
255 | };
256 | buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "SDWebImageVideoCoder" */;
257 | compatibilityVersion = "Xcode 3.2";
258 | developmentRegion = English;
259 | hasScannedForEncodings = 0;
260 | knownRegions = (
261 | en,
262 | Base,
263 | );
264 | mainGroup = 6003F581195388D10070C39A;
265 | productRefGroup = 6003F58B195388D20070C39A /* Products */;
266 | projectDirPath = "";
267 | projectRoot = "";
268 | targets = (
269 | 6003F589195388D20070C39A /* SDWebImageVideoCoder_Example */,
270 | 6003F5AD195388D20070C39A /* SDWebImageVideoCoder_Tests */,
271 | );
272 | };
273 | /* End PBXProject section */
274 |
275 | /* Begin PBXResourcesBuildPhase section */
276 | 6003F588195388D20070C39A /* Resources */ = {
277 | isa = PBXResourcesBuildPhase;
278 | buildActionMask = 2147483647;
279 | files = (
280 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */,
281 | 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */,
282 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */,
283 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */,
284 | );
285 | runOnlyForDeploymentPostprocessing = 0;
286 | };
287 | 6003F5AC195388D20070C39A /* Resources */ = {
288 | isa = PBXResourcesBuildPhase;
289 | buildActionMask = 2147483647;
290 | files = (
291 | 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */,
292 | );
293 | runOnlyForDeploymentPostprocessing = 0;
294 | };
295 | /* End PBXResourcesBuildPhase section */
296 |
297 | /* Begin PBXShellScriptBuildPhase section */
298 | 140AEB21CECFD6AB2B8FD43F /* [CP] Check Pods Manifest.lock */ = {
299 | isa = PBXShellScriptBuildPhase;
300 | buildActionMask = 2147483647;
301 | files = (
302 | );
303 | inputFileListPaths = (
304 | );
305 | inputPaths = (
306 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
307 | "${PODS_ROOT}/Manifest.lock",
308 | );
309 | name = "[CP] Check Pods Manifest.lock";
310 | outputFileListPaths = (
311 | );
312 | outputPaths = (
313 | "$(DERIVED_FILE_DIR)/Pods-SDWebImageVideoCoder_Tests-checkManifestLockResult.txt",
314 | );
315 | runOnlyForDeploymentPostprocessing = 0;
316 | shellPath = /bin/sh;
317 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
318 | showEnvVarsInLog = 0;
319 | };
320 | D030104E916EF70D850AFDF5 /* [CP] Check Pods Manifest.lock */ = {
321 | isa = PBXShellScriptBuildPhase;
322 | buildActionMask = 2147483647;
323 | files = (
324 | );
325 | inputFileListPaths = (
326 | );
327 | inputPaths = (
328 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
329 | "${PODS_ROOT}/Manifest.lock",
330 | );
331 | name = "[CP] Check Pods Manifest.lock";
332 | outputFileListPaths = (
333 | );
334 | outputPaths = (
335 | "$(DERIVED_FILE_DIR)/Pods-SDWebImageVideoCoder_Example-checkManifestLockResult.txt",
336 | );
337 | runOnlyForDeploymentPostprocessing = 0;
338 | shellPath = /bin/sh;
339 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
340 | showEnvVarsInLog = 0;
341 | };
342 | F81E6AB01984B03D204E8A36 /* [CP] Embed Pods Frameworks */ = {
343 | isa = PBXShellScriptBuildPhase;
344 | buildActionMask = 2147483647;
345 | files = (
346 | );
347 | inputPaths = (
348 | "${PODS_ROOT}/Target Support Files/Pods-SDWebImageVideoCoder_Example/Pods-SDWebImageVideoCoder_Example-frameworks.sh",
349 | "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework",
350 | "${BUILT_PRODUCTS_DIR}/SDWebImageVideoCoder/SDWebImageVideoCoder.framework",
351 | );
352 | name = "[CP] Embed Pods Frameworks";
353 | outputPaths = (
354 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework",
355 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImageVideoCoder.framework",
356 | );
357 | runOnlyForDeploymentPostprocessing = 0;
358 | shellPath = /bin/sh;
359 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SDWebImageVideoCoder_Example/Pods-SDWebImageVideoCoder_Example-frameworks.sh\"\n";
360 | showEnvVarsInLog = 0;
361 | };
362 | /* End PBXShellScriptBuildPhase section */
363 |
364 | /* Begin PBXSourcesBuildPhase section */
365 | 6003F586195388D20070C39A /* Sources */ = {
366 | isa = PBXSourcesBuildPhase;
367 | buildActionMask = 2147483647;
368 | files = (
369 | 6003F59E195388D20070C39A /* SDAppDelegate.m in Sources */,
370 | 6003F5A7195388D20070C39A /* SDViewController.m in Sources */,
371 | 6003F59A195388D20070C39A /* main.m in Sources */,
372 | );
373 | runOnlyForDeploymentPostprocessing = 0;
374 | };
375 | 6003F5AA195388D20070C39A /* Sources */ = {
376 | isa = PBXSourcesBuildPhase;
377 | buildActionMask = 2147483647;
378 | files = (
379 | 6003F5BC195388D20070C39A /* Tests.m in Sources */,
380 | );
381 | runOnlyForDeploymentPostprocessing = 0;
382 | };
383 | /* End PBXSourcesBuildPhase section */
384 |
385 | /* Begin PBXTargetDependency section */
386 | 6003F5B4195388D20070C39A /* PBXTargetDependency */ = {
387 | isa = PBXTargetDependency;
388 | target = 6003F589195388D20070C39A /* SDWebImageVideoCoder_Example */;
389 | targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */;
390 | };
391 | /* End PBXTargetDependency section */
392 |
393 | /* Begin PBXVariantGroup section */
394 | 6003F596195388D20070C39A /* InfoPlist.strings */ = {
395 | isa = PBXVariantGroup;
396 | children = (
397 | 6003F597195388D20070C39A /* en */,
398 | );
399 | name = InfoPlist.strings;
400 | sourceTree = "";
401 | };
402 | 6003F5B8195388D20070C39A /* InfoPlist.strings */ = {
403 | isa = PBXVariantGroup;
404 | children = (
405 | 6003F5B9195388D20070C39A /* en */,
406 | );
407 | name = InfoPlist.strings;
408 | sourceTree = "";
409 | };
410 | 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */ = {
411 | isa = PBXVariantGroup;
412 | children = (
413 | 71719F9E1E33DC2100824A3D /* Base */,
414 | );
415 | name = LaunchScreen.storyboard;
416 | sourceTree = "";
417 | };
418 | /* End PBXVariantGroup section */
419 |
420 | /* Begin XCBuildConfiguration section */
421 | 6003F5BD195388D20070C39A /* Debug */ = {
422 | isa = XCBuildConfiguration;
423 | buildSettings = {
424 | ALWAYS_SEARCH_USER_PATHS = NO;
425 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
426 | CLANG_CXX_LIBRARY = "libc++";
427 | CLANG_ENABLE_MODULES = YES;
428 | CLANG_ENABLE_OBJC_ARC = YES;
429 | CLANG_WARN_BOOL_CONVERSION = YES;
430 | CLANG_WARN_CONSTANT_CONVERSION = YES;
431 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
432 | CLANG_WARN_EMPTY_BODY = YES;
433 | CLANG_WARN_ENUM_CONVERSION = YES;
434 | CLANG_WARN_INT_CONVERSION = YES;
435 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
436 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
437 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
438 | COPY_PHASE_STRIP = NO;
439 | ENABLE_TESTABILITY = YES;
440 | GCC_C_LANGUAGE_STANDARD = gnu99;
441 | GCC_DYNAMIC_NO_PIC = NO;
442 | GCC_OPTIMIZATION_LEVEL = 0;
443 | GCC_PREPROCESSOR_DEFINITIONS = (
444 | "DEBUG=1",
445 | "$(inherited)",
446 | );
447 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
448 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
449 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
450 | GCC_WARN_UNDECLARED_SELECTOR = YES;
451 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
452 | GCC_WARN_UNUSED_FUNCTION = YES;
453 | GCC_WARN_UNUSED_VARIABLE = YES;
454 | IPHONEOS_DEPLOYMENT_TARGET = 9.3;
455 | ONLY_ACTIVE_ARCH = YES;
456 | SDKROOT = iphoneos;
457 | TARGETED_DEVICE_FAMILY = "1,2";
458 | };
459 | name = Debug;
460 | };
461 | 6003F5BE195388D20070C39A /* Release */ = {
462 | isa = XCBuildConfiguration;
463 | buildSettings = {
464 | ALWAYS_SEARCH_USER_PATHS = NO;
465 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
466 | CLANG_CXX_LIBRARY = "libc++";
467 | CLANG_ENABLE_MODULES = YES;
468 | CLANG_ENABLE_OBJC_ARC = YES;
469 | CLANG_WARN_BOOL_CONVERSION = YES;
470 | CLANG_WARN_CONSTANT_CONVERSION = YES;
471 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
472 | CLANG_WARN_EMPTY_BODY = YES;
473 | CLANG_WARN_ENUM_CONVERSION = YES;
474 | CLANG_WARN_INT_CONVERSION = YES;
475 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
476 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
477 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
478 | COPY_PHASE_STRIP = YES;
479 | ENABLE_NS_ASSERTIONS = NO;
480 | GCC_C_LANGUAGE_STANDARD = gnu99;
481 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
482 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
483 | GCC_WARN_UNDECLARED_SELECTOR = YES;
484 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
485 | GCC_WARN_UNUSED_FUNCTION = YES;
486 | GCC_WARN_UNUSED_VARIABLE = YES;
487 | IPHONEOS_DEPLOYMENT_TARGET = 9.3;
488 | SDKROOT = iphoneos;
489 | TARGETED_DEVICE_FAMILY = "1,2";
490 | VALIDATE_PRODUCT = YES;
491 | };
492 | name = Release;
493 | };
494 | 6003F5C0195388D20070C39A /* Debug */ = {
495 | isa = XCBuildConfiguration;
496 | baseConfigurationReference = C7AF37533D91AFD89F44174A /* Pods-SDWebImageVideoCoder_Example.debug.xcconfig */;
497 | buildSettings = {
498 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
499 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
500 | GCC_PREFIX_HEADER = "SDWebImageVideoCoder/SDWebImageVideoCoder-Prefix.pch";
501 | INFOPLIST_FILE = "SDWebImageVideoCoder/SDWebImageVideoCoder-Info.plist";
502 | MODULE_NAME = ExampleApp;
503 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
504 | PRODUCT_NAME = "$(TARGET_NAME)";
505 | SWIFT_VERSION = 4.0;
506 | WRAPPER_EXTENSION = app;
507 | };
508 | name = Debug;
509 | };
510 | 6003F5C1195388D20070C39A /* Release */ = {
511 | isa = XCBuildConfiguration;
512 | baseConfigurationReference = 80F08C851E4D0CE7EE986870 /* Pods-SDWebImageVideoCoder_Example.release.xcconfig */;
513 | buildSettings = {
514 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
515 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
516 | GCC_PREFIX_HEADER = "SDWebImageVideoCoder/SDWebImageVideoCoder-Prefix.pch";
517 | INFOPLIST_FILE = "SDWebImageVideoCoder/SDWebImageVideoCoder-Info.plist";
518 | MODULE_NAME = ExampleApp;
519 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
520 | PRODUCT_NAME = "$(TARGET_NAME)";
521 | SWIFT_VERSION = 4.0;
522 | WRAPPER_EXTENSION = app;
523 | };
524 | name = Release;
525 | };
526 | 6003F5C3195388D20070C39A /* Debug */ = {
527 | isa = XCBuildConfiguration;
528 | baseConfigurationReference = 258B6DC6EEEDC77F76AF429B /* Pods-SDWebImageVideoCoder_Tests.debug.xcconfig */;
529 | buildSettings = {
530 | BUNDLE_LOADER = "$(TEST_HOST)";
531 | FRAMEWORK_SEARCH_PATHS = (
532 | "$(PLATFORM_DIR)/Developer/Library/Frameworks",
533 | "$(inherited)",
534 | "$(DEVELOPER_FRAMEWORKS_DIR)",
535 | );
536 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
537 | GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch";
538 | GCC_PREPROCESSOR_DEFINITIONS = (
539 | "DEBUG=1",
540 | "$(inherited)",
541 | );
542 | INFOPLIST_FILE = "Tests/Tests-Info.plist";
543 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
544 | PRODUCT_NAME = "$(TARGET_NAME)";
545 | SWIFT_VERSION = 4.0;
546 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SDWebImageVideoCoder_Example.app/SDWebImageVideoCoder_Example";
547 | WRAPPER_EXTENSION = xctest;
548 | };
549 | name = Debug;
550 | };
551 | 6003F5C4195388D20070C39A /* Release */ = {
552 | isa = XCBuildConfiguration;
553 | baseConfigurationReference = D666626513ED5CECC713E7DC /* Pods-SDWebImageVideoCoder_Tests.release.xcconfig */;
554 | buildSettings = {
555 | BUNDLE_LOADER = "$(TEST_HOST)";
556 | FRAMEWORK_SEARCH_PATHS = (
557 | "$(PLATFORM_DIR)/Developer/Library/Frameworks",
558 | "$(inherited)",
559 | "$(DEVELOPER_FRAMEWORKS_DIR)",
560 | );
561 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
562 | GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch";
563 | INFOPLIST_FILE = "Tests/Tests-Info.plist";
564 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
565 | PRODUCT_NAME = "$(TARGET_NAME)";
566 | SWIFT_VERSION = 4.0;
567 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SDWebImageVideoCoder_Example.app/SDWebImageVideoCoder_Example";
568 | WRAPPER_EXTENSION = xctest;
569 | };
570 | name = Release;
571 | };
572 | /* End XCBuildConfiguration section */
573 |
574 | /* Begin XCConfigurationList section */
575 | 6003F585195388D10070C39A /* Build configuration list for PBXProject "SDWebImageVideoCoder" */ = {
576 | isa = XCConfigurationList;
577 | buildConfigurations = (
578 | 6003F5BD195388D20070C39A /* Debug */,
579 | 6003F5BE195388D20070C39A /* Release */,
580 | );
581 | defaultConfigurationIsVisible = 0;
582 | defaultConfigurationName = Release;
583 | };
584 | 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "SDWebImageVideoCoder_Example" */ = {
585 | isa = XCConfigurationList;
586 | buildConfigurations = (
587 | 6003F5C0195388D20070C39A /* Debug */,
588 | 6003F5C1195388D20070C39A /* Release */,
589 | );
590 | defaultConfigurationIsVisible = 0;
591 | defaultConfigurationName = Release;
592 | };
593 | 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "SDWebImageVideoCoder_Tests" */ = {
594 | isa = XCConfigurationList;
595 | buildConfigurations = (
596 | 6003F5C3195388D20070C39A /* Debug */,
597 | 6003F5C4195388D20070C39A /* Release */,
598 | );
599 | defaultConfigurationIsVisible = 0;
600 | defaultConfigurationName = Release;
601 | };
602 | /* End XCConfigurationList section */
603 | };
604 | rootObject = 6003F582195388D10070C39A /* Project object */;
605 | }
606 |
--------------------------------------------------------------------------------
/Example/SDWebImageVideoCoder.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/SDWebImageVideoCoder.xcodeproj/xcshareddata/xcschemes/SDWebImageVideoCoder-Example.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
42 |
48 |
49 |
50 |
51 |
52 |
62 |
64 |
70 |
71 |
72 |
73 |
79 |
81 |
87 |
88 |
89 |
90 |
92 |
93 |
96 |
97 |
98 |
--------------------------------------------------------------------------------
/Example/SDWebImageVideoCoder.xcodeproj/xcshareddata/xcschemes/SDWebImageVideoCoder_Tests.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
16 |
18 |
24 |
25 |
26 |
27 |
28 |
38 |
39 |
45 |
46 |
48 |
49 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/Example/SDWebImageVideoCoder.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Example/SDWebImageVideoCoder/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/Example/SDWebImageVideoCoder/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/Example/SDWebImageVideoCoder/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/Example/SDWebImageVideoCoder/SDAppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // SDAppDelegate.h
3 | // SDWebImageVideoCoder
4 | //
5 | // Created by lizhuoli1126@126.com on 11/17/2019.
6 | // Copyright (c) 2019 lizhuoli1126@126.com. All rights reserved.
7 | //
8 |
9 | @import UIKit;
10 |
11 | @interface SDAppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Example/SDWebImageVideoCoder/SDAppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // SDAppDelegate.m
3 | // SDWebImageVideoCoder
4 | //
5 | // Created by lizhuoli1126@126.com on 11/17/2019.
6 | // Copyright (c) 2019 lizhuoli1126@126.com. All rights reserved.
7 | //
8 |
9 | #import "SDAppDelegate.h"
10 |
11 | @implementation SDAppDelegate
12 |
13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
14 | {
15 | // Override point for customization after application launch.
16 | return YES;
17 | }
18 |
19 | - (void)applicationWillResignActive:(UIApplication *)application
20 | {
21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
23 | }
24 |
25 | - (void)applicationDidEnterBackground:(UIApplication *)application
26 | {
27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
29 | }
30 |
31 | - (void)applicationWillEnterForeground:(UIApplication *)application
32 | {
33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | - (void)applicationDidBecomeActive:(UIApplication *)application
37 | {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application
42 | {
43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Example/SDWebImageVideoCoder/SDViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SDViewController.h
3 | // SDWebImageVideoCoder
4 | //
5 | // Created by lizhuoli1126@126.com on 11/17/2019.
6 | // Copyright (c) 2019 lizhuoli1126@126.com. All rights reserved.
7 | //
8 |
9 | @import UIKit;
10 |
11 | @interface SDViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Example/SDWebImageVideoCoder/SDViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // SDViewController.m
3 | // SDWebImageVideoCoder
4 | //
5 | // Created by lizhuoli1126@126.com on 11/17/2019.
6 | // Copyright (c) 2019 lizhuoli1126@126.com. All rights reserved.
7 | //
8 |
9 | #import "SDViewController.h"
10 | #import
11 | #import
12 |
13 | @interface SDViewController ()
14 |
15 | @property (nonatomic, strong) SDAnimatedImageView *imageView;
16 |
17 | @end
18 |
19 | @implementation SDViewController
20 |
21 | - (void)viewDidLoad
22 | {
23 | [super viewDidLoad];
24 | [SDImageCodersManager.sharedManager addCoder:SDImageVideoCoder.sharedCoder];
25 |
26 | self.imageView = [SDAnimatedImageView new];
27 | self.imageView.contentMode = UIViewContentModeScaleAspectFit;
28 | [self.view addSubview:self.imageView];
29 |
30 | NSURL *gifvURL = [NSURL URLWithString:@"https://i.imgur.com/FY1AbSo.mp4"];
31 |
32 | [self.imageView sd_setImageWithURL:gifvURL completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
33 | if (image) {
34 | NSLog(@"GIFV load success");
35 | } else {
36 | NSLog(@"Error: %@", error);
37 | }
38 | }];
39 | }
40 |
41 | - (void)viewDidLayoutSubviews {
42 | [super viewDidLayoutSubviews];
43 | self.imageView.frame = self.view.bounds;
44 | }
45 |
46 | - (void)didReceiveMemoryWarning
47 | {
48 | [super didReceiveMemoryWarning];
49 | // Dispose of any resources that can be recreated.
50 | }
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/Example/SDWebImageVideoCoder/SDWebImageVideoCoder-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UIRequiredDeviceCapabilities
32 |
33 | armv7
34 |
35 | UISupportedInterfaceOrientations
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationLandscapeLeft
39 | UIInterfaceOrientationLandscapeRight
40 |
41 | UISupportedInterfaceOrientations~ipad
42 |
43 | UIInterfaceOrientationPortrait
44 | UIInterfaceOrientationPortraitUpsideDown
45 | UIInterfaceOrientationLandscapeLeft
46 | UIInterfaceOrientationLandscapeRight
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/Example/SDWebImageVideoCoder/SDWebImageVideoCoder-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_5_0
10 | #warning "This project uses features only available in iOS SDK 5.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | @import UIKit;
15 | @import Foundation;
16 | #endif
17 |
--------------------------------------------------------------------------------
/Example/SDWebImageVideoCoder/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/Example/SDWebImageVideoCoder/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // SDWebImageVideoCoder
4 | //
5 | // Created by lizhuoli1126@126.com on 11/17/2019.
6 | // Copyright (c) 2019 lizhuoli1126@126.com. All rights reserved.
7 | //
8 |
9 | @import UIKit;
10 | #import "SDAppDelegate.h"
11 |
12 | int main(int argc, char * argv[])
13 | {
14 | @autoreleasepool {
15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([SDAppDelegate class]));
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Example/Screenshot/MP4Demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SDWebImage/SDWebImageVideoCoder/117eda8a4872c34dd136b5a673b39058d495a13d/Example/Screenshot/MP4Demo.png
--------------------------------------------------------------------------------
/Example/Tests/Tests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Example/Tests/Tests-Prefix.pch:
--------------------------------------------------------------------------------
1 | // The contents of this file are implicitly included at the beginning of every test case source file.
2 |
3 | #ifdef __OBJC__
4 |
5 |
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/Example/Tests/Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // SDWebImageVideoCoderTests.m
3 | // SDWebImageVideoCoderTests
4 | //
5 | // Created by lizhuoli1126@126.com on 11/17/2019.
6 | // Copyright (c) 2019 lizhuoli1126@126.com. All rights reserved.
7 | //
8 |
9 | @import XCTest;
10 |
11 | @interface Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation Tests
16 |
17 | - (void)setUp
18 | {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown
24 | {
25 | // Put teardown code here. This method is called after the invocation of each test method in the class.
26 | [super tearDown];
27 | }
28 |
29 | - (void)testExample
30 | {
31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
32 | }
33 |
34 | @end
35 |
36 |
--------------------------------------------------------------------------------
/Example/Tests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2019 lizhuoli1126@126.com
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "object": {
3 | "pins": [
4 | {
5 | "package": "SDWebImage",
6 | "repositoryURL": "https://github.com/SDWebImage/SDWebImage.git",
7 | "state": {
8 | "branch": null,
9 | "revision": "a6b6e44eadf0d39250c10a7cc0e3b91d0bdb0e94",
10 | "version": "5.10.4"
11 | }
12 | }
13 | ]
14 | },
15 | "version": 1
16 | }
17 |
--------------------------------------------------------------------------------
/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:5.0
2 | // The swift-tools-version declares the minimum version of Swift required to build this package.
3 |
4 | import PackageDescription
5 |
6 | let package = Package(
7 | name: "SDWebImageVideoCoder",
8 | platforms: [
9 | .macOS(.v10_11), .iOS(.v9), .tvOS(.v9)
10 | ],
11 | products: [
12 | // Products define the executables and libraries produced by a package, and make them visible to other packages.
13 | .library(
14 | name: "SDWebImageVideoCoder",
15 | targets: ["SDWebImageVideoCoder"]),
16 | ],
17 | dependencies: [
18 | // Dependencies declare other packages that this package depends on.
19 | // .package(url: /* package url */, from: "1.0.0"),
20 | .package(url: "https://github.com/SDWebImage/SDWebImage.git", from: "5.10.0")
21 | ],
22 | targets: [
23 | // Targets are the basic building blocks of a package. A target can define a module or a test suite.
24 | // Targets can depend on other targets in this package, and on products in packages which this package depends on.
25 | .target(
26 | name: "SDWebImageVideoCoder",
27 | dependencies: ["SDWebImage"],
28 | path: ".",
29 | sources: ["SDWebImageVideoCoder/Classes"],
30 | publicHeadersPath: "SDWebImageVideoCoder/Classes"
31 | )
32 | ]
33 | )
34 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SDWebImageVideoCoder
2 |
3 | [](https://travis-ci.org/SDWebImage/SDWebImageVideoCoder)
4 | [](https://cocoapods.org/pods/SDWebImageVideoCoder)
5 | [](https://cocoapods.org/pods/SDWebImageVideoCoder)
6 | [](https://cocoapods.org/pods/SDWebImageVideoCoder)
7 |
8 | ## What's for
9 |
10 | This is just a toy coder plugin for [SDWebImage](https://github.com/SDWebImage). Which aim to provide a demo usage that how SDWebImage combined the Animated Image View and Player and let it works for generic usage and customization.
11 |
12 | **Important**: This project is just a toy, which means, it does not provide any production ready features, and the performances is really slow.
13 |
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) .
15 |
16 | This coder plugin, provide the animation loading support for video format, including:
17 |
18 | + MP4 (MPEG/4)
19 | + M4V (Apple iTunes Movie)
20 | + MOV (QuickTime Movie)
21 |
22 | ## Requirements
23 |
24 | + iOS 9+
25 | + macOS 10.11+
26 | + tvOS 9+
27 |
28 | ## Installation
29 |
30 | #### CocoaPods
31 |
32 | SDWebImageVideoCoder is available through [CocoaPods](https://cocoapods.org). To install
33 | it, simply add the following line to your Podfile:
34 |
35 | ```ruby
36 | pod 'SDWebImageVideoCoder'
37 | ```
38 |
39 | #### Carthage
40 |
41 | SDWebImageVideoCoder is available through [Carthage](https://github.com/Carthage/Carthage).
42 |
43 | ```
44 | github "SDWebImage/SDWebImageVideoCoder"
45 | ```
46 |
47 | #### Swift Package Manager (Xcode 11+)
48 |
49 | SDWebImageVideoCoder is available through [Swift Package Manager](https://swift.org/package-manager).
50 |
51 | ```swift
52 | let package = Package(
53 | dependencies: [
54 | .package(url: "https://github.com/SDWebImage/SDWebImageVideoCoder.git", from: "0.2.0")
55 | ]
56 | )
57 | ```
58 |
59 | ## Usage
60 |
61 | ### Load Video URL
62 |
63 | For coder plugin usage, see [Wiki - Coder Usage](https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#coder-usage)
64 |
65 | + Objective-C
66 |
67 | ```objective-c
68 | // register coder
69 | [SDImageCodersManager.sharedCoder addCoder:SDImageVideoCoder.sharedCoder];
70 | // load URL
71 | SDAnimatedImageView *imageView;
72 | NSURL *videoURL = [NSURL URLWithString:@"https://i.imgur.com/FY1AbSo.mp4"];
73 | [imageView sd_setImageWithURL:videoURL];
74 | ```
75 |
76 | + Swift
77 |
78 | ```swift
79 | // register coder
80 | SDImageCodersManager.shared.addCoder(SDImageVideoCoder.shared)
81 | // load URL
82 | let imageView: SDAnimatedImageView
83 | let url = URL(string: "https://i.imgur.com/FY1AbSo.mp4")
84 | imageView.sd_setImage(url: url)
85 | ```
86 |
87 | ### AVAsset player usage
88 |
89 | For player usage, see [Wiki - Animated Image Player](https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#animated-player-530)
90 |
91 | + Objective-C
92 |
93 | ```objective-c
94 | // AVAsset
95 | AVAsset *asset;
96 | AVAssetImageGenerator *generator = [AVAssetImageGenerator assetImageGeneratorWithAsset:asset];
97 | generator.appliesPreferredTrackTransform = YES;
98 | generator.requestedTimeToleranceBefore = kCMTimeZero;
99 | generator.requestedTimeToleranceAfter = kCMTimeZero;
100 | // player
101 | SDAnimatedImagePlayer *player = [SDAnimatedImagePlayer playerWithProvider:generator];
102 | player.animationFrameHandler = ^(NSUInteger index, UIImage * frame) {
103 | // frames
104 | };
105 | [player seekToFrameAtIndex:5 loopCount:0];
106 | [player play];
107 | ```
108 |
109 | + Swift
110 |
111 | ```swift
112 | let asset: AVAsset
113 | let generator = AVAssetImageGenerator(asset: asset)
114 | generator.appliesPreferredTrackTransform = true
115 | generator.requestedTimeToleranceBefore = .zero
116 | generator.requestedTimeToleranceAfter = .zero
117 | // Player
118 | let player = SDAnimatedImagePlayer(provider: generator)
119 | player.animationFrameHandler = { (index, frame) in
120 | // frames
121 | }
122 | player.seekToFrame(at: 5, loopCount: 0)
123 | player.play()
124 | ```
125 |
126 | ## Example
127 |
128 | To run the example project, clone the repo, and run `pod install` from the Example directory first.
129 |
130 |
131 |
132 | This demo MP4 video is from [Imgur](https://imgur.com/). You can always try you short video files as well.
133 |
134 | ## Author
135 |
136 | DreamPiggy, lizhuoli1126@126.com
137 |
138 | ## License
139 |
140 | SDWebImageVideoCoder is available under the MIT license. See the LICENSE file for more info.
141 |
--------------------------------------------------------------------------------
/SDWebImageVideoCoder.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # Be sure to run `pod lib lint SDWebImageVideoCoder.podspec' to ensure this is a
3 | # valid spec before submitting.
4 | #
5 | # Any lines starting with a # are optional, but their use is encouraged
6 | # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
7 | #
8 |
9 | Pod::Spec.new do |s|
10 | s.name = 'SDWebImageVideoCoder'
11 | s.version = '0.2.0'
12 | s.summary = 'A toy (non-production) SDWebImage coder plugin to play Video Format like MP4 on Animated Image View'
13 |
14 | # This description is used to generate tags and improve search results.
15 | # * Think: What does it do? Why did you write it? What is the focus?
16 | # * Try to keep it short, snappy and to the point.
17 | # * Write the description between the DESC delimiters below.
18 | # * Finally, don't worry about the indent, CocoaPods strips it!
19 |
20 | s.description = <<-DESC
21 | This is just a toy coder plugin for SDWebImage. Which aim to provide a demo usage that how SDWeImage combined the Animated Image View and Player and let it works for generic usage and customization.
22 | DESC
23 |
24 | s.homepage = 'https://github.com/SDWebImage/SDWebImageVideoCoder'
25 | s.license = { :type => 'MIT', :file => 'LICENSE' }
26 | s.author = { 'DreamPiggy' => 'lizhuoli1126@126.com' }
27 | s.source = { :git => 'https://github.com/SDWebImage/SDWebImageVideoCoder.git', :tag => s.version.to_s }
28 |
29 | s.ios.deployment_target = '9.0'
30 | s.osx.deployment_target = '10.11'
31 | s.tvos.deployment_target = '9.0'
32 |
33 | s.source_files = 'SDWebImageVideoCoder/Classes/**/*', 'SDWebImageVideoCoder/Module/SDWebImageVideoCoder.h'
34 | s.dependency 'SDWebImage', '~> 5.10'
35 | end
36 |
--------------------------------------------------------------------------------
/SDWebImageVideoCoder.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 324AC22123812D860065C9BF /* AVAssetImageGenerator+SDAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 324AC21C23812D860065C9BF /* AVAssetImageGenerator+SDAdditions.m */; };
11 | 324AC22323812D860065C9BF /* AVAssetImageGenerator+SDAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 324AC21E23812D860065C9BF /* AVAssetImageGenerator+SDAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
12 | 324AC22F23812DA20065C9BF /* SDWebImageVideoCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 324AC22D23812DA20065C9BF /* SDWebImageVideoCoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
13 | 324AC23223812DE20065C9BF /* SDImageVideoCoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 324AC23023812DE20065C9BF /* SDImageVideoCoder.m */; };
14 | 324AC23323812DE20065C9BF /* SDImageVideoCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 324AC23123812DE20065C9BF /* SDImageVideoCoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
15 | 324AC24E238131A80065C9BF /* AVAssetImageGenerator+SDAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 324AC21E23812D860065C9BF /* AVAssetImageGenerator+SDAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
16 | 324AC24F238131A80065C9BF /* AVAssetImageGenerator+SDAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 324AC21C23812D860065C9BF /* AVAssetImageGenerator+SDAdditions.m */; };
17 | 324AC250238131A80065C9BF /* SDImageVideoCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 324AC23123812DE20065C9BF /* SDImageVideoCoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
18 | 324AC251238131A80065C9BF /* SDImageVideoCoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 324AC23023812DE20065C9BF /* SDImageVideoCoder.m */; };
19 | 324AC252238131A80065C9BF /* AVAssetImageGenerator+SDAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 324AC21E23812D860065C9BF /* AVAssetImageGenerator+SDAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
20 | 324AC253238131A80065C9BF /* AVAssetImageGenerator+SDAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 324AC21C23812D860065C9BF /* AVAssetImageGenerator+SDAdditions.m */; };
21 | 324AC254238131A80065C9BF /* SDImageVideoCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 324AC23123812DE20065C9BF /* SDImageVideoCoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
22 | 324AC255238131A80065C9BF /* SDImageVideoCoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 324AC23023812DE20065C9BF /* SDImageVideoCoder.m */; };
23 | 324AC256238131B50065C9BF /* SDWebImageVideoCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 324AC22D23812DA20065C9BF /* SDWebImageVideoCoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
24 | 324AC257238131B50065C9BF /* SDWebImageVideoCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 324AC22D23812DA20065C9BF /* SDWebImageVideoCoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
25 | 324AC25A238131EF0065C9BF /* SDWebImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 324AC259238131EF0065C9BF /* SDWebImage.framework */; };
26 | 324AC25E238132030065C9BF /* SDWebImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 324AC25D238132030065C9BF /* SDWebImage.framework */; };
27 | 324AC2662381324C0065C9BF /* SDWebImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 324AC2652381324C0065C9BF /* SDWebImage.framework */; };
28 | /* End PBXBuildFile section */
29 |
30 | /* Begin PBXFileReference section */
31 | 324AC21023812D4C0065C9BF /* SDWebImageVideoCoder.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDWebImageVideoCoder.framework; sourceTree = BUILT_PRODUCTS_DIR; };
32 | 324AC21C23812D860065C9BF /* AVAssetImageGenerator+SDAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AVAssetImageGenerator+SDAdditions.m"; sourceTree = ""; };
33 | 324AC21E23812D860065C9BF /* AVAssetImageGenerator+SDAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AVAssetImageGenerator+SDAdditions.h"; sourceTree = ""; };
34 | 324AC22C23812DA20065C9BF /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
35 | 324AC22D23812DA20065C9BF /* SDWebImageVideoCoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDWebImageVideoCoder.h; sourceTree = ""; };
36 | 324AC23023812DE20065C9BF /* SDImageVideoCoder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDImageVideoCoder.m; sourceTree = ""; };
37 | 324AC23123812DE20065C9BF /* SDImageVideoCoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDImageVideoCoder.h; sourceTree = ""; };
38 | 324AC239238131920065C9BF /* SDWebImageVideoCoder.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDWebImageVideoCoder.framework; sourceTree = BUILT_PRODUCTS_DIR; };
39 | 324AC246238131990065C9BF /* SDWebImageVideoCoder.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDWebImageVideoCoder.framework; sourceTree = BUILT_PRODUCTS_DIR; };
40 | 324AC259238131EF0065C9BF /* SDWebImage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDWebImage.framework; path = Carthage/Build/iOS/SDWebImage.framework; sourceTree = ""; };
41 | 324AC25D238132030065C9BF /* SDWebImage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDWebImage.framework; path = Carthage/Build/Mac/SDWebImage.framework; sourceTree = ""; };
42 | 324AC2612381320F0065C9BF /* SDWebImage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDWebImage.framework; path = Carthage/Build/watchOS/SDWebImage.framework; sourceTree = ""; };
43 | 324AC2652381324C0065C9BF /* SDWebImage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDWebImage.framework; path = Carthage/Build/tvOS/SDWebImage.framework; sourceTree = ""; };
44 | /* End PBXFileReference section */
45 |
46 | /* Begin PBXFrameworksBuildPhase section */
47 | 324AC20D23812D4C0065C9BF /* Frameworks */ = {
48 | isa = PBXFrameworksBuildPhase;
49 | buildActionMask = 2147483647;
50 | files = (
51 | 324AC25A238131EF0065C9BF /* SDWebImage.framework in Frameworks */,
52 | );
53 | runOnlyForDeploymentPostprocessing = 0;
54 | };
55 | 324AC236238131920065C9BF /* Frameworks */ = {
56 | isa = PBXFrameworksBuildPhase;
57 | buildActionMask = 2147483647;
58 | files = (
59 | 324AC25E238132030065C9BF /* SDWebImage.framework in Frameworks */,
60 | );
61 | runOnlyForDeploymentPostprocessing = 0;
62 | };
63 | 324AC243238131990065C9BF /* Frameworks */ = {
64 | isa = PBXFrameworksBuildPhase;
65 | buildActionMask = 2147483647;
66 | files = (
67 | 324AC2662381324C0065C9BF /* SDWebImage.framework in Frameworks */,
68 | );
69 | runOnlyForDeploymentPostprocessing = 0;
70 | };
71 | /* End PBXFrameworksBuildPhase section */
72 |
73 | /* Begin PBXGroup section */
74 | 324AC20623812D4C0065C9BF = {
75 | isa = PBXGroup;
76 | children = (
77 | 324AC21223812D4C0065C9BF /* SDWebImageVideoCoder */,
78 | 324AC21123812D4C0065C9BF /* Products */,
79 | 324AC258238131EF0065C9BF /* Frameworks */,
80 | );
81 | sourceTree = "";
82 | };
83 | 324AC21123812D4C0065C9BF /* Products */ = {
84 | isa = PBXGroup;
85 | children = (
86 | 324AC21023812D4C0065C9BF /* SDWebImageVideoCoder.framework */,
87 | 324AC239238131920065C9BF /* SDWebImageVideoCoder.framework */,
88 | 324AC246238131990065C9BF /* SDWebImageVideoCoder.framework */,
89 | );
90 | name = Products;
91 | sourceTree = "";
92 | };
93 | 324AC21223812D4C0065C9BF /* SDWebImageVideoCoder */ = {
94 | isa = PBXGroup;
95 | children = (
96 | 324AC21B23812D860065C9BF /* Classes */,
97 | 324AC22B23812DA20065C9BF /* Module */,
98 | );
99 | path = SDWebImageVideoCoder;
100 | sourceTree = "";
101 | };
102 | 324AC21B23812D860065C9BF /* Classes */ = {
103 | isa = PBXGroup;
104 | children = (
105 | 324AC21E23812D860065C9BF /* AVAssetImageGenerator+SDAdditions.h */,
106 | 324AC21C23812D860065C9BF /* AVAssetImageGenerator+SDAdditions.m */,
107 | 324AC23123812DE20065C9BF /* SDImageVideoCoder.h */,
108 | 324AC23023812DE20065C9BF /* SDImageVideoCoder.m */,
109 | );
110 | path = Classes;
111 | sourceTree = "";
112 | };
113 | 324AC22B23812DA20065C9BF /* Module */ = {
114 | isa = PBXGroup;
115 | children = (
116 | 324AC22C23812DA20065C9BF /* Info.plist */,
117 | 324AC22D23812DA20065C9BF /* SDWebImageVideoCoder.h */,
118 | );
119 | path = Module;
120 | sourceTree = "";
121 | };
122 | 324AC258238131EF0065C9BF /* Frameworks */ = {
123 | isa = PBXGroup;
124 | children = (
125 | 324AC2652381324C0065C9BF /* SDWebImage.framework */,
126 | 324AC2612381320F0065C9BF /* SDWebImage.framework */,
127 | 324AC25D238132030065C9BF /* SDWebImage.framework */,
128 | 324AC259238131EF0065C9BF /* SDWebImage.framework */,
129 | );
130 | name = Frameworks;
131 | sourceTree = "";
132 | };
133 | /* End PBXGroup section */
134 |
135 | /* Begin PBXHeadersBuildPhase section */
136 | 324AC20B23812D4C0065C9BF /* Headers */ = {
137 | isa = PBXHeadersBuildPhase;
138 | buildActionMask = 2147483647;
139 | files = (
140 | 324AC23323812DE20065C9BF /* SDImageVideoCoder.h in Headers */,
141 | 324AC22F23812DA20065C9BF /* SDWebImageVideoCoder.h in Headers */,
142 | 324AC22323812D860065C9BF /* AVAssetImageGenerator+SDAdditions.h in Headers */,
143 | );
144 | runOnlyForDeploymentPostprocessing = 0;
145 | };
146 | 324AC234238131920065C9BF /* Headers */ = {
147 | isa = PBXHeadersBuildPhase;
148 | buildActionMask = 2147483647;
149 | files = (
150 | 324AC24E238131A80065C9BF /* AVAssetImageGenerator+SDAdditions.h in Headers */,
151 | 324AC256238131B50065C9BF /* SDWebImageVideoCoder.h in Headers */,
152 | 324AC250238131A80065C9BF /* SDImageVideoCoder.h in Headers */,
153 | );
154 | runOnlyForDeploymentPostprocessing = 0;
155 | };
156 | 324AC241238131990065C9BF /* Headers */ = {
157 | isa = PBXHeadersBuildPhase;
158 | buildActionMask = 2147483647;
159 | files = (
160 | 324AC252238131A80065C9BF /* AVAssetImageGenerator+SDAdditions.h in Headers */,
161 | 324AC257238131B50065C9BF /* SDWebImageVideoCoder.h in Headers */,
162 | 324AC254238131A80065C9BF /* SDImageVideoCoder.h in Headers */,
163 | );
164 | runOnlyForDeploymentPostprocessing = 0;
165 | };
166 | /* End PBXHeadersBuildPhase section */
167 |
168 | /* Begin PBXNativeTarget section */
169 | 324AC20F23812D4C0065C9BF /* SDWebImageVideoCoder */ = {
170 | isa = PBXNativeTarget;
171 | buildConfigurationList = 324AC21823812D4C0065C9BF /* Build configuration list for PBXNativeTarget "SDWebImageVideoCoder" */;
172 | buildPhases = (
173 | 324AC20B23812D4C0065C9BF /* Headers */,
174 | 324AC20C23812D4C0065C9BF /* Sources */,
175 | 324AC20D23812D4C0065C9BF /* Frameworks */,
176 | 324AC20E23812D4C0065C9BF /* Resources */,
177 | );
178 | buildRules = (
179 | );
180 | dependencies = (
181 | );
182 | name = SDWebImageVideoCoder;
183 | productName = SDWebImageVideoCoder;
184 | productReference = 324AC21023812D4C0065C9BF /* SDWebImageVideoCoder.framework */;
185 | productType = "com.apple.product-type.framework";
186 | };
187 | 324AC238238131920065C9BF /* SDWebImageVideoCoder-macOS */ = {
188 | isa = PBXNativeTarget;
189 | buildConfigurationList = 324AC240238131920065C9BF /* Build configuration list for PBXNativeTarget "SDWebImageVideoCoder-macOS" */;
190 | buildPhases = (
191 | 324AC234238131920065C9BF /* Headers */,
192 | 324AC235238131920065C9BF /* Sources */,
193 | 324AC236238131920065C9BF /* Frameworks */,
194 | 324AC237238131920065C9BF /* Resources */,
195 | );
196 | buildRules = (
197 | );
198 | dependencies = (
199 | );
200 | name = "SDWebImageVideoCoder-macOS";
201 | productName = "SDWebImageVideoCoder-macOS";
202 | productReference = 324AC239238131920065C9BF /* SDWebImageVideoCoder.framework */;
203 | productType = "com.apple.product-type.framework";
204 | };
205 | 324AC245238131990065C9BF /* SDWebImageVideoCoder-tvOS */ = {
206 | isa = PBXNativeTarget;
207 | buildConfigurationList = 324AC24B2381319A0065C9BF /* Build configuration list for PBXNativeTarget "SDWebImageVideoCoder-tvOS" */;
208 | buildPhases = (
209 | 324AC241238131990065C9BF /* Headers */,
210 | 324AC242238131990065C9BF /* Sources */,
211 | 324AC243238131990065C9BF /* Frameworks */,
212 | 324AC244238131990065C9BF /* Resources */,
213 | );
214 | buildRules = (
215 | );
216 | dependencies = (
217 | );
218 | name = "SDWebImageVideoCoder-tvOS";
219 | productName = "SDWebImageVideoCoder-tvOS";
220 | productReference = 324AC246238131990065C9BF /* SDWebImageVideoCoder.framework */;
221 | productType = "com.apple.product-type.framework";
222 | };
223 | /* End PBXNativeTarget section */
224 |
225 | /* Begin PBXProject section */
226 | 324AC20723812D4C0065C9BF /* Project object */ = {
227 | isa = PBXProject;
228 | attributes = {
229 | LastUpgradeCheck = 1120;
230 | ORGANIZATIONNAME = cocoapods;
231 | TargetAttributes = {
232 | 324AC20F23812D4C0065C9BF = {
233 | CreatedOnToolsVersion = 11.2;
234 | };
235 | 324AC238238131920065C9BF = {
236 | CreatedOnToolsVersion = 11.2;
237 | };
238 | 324AC245238131990065C9BF = {
239 | CreatedOnToolsVersion = 11.2;
240 | };
241 | };
242 | };
243 | buildConfigurationList = 324AC20A23812D4C0065C9BF /* Build configuration list for PBXProject "SDWebImageVideoCoder" */;
244 | compatibilityVersion = "Xcode 9.3";
245 | developmentRegion = en;
246 | hasScannedForEncodings = 0;
247 | knownRegions = (
248 | en,
249 | Base,
250 | );
251 | mainGroup = 324AC20623812D4C0065C9BF;
252 | productRefGroup = 324AC21123812D4C0065C9BF /* Products */;
253 | projectDirPath = "";
254 | projectRoot = "";
255 | targets = (
256 | 324AC20F23812D4C0065C9BF /* SDWebImageVideoCoder */,
257 | 324AC238238131920065C9BF /* SDWebImageVideoCoder-macOS */,
258 | 324AC245238131990065C9BF /* SDWebImageVideoCoder-tvOS */,
259 | );
260 | };
261 | /* End PBXProject section */
262 |
263 | /* Begin PBXResourcesBuildPhase section */
264 | 324AC20E23812D4C0065C9BF /* Resources */ = {
265 | isa = PBXResourcesBuildPhase;
266 | buildActionMask = 2147483647;
267 | files = (
268 | );
269 | runOnlyForDeploymentPostprocessing = 0;
270 | };
271 | 324AC237238131920065C9BF /* Resources */ = {
272 | isa = PBXResourcesBuildPhase;
273 | buildActionMask = 2147483647;
274 | files = (
275 | );
276 | runOnlyForDeploymentPostprocessing = 0;
277 | };
278 | 324AC244238131990065C9BF /* Resources */ = {
279 | isa = PBXResourcesBuildPhase;
280 | buildActionMask = 2147483647;
281 | files = (
282 | );
283 | runOnlyForDeploymentPostprocessing = 0;
284 | };
285 | /* End PBXResourcesBuildPhase section */
286 |
287 | /* Begin PBXSourcesBuildPhase section */
288 | 324AC20C23812D4C0065C9BF /* Sources */ = {
289 | isa = PBXSourcesBuildPhase;
290 | buildActionMask = 2147483647;
291 | files = (
292 | 324AC23223812DE20065C9BF /* SDImageVideoCoder.m in Sources */,
293 | 324AC22123812D860065C9BF /* AVAssetImageGenerator+SDAdditions.m in Sources */,
294 | );
295 | runOnlyForDeploymentPostprocessing = 0;
296 | };
297 | 324AC235238131920065C9BF /* Sources */ = {
298 | isa = PBXSourcesBuildPhase;
299 | buildActionMask = 2147483647;
300 | files = (
301 | 324AC251238131A80065C9BF /* SDImageVideoCoder.m in Sources */,
302 | 324AC24F238131A80065C9BF /* AVAssetImageGenerator+SDAdditions.m in Sources */,
303 | );
304 | runOnlyForDeploymentPostprocessing = 0;
305 | };
306 | 324AC242238131990065C9BF /* Sources */ = {
307 | isa = PBXSourcesBuildPhase;
308 | buildActionMask = 2147483647;
309 | files = (
310 | 324AC255238131A80065C9BF /* SDImageVideoCoder.m in Sources */,
311 | 324AC253238131A80065C9BF /* AVAssetImageGenerator+SDAdditions.m in Sources */,
312 | );
313 | runOnlyForDeploymentPostprocessing = 0;
314 | };
315 | /* End PBXSourcesBuildPhase section */
316 |
317 | /* Begin XCBuildConfiguration section */
318 | 324AC21623812D4C0065C9BF /* Debug */ = {
319 | isa = XCBuildConfiguration;
320 | buildSettings = {
321 | ALWAYS_SEARCH_USER_PATHS = NO;
322 | CLANG_ANALYZER_NONNULL = YES;
323 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
324 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
325 | CLANG_CXX_LIBRARY = "libc++";
326 | CLANG_ENABLE_MODULES = YES;
327 | CLANG_ENABLE_OBJC_ARC = YES;
328 | CLANG_ENABLE_OBJC_WEAK = YES;
329 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
330 | CLANG_WARN_BOOL_CONVERSION = YES;
331 | CLANG_WARN_COMMA = YES;
332 | CLANG_WARN_CONSTANT_CONVERSION = YES;
333 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
334 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
335 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
336 | CLANG_WARN_EMPTY_BODY = YES;
337 | CLANG_WARN_ENUM_CONVERSION = YES;
338 | CLANG_WARN_INFINITE_RECURSION = YES;
339 | CLANG_WARN_INT_CONVERSION = YES;
340 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
341 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
342 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
343 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
344 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
345 | CLANG_WARN_STRICT_PROTOTYPES = YES;
346 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
347 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
348 | CLANG_WARN_UNREACHABLE_CODE = YES;
349 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
350 | COPY_PHASE_STRIP = NO;
351 | CURRENT_PROJECT_VERSION = 1;
352 | DEBUG_INFORMATION_FORMAT = dwarf;
353 | ENABLE_STRICT_OBJC_MSGSEND = YES;
354 | ENABLE_TESTABILITY = YES;
355 | GCC_C_LANGUAGE_STANDARD = gnu11;
356 | GCC_DYNAMIC_NO_PIC = NO;
357 | GCC_NO_COMMON_BLOCKS = YES;
358 | GCC_OPTIMIZATION_LEVEL = 0;
359 | GCC_PREPROCESSOR_DEFINITIONS = (
360 | "DEBUG=1",
361 | "$(inherited)",
362 | );
363 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
364 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
365 | GCC_WARN_UNDECLARED_SELECTOR = YES;
366 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
367 | GCC_WARN_UNUSED_FUNCTION = YES;
368 | GCC_WARN_UNUSED_VARIABLE = YES;
369 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
370 | MACOSX_DEPLOYMENT_TARGET = 10.11;
371 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
372 | MTL_FAST_MATH = YES;
373 | ONLY_ACTIVE_ARCH = YES;
374 | SDKROOT = iphoneos;
375 | TVOS_DEPLOYMENT_TARGET = 9.0;
376 | VERSIONING_SYSTEM = "apple-generic";
377 | VERSION_INFO_PREFIX = "";
378 | };
379 | name = Debug;
380 | };
381 | 324AC21723812D4C0065C9BF /* Release */ = {
382 | isa = XCBuildConfiguration;
383 | buildSettings = {
384 | ALWAYS_SEARCH_USER_PATHS = NO;
385 | CLANG_ANALYZER_NONNULL = YES;
386 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
387 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
388 | CLANG_CXX_LIBRARY = "libc++";
389 | CLANG_ENABLE_MODULES = YES;
390 | CLANG_ENABLE_OBJC_ARC = YES;
391 | CLANG_ENABLE_OBJC_WEAK = YES;
392 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
393 | CLANG_WARN_BOOL_CONVERSION = YES;
394 | CLANG_WARN_COMMA = YES;
395 | CLANG_WARN_CONSTANT_CONVERSION = YES;
396 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
397 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
398 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
399 | CLANG_WARN_EMPTY_BODY = YES;
400 | CLANG_WARN_ENUM_CONVERSION = YES;
401 | CLANG_WARN_INFINITE_RECURSION = YES;
402 | CLANG_WARN_INT_CONVERSION = YES;
403 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
404 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
405 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
406 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
407 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
408 | CLANG_WARN_STRICT_PROTOTYPES = YES;
409 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
410 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
411 | CLANG_WARN_UNREACHABLE_CODE = YES;
412 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
413 | COPY_PHASE_STRIP = NO;
414 | CURRENT_PROJECT_VERSION = 1;
415 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
416 | ENABLE_NS_ASSERTIONS = NO;
417 | ENABLE_STRICT_OBJC_MSGSEND = YES;
418 | GCC_C_LANGUAGE_STANDARD = gnu11;
419 | GCC_NO_COMMON_BLOCKS = YES;
420 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
421 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
422 | GCC_WARN_UNDECLARED_SELECTOR = YES;
423 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
424 | GCC_WARN_UNUSED_FUNCTION = YES;
425 | GCC_WARN_UNUSED_VARIABLE = YES;
426 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
427 | MACOSX_DEPLOYMENT_TARGET = 10.11;
428 | MTL_ENABLE_DEBUG_INFO = NO;
429 | MTL_FAST_MATH = YES;
430 | SDKROOT = iphoneos;
431 | TVOS_DEPLOYMENT_TARGET = 9.0;
432 | VALIDATE_PRODUCT = YES;
433 | VERSIONING_SYSTEM = "apple-generic";
434 | VERSION_INFO_PREFIX = "";
435 | };
436 | name = Release;
437 | };
438 | 324AC21923812D4C0065C9BF /* Debug */ = {
439 | isa = XCBuildConfiguration;
440 | buildSettings = {
441 | CODE_SIGN_STYLE = Automatic;
442 | DEFINES_MODULE = YES;
443 | DYLIB_COMPATIBILITY_VERSION = 1;
444 | DYLIB_CURRENT_VERSION = 1;
445 | DYLIB_INSTALL_NAME_BASE = "@rpath";
446 | FRAMEWORK_SEARCH_PATHS = (
447 | "$(inherited)",
448 | "$(PROJECT_DIR)/Carthage/Build/iOS",
449 | );
450 | INFOPLIST_FILE = "$(SRCROOT)/SDWebImageVideoCoder/Module/Info.plist";
451 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
452 | LD_RUNPATH_SEARCH_PATHS = (
453 | "$(inherited)",
454 | "@executable_path/Frameworks",
455 | "@loader_path/Frameworks",
456 | );
457 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.SDWebImageVideoCoder;
458 | PRODUCT_NAME = SDWebImageVideoCoder;
459 | SKIP_INSTALL = YES;
460 | TARGETED_DEVICE_FAMILY = "1,2";
461 | };
462 | name = Debug;
463 | };
464 | 324AC21A23812D4C0065C9BF /* Release */ = {
465 | isa = XCBuildConfiguration;
466 | buildSettings = {
467 | CODE_SIGN_STYLE = Automatic;
468 | DEFINES_MODULE = YES;
469 | DYLIB_COMPATIBILITY_VERSION = 1;
470 | DYLIB_CURRENT_VERSION = 1;
471 | DYLIB_INSTALL_NAME_BASE = "@rpath";
472 | FRAMEWORK_SEARCH_PATHS = (
473 | "$(inherited)",
474 | "$(PROJECT_DIR)/Carthage/Build/iOS",
475 | );
476 | INFOPLIST_FILE = "$(SRCROOT)/SDWebImageVideoCoder/Module/Info.plist";
477 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
478 | LD_RUNPATH_SEARCH_PATHS = (
479 | "$(inherited)",
480 | "@executable_path/Frameworks",
481 | "@loader_path/Frameworks",
482 | );
483 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.SDWebImageVideoCoder;
484 | PRODUCT_NAME = SDWebImageVideoCoder;
485 | SKIP_INSTALL = YES;
486 | TARGETED_DEVICE_FAMILY = "1,2";
487 | };
488 | name = Release;
489 | };
490 | 324AC23E238131920065C9BF /* Debug */ = {
491 | isa = XCBuildConfiguration;
492 | buildSettings = {
493 | CODE_SIGN_STYLE = Automatic;
494 | COMBINE_HIDPI_IMAGES = YES;
495 | DEFINES_MODULE = YES;
496 | DYLIB_COMPATIBILITY_VERSION = 1;
497 | DYLIB_CURRENT_VERSION = 1;
498 | DYLIB_INSTALL_NAME_BASE = "@rpath";
499 | FRAMEWORK_SEARCH_PATHS = (
500 | "$(inherited)",
501 | "$(PROJECT_DIR)/Carthage/Build/Mac",
502 | );
503 | INFOPLIST_FILE = "$(SRCROOT)/SDWebImageVideoCoder/Module/Info.plist";
504 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
505 | LD_RUNPATH_SEARCH_PATHS = (
506 | "$(inherited)",
507 | "@executable_path/../Frameworks",
508 | "@loader_path/Frameworks",
509 | );
510 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.SDWebImageVideoCoder-macOS";
511 | PRODUCT_NAME = SDWebImageVideoCoder;
512 | SDKROOT = macosx;
513 | SKIP_INSTALL = YES;
514 | };
515 | name = Debug;
516 | };
517 | 324AC23F238131920065C9BF /* Release */ = {
518 | isa = XCBuildConfiguration;
519 | buildSettings = {
520 | CODE_SIGN_STYLE = Automatic;
521 | COMBINE_HIDPI_IMAGES = YES;
522 | DEFINES_MODULE = YES;
523 | DYLIB_COMPATIBILITY_VERSION = 1;
524 | DYLIB_CURRENT_VERSION = 1;
525 | DYLIB_INSTALL_NAME_BASE = "@rpath";
526 | FRAMEWORK_SEARCH_PATHS = (
527 | "$(inherited)",
528 | "$(PROJECT_DIR)/Carthage/Build/Mac",
529 | );
530 | INFOPLIST_FILE = "$(SRCROOT)/SDWebImageVideoCoder/Module/Info.plist";
531 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
532 | LD_RUNPATH_SEARCH_PATHS = (
533 | "$(inherited)",
534 | "@executable_path/../Frameworks",
535 | "@loader_path/Frameworks",
536 | );
537 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.SDWebImageVideoCoder-macOS";
538 | PRODUCT_NAME = SDWebImageVideoCoder;
539 | SDKROOT = macosx;
540 | SKIP_INSTALL = YES;
541 | };
542 | name = Release;
543 | };
544 | 324AC24C2381319A0065C9BF /* Debug */ = {
545 | isa = XCBuildConfiguration;
546 | buildSettings = {
547 | CODE_SIGN_STYLE = Automatic;
548 | DEFINES_MODULE = YES;
549 | DYLIB_COMPATIBILITY_VERSION = 1;
550 | DYLIB_CURRENT_VERSION = 1;
551 | DYLIB_INSTALL_NAME_BASE = "@rpath";
552 | FRAMEWORK_SEARCH_PATHS = (
553 | "$(inherited)",
554 | "$(PROJECT_DIR)/Carthage/Build/tvOS",
555 | );
556 | INFOPLIST_FILE = "$(SRCROOT)/SDWebImageVideoCoder/Module/Info.plist";
557 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
558 | LD_RUNPATH_SEARCH_PATHS = (
559 | "$(inherited)",
560 | "@executable_path/Frameworks",
561 | "@loader_path/Frameworks",
562 | );
563 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.SDWebImageVideoCoder-tvOS";
564 | PRODUCT_NAME = SDWebImageVideoCoder;
565 | SDKROOT = appletvos;
566 | SKIP_INSTALL = YES;
567 | TARGETED_DEVICE_FAMILY = 3;
568 | };
569 | name = Debug;
570 | };
571 | 324AC24D2381319A0065C9BF /* Release */ = {
572 | isa = XCBuildConfiguration;
573 | buildSettings = {
574 | CODE_SIGN_STYLE = Automatic;
575 | DEFINES_MODULE = YES;
576 | DYLIB_COMPATIBILITY_VERSION = 1;
577 | DYLIB_CURRENT_VERSION = 1;
578 | DYLIB_INSTALL_NAME_BASE = "@rpath";
579 | FRAMEWORK_SEARCH_PATHS = (
580 | "$(inherited)",
581 | "$(PROJECT_DIR)/Carthage/Build/tvOS",
582 | );
583 | INFOPLIST_FILE = "$(SRCROOT)/SDWebImageVideoCoder/Module/Info.plist";
584 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
585 | LD_RUNPATH_SEARCH_PATHS = (
586 | "$(inherited)",
587 | "@executable_path/Frameworks",
588 | "@loader_path/Frameworks",
589 | );
590 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.SDWebImageVideoCoder-tvOS";
591 | PRODUCT_NAME = SDWebImageVideoCoder;
592 | SDKROOT = appletvos;
593 | SKIP_INSTALL = YES;
594 | TARGETED_DEVICE_FAMILY = 3;
595 | };
596 | name = Release;
597 | };
598 | /* End XCBuildConfiguration section */
599 |
600 | /* Begin XCConfigurationList section */
601 | 324AC20A23812D4C0065C9BF /* Build configuration list for PBXProject "SDWebImageVideoCoder" */ = {
602 | isa = XCConfigurationList;
603 | buildConfigurations = (
604 | 324AC21623812D4C0065C9BF /* Debug */,
605 | 324AC21723812D4C0065C9BF /* Release */,
606 | );
607 | defaultConfigurationIsVisible = 0;
608 | defaultConfigurationName = Release;
609 | };
610 | 324AC21823812D4C0065C9BF /* Build configuration list for PBXNativeTarget "SDWebImageVideoCoder" */ = {
611 | isa = XCConfigurationList;
612 | buildConfigurations = (
613 | 324AC21923812D4C0065C9BF /* Debug */,
614 | 324AC21A23812D4C0065C9BF /* Release */,
615 | );
616 | defaultConfigurationIsVisible = 0;
617 | defaultConfigurationName = Release;
618 | };
619 | 324AC240238131920065C9BF /* Build configuration list for PBXNativeTarget "SDWebImageVideoCoder-macOS" */ = {
620 | isa = XCConfigurationList;
621 | buildConfigurations = (
622 | 324AC23E238131920065C9BF /* Debug */,
623 | 324AC23F238131920065C9BF /* Release */,
624 | );
625 | defaultConfigurationIsVisible = 0;
626 | defaultConfigurationName = Release;
627 | };
628 | 324AC24B2381319A0065C9BF /* Build configuration list for PBXNativeTarget "SDWebImageVideoCoder-tvOS" */ = {
629 | isa = XCConfigurationList;
630 | buildConfigurations = (
631 | 324AC24C2381319A0065C9BF /* Debug */,
632 | 324AC24D2381319A0065C9BF /* Release */,
633 | );
634 | defaultConfigurationIsVisible = 0;
635 | defaultConfigurationName = Release;
636 | };
637 | /* End XCConfigurationList section */
638 | };
639 | rootObject = 324AC20723812D4C0065C9BF /* Project object */;
640 | }
641 |
--------------------------------------------------------------------------------
/SDWebImageVideoCoder.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SDWebImageVideoCoder.xcodeproj/xcshareddata/xcschemes/SDWebImageVideoCoder-macOS.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
50 |
51 |
57 |
58 |
59 |
60 |
62 |
63 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/SDWebImageVideoCoder.xcodeproj/xcshareddata/xcschemes/SDWebImageVideoCoder-tvOS.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
50 |
51 |
57 |
58 |
59 |
60 |
62 |
63 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/SDWebImageVideoCoder.xcodeproj/xcshareddata/xcschemes/SDWebImageVideoCoder.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
50 |
51 |
57 |
58 |
59 |
60 |
62 |
63 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/SDWebImageVideoCoder/Assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SDWebImage/SDWebImageVideoCoder/117eda8a4872c34dd136b5a673b39058d495a13d/SDWebImageVideoCoder/Assets/.gitkeep
--------------------------------------------------------------------------------
/SDWebImageVideoCoder/Classes/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SDWebImage/SDWebImageVideoCoder/117eda8a4872c34dd136b5a673b39058d495a13d/SDWebImageVideoCoder/Classes/.gitkeep
--------------------------------------------------------------------------------
/SDWebImageVideoCoder/Classes/AVAssetImageGenerator+SDAdditions.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | #if __has_include()
10 | #import
11 | #else
12 | @import SDWebImage;
13 | #endif
14 | #import
15 |
16 | @interface AVAssetImageGenerator (SDAdditions)
17 |
18 | /// The desired animation image FPS. By default it's the Video FPS, larger value will consume much more CPU (25 FPS may consume 200% CPU)
19 | @property (nonatomic, assign) NSTimeInterval sd_framePerSecond;
20 |
21 | /// Create a image generator with video data and desired format type
22 | /// @param data video data
23 | /// @param type video format type
24 | + (nullable instancetype)sd_assetImageGeneratorWithVideoData:(nonnull NSData *)data contentType:(nullable AVFileType)type;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/SDWebImageVideoCoder/Classes/AVAssetImageGenerator+SDAdditions.m:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | #import "AVAssetImageGenerator+SDAdditions.h"
10 | #import
11 | #if SD_UIKIT
12 | #import
13 | #endif
14 |
15 | #define AVDataAssetClass @"AVDataAsset"
16 | #define AVDataAssetMaxLength 1048576
17 | @protocol AVDataAssetProtocol
18 |
19 | - (instancetype)initWithData:(NSData *)data contentType:(AVFileType)type;
20 |
21 | @end
22 |
23 | @interface AVAssetImageGenerator ()
24 |
25 | @property (nonatomic, strong) NSData *sd_videoData;
26 |
27 | @end
28 |
29 | @implementation AVAssetImageGenerator (SDAdditions)
30 |
31 | + (instancetype)sd_assetImageGeneratorWithVideoData:(NSData *)data contentType:(AVFileType)type {
32 | if (!data) {
33 | return nil;
34 | }
35 |
36 | AVAsset *asset;
37 | Class cls = NSClassFromString(AVDataAssetClass);
38 | if ([cls instancesRespondToSelector:@selector(initWithData:contentType:)] && data.length < AVDataAssetMaxLength && type.length > 0) {
39 | // Prefer Data Asset if available
40 | asset = [[cls alloc] initWithData:data contentType:type];
41 | } else {
42 | // Random file name
43 | NSString *uuid = [NSUUID UUID].UUIDString;
44 | // File extention
45 | NSString *extname = (__bridge NSString *)(UTTypeCopyPreferredTagWithClass((__bridge CFStringRef _Nonnull)(type), kUTTagClassFilenameExtension));
46 | if (!extname) {
47 | extname = @"mp4";
48 | }
49 | NSString *fileName = [NSString stringWithFormat:@"%@.%@", uuid, extname];
50 | NSURL *fileURL = [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:fileName]];
51 | [data writeToURL:fileURL atomically:NO];
52 | asset = [[AVURLAsset alloc] initWithURL:fileURL options:nil];
53 | }
54 | if (!asset) {
55 | return nil;
56 | }
57 | AVAssetImageGenerator *generator = [AVAssetImageGenerator assetImageGeneratorWithAsset:asset];
58 | if (!generator) {
59 | return nil;
60 | }
61 | generator.sd_videoData = data;
62 | generator.appliesPreferredTrackTransform = YES;
63 | generator.requestedTimeToleranceBefore = kCMTimeZero;
64 | generator.requestedTimeToleranceAfter = kCMTimeZero;
65 | return generator;
66 | }
67 |
68 | #pragma mark - SDImageCoder
69 |
70 | - (NSData *)animatedImageData {
71 | NSData *data = [self sd_videoData];
72 | if (data) {
73 | return data;
74 | }
75 | if ([self.asset isKindOfClass:AVURLAsset.class]) {
76 | NSURL *url = ((AVURLAsset *)self.asset).URL;
77 | data = [NSData dataWithContentsOfURL:url options:NSDataReadingMappedIfSafe error:nil];
78 | }
79 | return data;
80 | }
81 |
82 | - (NSUInteger)animatedImageLoopCount {
83 | return 0;
84 | }
85 |
86 | - (NSUInteger)animatedImageFrameCount {
87 | CMTime time = self.asset.duration;
88 | NSTimeInterval totalDuration = CMTimeGetSeconds(time);
89 | return totalDuration * [self sd_framePerSecond];
90 | }
91 |
92 | - (NSTimeInterval)animatedImageDurationAtIndex:(NSUInteger)index {
93 | return 1.0 / [self sd_framePerSecond];
94 | }
95 |
96 | - (nullable UIImage *)animatedImageFrameAtIndex:(NSUInteger)index {
97 | NSError *error;
98 | CMTime time = [self sd_frameTimeAtIndex:index];
99 | CMTime actualTime;
100 | CGImageRef imageRef = [self copyCGImageAtTime:time actualTime:&actualTime error:&error];
101 | if (!imageRef) {
102 | NSLog(@"AVAssetImageGenerator frame generate failed: %@", error);
103 | return nil;
104 | }
105 |
106 | // AVFoundation force decode
107 | CGImageRef newImageRef = [SDImageCoderHelper CGImageCreateDecoded:imageRef];
108 | if (!newImageRef) {
109 | newImageRef = imageRef;
110 | } else {
111 | CGImageRelease(imageRef);
112 | }
113 | #if SD_MAC
114 | UIImage *image = [[UIImage alloc] initWithCGImage:newImageRef scale:1 orientation:kCGImagePropertyOrientationUp];
115 | #else
116 | UIImage *image = [[UIImage alloc] initWithCGImage:newImageRef scale:1 orientation:UIImageOrientationUp];
117 | #endif
118 | CGImageRelease(newImageRef);
119 | return image;
120 | }
121 |
122 | #pragma mark - Helper
123 |
124 | - (CMTime)sd_frameTimeAtIndex:(NSUInteger)index {
125 | NSTimeInterval duration = [self animatedImageDurationAtIndex:index] * index;
126 | CMTime time = CMTimeMakeWithSeconds(duration, 1000);
127 | return time;
128 | }
129 |
130 | - (NSTimeInterval)sd_framePerSecond {
131 | NSNumber *value = objc_getAssociatedObject(self, @selector(sd_framePerSecond));
132 | if (!value) {
133 | AVAssetTrack *videoTrack = [self.asset tracksWithMediaType:AVMediaTypeVideo].lastObject;
134 | NSTimeInterval framePerSecond = videoTrack.nominalFrameRate;
135 | objc_setAssociatedObject(self, @selector(sd_framePerSecond), @(framePerSecond), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
136 | return framePerSecond;
137 | }
138 | return value.doubleValue;
139 | }
140 |
141 | - (void)setSd_framePerSecond:(NSTimeInterval)sd_framePerSecond {
142 | objc_setAssociatedObject(self, @selector(sd_framePerSecond), @(sd_framePerSecond), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
143 | }
144 |
145 | - (NSData *)sd_videoData {
146 | return objc_getAssociatedObject(self, @selector(sd_videoData));
147 | }
148 |
149 | - (void)setSd_videoData:(NSData *)sd_videoData {
150 | objc_setAssociatedObject(self, @selector(sd_videoData), sd_videoData, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
151 | }
152 |
153 | @end
154 |
--------------------------------------------------------------------------------
/SDWebImageVideoCoder/Classes/SDImageVideoCoder.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | #if __has_include()
10 | #import
11 | #else
12 | @import SDWebImage;
13 | #endif
14 |
15 | /// A coder plugin which can play Video format, such as MP4/MOV.
16 | /// For normal image, it generate the poster thumb image of video.
17 | /// For animated image, it use the `AVAssetImageGenerator` to generate individual frames by times.
18 | @interface SDImageVideoCoder : NSObject
19 |
20 | /// The shared instance of this coder
21 | @property (nonatomic, class, readonly, nonnull) SDImageVideoCoder *sharedCoder;
22 |
23 | /// The maximum FPS for animated image playback. This can dramatically impact the performance.
24 | /// By default, this value set to 10, which means the frame duration is 0.1s.
25 | @property (nonatomic, assign) NSTimeInterval maxFramePerSecond;
26 |
27 | /// The maximum dimensions for the animated image playback. Zero specifies the asset’s unscaled dimensions.
28 | /// By default, this value set to Zero. You can limit the size to reduce CPU and memory usage.
29 | @property (nonatomic, assign) CGSize maxFrameSize;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/SDWebImageVideoCoder/Classes/SDImageVideoCoder.m:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | #import "SDImageVideoCoder.h"
10 | #import "AVAssetImageGenerator+SDAdditions.h"
11 |
12 | @interface SDImageVideoCoder ()
13 |
14 | @property (nonatomic, strong) AVAssetImageGenerator *generator;
15 |
16 | @end
17 |
18 | @implementation SDImageVideoCoder
19 |
20 | + (SDImageVideoCoder *)sharedCoder {
21 | static SDImageVideoCoder *coder;
22 | static dispatch_once_t onceToken;
23 | dispatch_once(&onceToken, ^{
24 | coder = [[SDImageVideoCoder alloc] init];
25 | });
26 | return coder;
27 | }
28 |
29 | - (instancetype)init {
30 | self = [super init];
31 | if (self) {
32 | self.maxFramePerSecond = 10;
33 | self.maxFrameSize = CGSizeZero;
34 | }
35 | return self;
36 | }
37 |
38 | #pragma mark - Helper
39 |
40 | - (AVFileType)videoContentTypeWithData:(NSData *)data {
41 | if (!data) {
42 | return nil;
43 | }
44 | // Current supported formats
45 | if (data.length >= 8) {
46 | // MPEG4
47 | NSString *testString = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(4, 8)] encoding:NSASCIIStringEncoding];
48 | if ([testString isEqualToString:@"ftypMSNV"]
49 | || [testString isEqualToString:@"ftypisom"]) {
50 | return AVFileTypeMPEG4;
51 | }
52 | // M4V
53 | if ([testString isEqualToString:@"ftypmp42"]) {
54 | return AVFileTypeAppleM4V;
55 | }
56 | // MOV
57 | if ([testString hasPrefix:@"ftypqt"] || [testString isEqualToString:@"moov"]) {
58 | return AVFileTypeQuickTimeMovie;
59 | }
60 | }
61 | return nil;
62 | }
63 |
64 | #pragma mark - SDImageCoder
65 |
66 | - (BOOL)canDecodeFromData:(nullable NSData *)data {
67 | return [self videoContentTypeWithData:data] != nil;
68 | }
69 |
70 | - (BOOL)canEncodeToFormat:(SDImageFormat)format {
71 | return NO;
72 | }
73 |
74 | - (nullable UIImage *)decodedImageWithData:(nullable NSData *)data options:(nullable SDImageCoderOptions *)options {
75 | if (!data) {
76 | return nil;
77 | }
78 | AVFileType contentType = [self videoContentTypeWithData:data];
79 | AVAssetImageGenerator *generator = [AVAssetImageGenerator sd_assetImageGeneratorWithVideoData:data contentType:contentType];
80 | return [generator animatedImageFrameAtIndex:0];
81 | }
82 |
83 | - (nullable NSData *)encodedDataWithImage:(nullable UIImage *)image format:(SDImageFormat)format options:(nullable SDImageCoderOptions *)options {
84 | return nil;
85 | }
86 |
87 | #pragma mark - SDAnimatedImageCoder
88 |
89 | - (nullable instancetype)initWithAnimatedImageData:(nullable NSData *)data options:(nullable SDImageCoderOptions *)options {
90 | self = [self init];
91 | if (self) {
92 | if (!data) {
93 | return nil;
94 | }
95 | AVFileType contentType = [self videoContentTypeWithData:data];
96 | AVAssetImageGenerator *generator = [AVAssetImageGenerator sd_assetImageGeneratorWithVideoData:data contentType:contentType];
97 | if (!generator) {
98 | return nil;
99 | }
100 | if (generator.sd_framePerSecond > self.maxFramePerSecond) {
101 | generator.sd_framePerSecond = self.maxFramePerSecond;
102 | }
103 | generator.maximumSize = self.maxFrameSize;
104 | self.generator = generator;
105 | }
106 | return self;
107 | }
108 |
109 | - (NSData *)animatedImageData {
110 | return [self.generator animatedImageData];
111 | }
112 |
113 | - (NSUInteger)animatedImageLoopCount {
114 | return [self.generator animatedImageLoopCount];
115 | }
116 |
117 | - (NSUInteger)animatedImageFrameCount {
118 | return [self.generator animatedImageFrameCount];
119 | }
120 |
121 | - (NSTimeInterval)animatedImageDurationAtIndex:(NSUInteger)index {
122 | return [self.generator animatedImageDurationAtIndex:index];
123 | }
124 |
125 | - (nullable UIImage *)animatedImageFrameAtIndex:(NSUInteger)index {
126 | return [self.generator animatedImageFrameAtIndex:index];
127 | }
128 |
129 | @end
130 |
--------------------------------------------------------------------------------
/SDWebImageVideoCoder/Module/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 0.2.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 |
22 |
23 |
--------------------------------------------------------------------------------
/SDWebImageVideoCoder/Module/SDWebImageVideoCoder.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | #import
10 |
11 | //! Project version number for SDWebImageVideoCoder.
12 | FOUNDATION_EXPORT double SDWebImageVideoCoderVersionNumber;
13 |
14 | //! Project version string for SDWebImageVideoCoder.
15 | FOUNDATION_EXPORT const unsigned char SDWebImageVideoCoderVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 | #import
20 | #import
21 |
--------------------------------------------------------------------------------