Skip to content

Commit bd7ee08

Browse files
author
RenZhu Macro
committed
Add video animation support, update examples SimpleVideoAnimation SimpleVideoTransitionSwitch
1 parent 3929205 commit bd7ee08

File tree

144 files changed

+10316
-70
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+10316
-70
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@ Examples/SimpleVideoExport/SimpleVideoExport.xcodeproj/project.xcworkspace/xcuse
77
Examples/SimpleRealtimeFilterPlayback/SimpleRealtimeFilterPlayback.xcodeproj/xcuserdata
88
Examples/SimpleVideoTransition/SimpleVideoTransition.xcodeproj/project.xcworkspace/xcuserdata/renzhumacro.xcuserdatad
99
Examples/SimpleVideoTransition/SimpleVideoTransition.xcodeproj/xcuserdata/renzhumacro.xcuserdatad
10+
Examples/SimpleVideoAnimation/Pods/Pods.xcodeproj/xcuserdata/renzhumacro.xcuserdatad
11+
Examples/SimpleVideoAnimation/SimpleVIdeoAnimation.xcodeproj/project.xcworkspace/xcuserdata
12+
Examples/SimpleVideoAnimation/SimpleVIdeoAnimation.xcodeproj/xcuserdata
13+
Examples/SimpleVideoAnimation/SimpleVideoAnimation.xcworkspace/xcuserdata
14+
Examples/SimpleVideoTransitionSwitch/SimpleVideoTransitionSwitch.xcodeproj/xcuserdata

Examples/SimpleFourSquareVideo/SimpleFourSquareVideo/ViewController.swift

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,17 @@ class ViewController: UIViewController {
3737
let backgroundFrame = self.renderView.frame
3838
let backgroundSize = CGSize(width: backgroundFrame.size.width * 1.5,
3939
height: backgroundFrame.size.height * 1.5)
40-
MetalVideoProcessBackground.canvasSize = backgroundSize
40+
MetalVideoProcessBackground.canvasSize = backgroundSize
41+
4142

4243
let transform1 = MetalVideoProcessTransformFilter()
4344
let transform2 = MetalVideoProcessTransformFilter()
4445
let transform3 = MetalVideoProcessTransformFilter()
4546
let transform4 = MetalVideoProcessTransformFilter()
46-
47+
48+
49+
50+
4751
transform1.stretchType = .aspectToFit
4852
transform1.roi = CGRect(x: 0.1, y: 0.1,
4953
width: 0.8,
@@ -79,37 +83,49 @@ class ViewController: UIViewController {
7983
player.addTarget(transform4, trackID: item4.trackID, targetTrackId: item4.trackID)
8084

8185
transform1.saveUniformSettings(forTimelineRange: item1.timeRange, trackID: item1.trackID)
82-
86+
//
8387
transform2.saveUniformSettings(forTimelineRange: item2.timeRange, trackID: item2.trackID)
84-
88+
//
8589
transform3.saveUniformSettings(forTimelineRange: item3.timeRange, trackID: item3.trackID)
86-
90+
//
8791
transform4.saveUniformSettings(forTimelineRange: item4.timeRange, trackID: item4.trackID)
8892

8993
let layer1 = MetalVideoProcessBlendFilter()
9094

9195
background --> layer1
9296
transform1 --> layer1
97+
98+
// layer1.saveUniformSettings(forTimelineRange: item1.timeRange, trackID: item1.trackID)
9399

94100
let layer2 = MetalVideoProcessBlendFilter()
95101

96102
layer1 --> layer2
97103
transform2 --> layer2
98-
104+
//
105+
// layer2.saveUniformSettings(forTimelineRange: item2.timeRange, trackID: item2.trackID)
106+
//
99107
let layer3 = MetalVideoProcessBlendFilter()
100108

101109
layer2 --> layer3
102110
transform3 --> layer3
103-
111+
// layer3.saveUniformSettings(forTimelineRange: item3.timeRange, trackID: item3.trackID)
112+
104113
let layer4 = MetalVideoProcessBlendFilter()
105114

106115
layer3 --> layer4
107116
transform4 --> layer4
108-
117+
// layer4.saveUniformSettings(forTimelineRange: item4.timeRange, trackID: item4.trackID)
118+
//
119+
109120
self.progress.minimumValue = 0.0
110121
self.progress.maximumValue = Float(playerItem.duration.seconds)
122+
111123

124+
112125
layer4 --> renderView
126+
// layer3 --> self.renderView
127+
// transform1 --> self.renderView
128+
113129
self.player = player
114130
self.player?.playerDelegate = self
115131

Examples/SimpleVideoAnimation/Podfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Uncomment the next line to define a global platform for your project
2+
# platform :ios, '9.0'
3+
4+
target 'SimpleVideoAnimation' do
5+
# Comment the next line if you don't want to use dynamic frameworks
6+
use_frameworks!
7+
8+
# Pods for SimpleVideoAnimation
9+
pod 'PryntTrimmerView'
10+
11+
end
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
PODS:
2+
- PryntTrimmerView (4.0.0)
3+
4+
DEPENDENCIES:
5+
- PryntTrimmerView
6+
7+
SPEC REPOS:
8+
trunk:
9+
- PryntTrimmerView
10+
11+
SPEC CHECKSUMS:
12+
PryntTrimmerView: 67e67573ffd4c073f1308effa66aefd0cfa667a0
13+
14+
PODFILE CHECKSUM: 4473f02a1528566660f9c5ed79ea1d9d7df2096d
15+
16+
COCOAPODS: 1.8.4

Examples/SimpleVideoAnimation/Pods/Manifest.lock

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy