Skip to content

Commit

Permalink
Merge pull request #36 from anhaoxiong/master
Browse files Browse the repository at this point in the history
release v1.10.0
  • Loading branch information
lawder authored Mar 16, 2018
2 parents c719ea2 + 4d0ee20 commit 6decc6d
Show file tree
Hide file tree
Showing 194 changed files with 4,940 additions and 449 deletions.
38 changes: 38 additions & 0 deletions APIDiffs/api-diffs-1.10.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# PLShortVideoKit 1.9.0 to 1.10.0 API Differences

## General Headers

```
PLSUploaderConfiguration.h
```

- *Added* @property (nonatomic, strong) NSDictionary * _Nullable params;
- *Added* - (instancetype _Nullable)initWithToken:(NSString * _Nonnull)token videoKey:(NSString * _Nullable)videoKey https:(BOOL)https recorder:(NSString * _Nullable)recorder params:(NSDictionary * _Nullable)params;


```
Added Class PLSTextSetting
Added Class PLSImageSetting
Added Class PLSFadeTranstion
Added Class PLSScaleTransition
Added Class PLSRotateTransition
Added Class PLSPositionTransition
Added Class PLSTransitionMaker
Added Class PLSRangeMedia
Added Class PLSRangeMovieExport
Added Class PLSRangeMediaTools
```













124 changes: 120 additions & 4 deletions Example/PLShortVideoKitDemo.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion Example/PLShortVideoKitDemo/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
// TuSDK mark
#import <TuSDK/TuSDK.h>



// AR 特效的 key
NSString *easyAR3DKey = @"zYnUPaCAWtl4WDH3qLu290KRFA7gCCU2iyI9127chA6gvLQyr9CUlawIjMdC1OXxLwsUWvNN2zI2XIElU8AP2QitdZ4WFAfoA8DdJbos2FL4FnPKiSjX52Avh524oxXLF8iOuZXg4YFSQWgKrhkLsJs8K8NxsEdoWh2UCuRsONxjHAdDX0V871RQMydPAyFzx4L0fTUe";

Expand All @@ -26,7 +28,6 @@ @interface AppDelegate ()

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
Expand Down
2 changes: 1 addition & 1 deletion Example/PLShortVideoKitDemo/EditViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ - (void)setupTuSDKFilter {
// 传入图像的方向是否为原始朝向(相机采集的原始朝向),SDK 将依据该属性来调整人脸检测时图片的角度。如果没有对图片进行旋转,则为 YES
BOOL isOriginalOrientation = NO;
self.filterProcessor = [[TuSDKFilterProcessor alloc] initWithFormatType:kCVPixelFormatType_32BGRA isOriginalOrientation:isOriginalOrientation];
[self.filterProcessor setEnableLiveSticker:YES];
[self.filterProcessor setEnableLiveSticker:NO];
self.filterProcessor.delegate = self;

self.effectTools = [[SceneEffectTools alloc] init];
Expand Down
13 changes: 13 additions & 0 deletions Example/PLShortVideoKitDemo/H265MovieViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// H265MovieViewController.h
// PLShortVideoKitDemo
//
// Created by suntongmian on 2018/2/12.
// Copyright © 2018年 Pili Engineering, Qiniu Inc. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface H265MovieViewController : UITableViewController

@end
111 changes: 111 additions & 0 deletions Example/PLShortVideoKitDemo/H265MovieViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
//
// H265MovieViewController.m
// PLShortVideoKitDemo
//
// Created by suntongmian on 2018/2/12.
// Copyright © 2018年 Pili Engineering, Qiniu Inc. All rights reserved.
//

#import "H265MovieViewController.h"
#import "MovieTransCodeViewController.h"
#import "ClipMovieViewController.h"

#define PLS_RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1]

static NSString *reuseIdentifier = @"reuseIdentifier";

@interface H265MovieViewController () <UIAlertViewDelegate>
{
NSMutableArray *_h265VideoArray;
}

@end

@implementation H265MovieViewController

- (void)viewDidLoad {
[super viewDidLoad];

// Uncomment the following line to preserve selection between presentations.
// self.clearsSelectionOnViewWillAppear = NO;

// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;

UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithTitle:@"返回 " style:(UIBarButtonItemStylePlain) target:self action:@selector(clickBackItem:)];
self.navigationItem.leftBarButtonItem = backItem;

[self loadH265Videos];

[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:reuseIdentifier];
}

- (void)loadH265Videos {
NSString *subpath = @"h265_video";
_h265VideoArray = [[NSMutableArray alloc] init];

NSBundle *bundle = [NSBundle mainBundle];
[_h265VideoArray addObjectsFromArray:[bundle pathsForResourcesOfType:@"mp4" inDirectory:subpath]];
[_h265VideoArray addObjectsFromArray:[bundle pathsForResourcesOfType:@"mov" inDirectory:subpath]];
}

- (void)clickBackItem:(UIBarButtonItem *)item {
[self dismissViewControllerAnimated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return _h265VideoArray.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier forIndexPath:indexPath];
cell.textLabel.text = [_h265VideoArray[indexPath.row] lastPathComponent];

return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSString *h265VideoPath = _h265VideoArray[indexPath.row];

UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"提示" message:h265VideoPath delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"转码", nil];
alertView.tag = 10001;
[alertView show];
}

#pragma mark -
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if (10001 == alertView.tag) {
NSURL *url = [NSURL fileURLWithPath:alertView.message];

if (1 == buttonIndex) {
// 转码
MovieTransCodeViewController *transCodeViewController = [[MovieTransCodeViewController alloc] init];
transCodeViewController.url = url;
[self presentViewController:transCodeViewController animated:YES completion:nil];

}
}
}

#pragma mark -- 隐藏状态栏
- (BOOL)prefersStatusBarHidden {
return YES;
}

#pragma mark -- dealloc
- (void)dealloc {

}

@end
9 changes: 8 additions & 1 deletion Example/PLShortVideoKitDemo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.9.0</string>
<string>1.10.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>Fabric</key>
Expand Down Expand Up @@ -43,8 +43,15 @@
<string>CameraUsageDescription</string>
<key>NSMicrophoneUsageDescription</key>
<string>MicrophoneUsageDescription</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>PhotoLibraryAddUsageDescription</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>PhotoLibraryUsageDescription</string>
<key>UIAppFonts</key>
<array>
<string>zcool-gdh.ttf</string>
<string>HappyZcool-2016.ttf</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
Expand Down
Loading

0 comments on commit 6decc6d

Please sign in to comment.