Skip to content

Commit

Permalink
Merge pull request #78 from anhaoxiong/master
Browse files Browse the repository at this point in the history
release v2.0.0
  • Loading branch information
lawder authored Mar 29, 2019
2 parents 56d00c8 + 184449b commit a8d34c1
Show file tree
Hide file tree
Showing 223 changed files with 12,130 additions and 1,664 deletions.
15 changes: 15 additions & 0 deletions APIDiffs/api-diffs-2.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# PLShortVideoKit 1.16.1 to 2.0.0 API Differences

## General Headers

```
PLShortVideoRecorder.h
```

- *Added* - (void)toggleCamera:(void(^)(BOOL isFinish))completeBlock;

```
PLSVideoMixRecorder.h
```

- *Added* - (void)toggleCamera:(void(^)(BOOL isFinish))completeBlock;
6 changes: 6 additions & 0 deletions Example/PLShortVideoKitDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@
76F41C52219D77B40099E668 /* mulitRate.png in Resources */ = {isa = PBXBuildFile; fileRef = 76F41C51219D77B40099E668 /* mulitRate.png */; };
9343A8C01F66763A007213BD /* Time_Machine_No_Reverser.png in Resources */ = {isa = PBXBuildFile; fileRef = 9343A8BE1F66763A007213BD /* Time_Machine_No_Reverser.png */; };
9343A8C11F66763A007213BD /* Time_Machine_Reverser.png in Resources */ = {isa = PBXBuildFile; fileRef = 9343A8BF1F66763A007213BD /* Time_Machine_Reverser.png */; };
BC8DD6BA224E320200E05B26 /* PLScreenRecorderManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8DD6B9224E320200E05B26 /* PLScreenRecorderManager.m */; };
BCCF75E121C3884500BF9BA2 /* ImageVideoMixViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BCCF75DF21C3884500BF9BA2 /* ImageVideoMixViewController.m */; };
C35043641FB3152600F9633D /* draft_video.png in Resources */ = {isa = PBXBuildFile; fileRef = C35043631FB3121E00F9633D /* draft_video.png */; };
C35043971FBED6B900F9633D /* music_no_selected.png in Resources */ = {isa = PBXBuildFile; fileRef = C35043941FBED11C00F9633D /* music_no_selected.png */; };
Expand Down Expand Up @@ -488,6 +489,8 @@
85B60FAE619932ED649E6840 /* Pods-PLShortVideoKitDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PLShortVideoKitDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-PLShortVideoKitDemo/Pods-PLShortVideoKitDemo.release.xcconfig"; sourceTree = "<group>"; };
9343A8BE1F66763A007213BD /* Time_Machine_No_Reverser.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Time_Machine_No_Reverser.png; path = images/Time_Machine_No_Reverser.png; sourceTree = "<group>"; };
9343A8BF1F66763A007213BD /* Time_Machine_Reverser.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Time_Machine_Reverser.png; path = images/Time_Machine_Reverser.png; sourceTree = "<group>"; };
BC8DD6B8224E320200E05B26 /* PLScreenRecorderManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PLScreenRecorderManager.h; sourceTree = "<group>"; };
BC8DD6B9224E320200E05B26 /* PLScreenRecorderManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PLScreenRecorderManager.m; sourceTree = "<group>"; };
BCCF75DF21C3884500BF9BA2 /* ImageVideoMixViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageVideoMixViewController.m; sourceTree = "<group>"; };
BCCF75E021C3884500BF9BA2 /* ImageVideoMixViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageVideoMixViewController.h; sourceTree = "<group>"; };
C35043631FB3121E00F9633D /* draft_video.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = draft_video.png; path = images/draft_video.png; sourceTree = "<group>"; };
Expand Down Expand Up @@ -875,6 +878,8 @@
0A6340301F15E8CC005ADF6C /* PLSSelectionView.m */,
0A534EA8200E27F00032A981 /* PLSViewRecorderManager.h */,
0A534EAA200E27F10032A981 /* PLSViewRecorderManager.m */,
BC8DD6B8224E320200E05B26 /* PLScreenRecorderManager.h */,
BC8DD6B9224E320200E05B26 /* PLScreenRecorderManager.m */,
);
path = "UI+Tools";
sourceTree = "<group>";
Expand Down Expand Up @@ -1236,6 +1241,7 @@
0AD98DC4203173F5006551EC /* H265MovieViewController.m in Sources */,
760AE4F820B014FD00DA4EC3 /* VideoSelectViewController.m in Sources */,
760F7706202AF92A0052F513 /* BaseViewController.m in Sources */,
BC8DD6BA224E320200E05B26 /* PLScreenRecorderManager.m in Sources */,
0A398F6C1ED6259000996229 /* PhotoAlbumViewController.m in Sources */,
0AE8AC951F063E3E006166E2 /* PLSClipAudioView.m in Sources */,
C39EA3D71F4E753D0007D1C3 /* PLSRateButtonView.m in Sources */,
Expand Down
19 changes: 15 additions & 4 deletions Example/PLShortVideoKitDemo/EditViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,9 @@ - (void)addMVLayerWithColor:(NSURL *)colorURL alpha:(NSURL *)alphaURL {
}

