-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VMVideoNAudioMerger: Add +mergeVideoNAudioFiles:atFolderPath:preferre…
…dResultName:completion:
- Loading branch information
Showing
8 changed files
with
407 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
PythonForVideoMemos/VMPython/Others/VMVideoNAudioMerger/VMMergingAssetTrackModel.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// VMMergingAssetTrackModel.h | ||
// PythonForVideoMemos-Demo | ||
// | ||
// Created by Kjuly on 18/7/2020. | ||
// Copyright © 2020 Kjuly. All rights reserved. | ||
// | ||
|
||
@import Foundation; | ||
@import AVFoundation; | ||
|
||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface VMMergingAssetTrackModel : NSObject | ||
|
||
@property (nonatomic, strong) AVURLAsset *asset; | ||
@property (nonatomic, assign) AVMediaType mediaType; | ||
@property (nonatomic, strong) AVAssetTrack *track; | ||
@property (nonatomic, assign) CMTime duration; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
13 changes: 13 additions & 0 deletions
13
PythonForVideoMemos/VMPython/Others/VMVideoNAudioMerger/VMMergingAssetTrackModel.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// VMMergingAssetTrackModel.m | ||
// PythonForVideoMemos-Demo | ||
// | ||
// Created by Kjuly on 18/7/2020. | ||
// Copyright © 2020 Kjuly. All rights reserved. | ||
// | ||
|
||
#import "VMMergingAssetTrackModel.h" | ||
|
||
@implementation VMMergingAssetTrackModel | ||
|
||
@end |
48 changes: 48 additions & 0 deletions
48
PythonForVideoMemos/VMPython/Others/VMVideoNAudioMerger/VMVideoNAudioMerger.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// | ||
// VMVideoNAudioMerger.h | ||
// PythonForVideoMemos-Demo | ||
// | ||
// Created by Kjuly on 17/7/2020. | ||
// Copyright © 2020 Kjuly. All rights reserved. | ||
// | ||
|
||
@import Foundation; | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
typedef void (^VMVideoNAudioMergerCompletion)(NSString *_Nullable mergedFilePath, NSString *_Nullable mergingErrorMessage); | ||
|
||
@interface VMVideoNAudioMerger : NSObject | ||
|
||
/** | ||
* Merge video & audio files | ||
* | ||
* @param identifier The unique filename, generally, same to VMPythonResourceDownloader's `preferredName`. | ||
* @param folderPath The path to folder that hosts video & audio files, and also, the merged file will be exporeted there. | ||
* @param completion The bloack to execute when completed. | ||
*/ | ||
//+ (void)mergeVideoNAudioFilesWithIdentifier:(NSString *)identifier | ||
// atFolderPath:(NSString *)folderPath | ||
// completion:(VMVideoNAudioMergerCompletion)completion; | ||
|
||
/** | ||
* Merge video & audio files | ||
* | ||
* @param filenames The video & audio filenames | ||
* @param folderPath The path to folder that hosts video & audio files, and also, the merged file will be exporeted there. | ||
* @param preferredResultName The preferred merging result filename | ||
* @param completion The bloack to execute when completed. | ||
*/ | ||
+ (void)mergeVideoNAudioFiles:(NSArray <NSString *> *)filenames | ||
atFolderPath:(NSString *)folderPath | ||
preferredResultName:(NSString *)preferredResultName | ||
completion:(VMVideoNAudioMergerCompletion)completion; | ||
|
||
//+ (void)mergeVideoFileAtPath:(NSString *)videoFilePath | ||
// withAudioFileAtPath:(NSString *)audioFilePath | ||
// intoResultPath:(NSString *)resultPath | ||
// completion:(VMVideoNAudioMergerCompletion)completion; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
Oops, something went wrong.