[self.shortVideoEditor addMVLayerWithColor:self.colorURL alpha:self.alphaURL timeRange:kCMTimeRangeZero loopEnable:YES];
if (![self.shortVideoEditor isEditing]) {
[self.shortVideoEditor startEditing];
}
}

- (void)addFilter:(NSString *)colorImagePath {
Expand Down Expand Up @@ -2249,7 +2252,9 @@ - (void)nextButtonClick {
}

// 添加背景音乐信息
[self.audioSettingsArray insertObject:self.backgroundAudioSettings atIndex:0];
if (self.backgroundAudioSettings[PLSURLKey] && ![self.audioSettingsArray containsObject:self.backgroundAudioSettings]) {
[self.audioSettingsArray insertObject:self.backgroundAudioSettings atIndex:0];
}

AVAsset *asset = self.movieSettings[PLSAssetKey];
PLSAVAssetExportSession *exportSession = [[PLSAVAssetExportSession alloc] initWithAsset:asset];
Expand All @@ -2271,8 +2276,12 @@ - (void)nextButtonClick {

// 旋转视频
exportSession.videoLayerOrientation = self.videoLayerOrientation;
[exportSession addFilter:self.colorImagePath];
[exportSession addMVLayerWithColor:self.colorURL alpha:self.alphaURL timeRange:kCMTimeRangeZero loopEnable:YES];
if (self.colorImagePath) {
[exportSession addFilter:self.colorImagePath];
}
if (self.colorURL && self.alphaURL) {
[exportSession addMVLayerWithColor:self.colorURL alpha:self.alphaURL timeRange:kCMTimeRangeZero loopEnable:YES];
}

__weak typeof(self) weakSelf = self;
[exportSession setCompletionBlock:^(NSURL *url) {
Expand All @@ -2295,7 +2304,9 @@ - (void)nextButtonClick {
[exportSession setProcessingBlock:^(float progress) {
// 更新进度 UI
NSLog(@"Asset Export Progress: %f", progress);
weakSelf.progressLabel.text = [NSString stringWithFormat:@"%d%%", (int)(progress * 100)];
dispatch_async(dispatch_get_main_queue(), ^{
weakSelf.progressLabel.text = [NSString stringWithFormat:@"%d%%", (int)(progress * 100)];
});
}];

[exportSession exportAsynchronously];
Expand Down
4 changes: 2 additions & 2 deletions Example/PLShortVideoKitDemo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.16.1</string>
<string>2.0.0</string>
<key>CFBundleVersion</key>
<string>1.16.1.git-2019-01-28-eac39a6</string>
<string>2.0.0.git-2019-03-29-1d37a62</string>
<key>Fabric</key>
<dict>
<key>APIKey</key>
Expand Down
Binary file modified Example/PLShortVideoKitDemo/Librarys/libMuseProcessor.a
Binary file not shown.
Loading

0 comments on commit a8d34c1

Please sign in to comment.