去掉无效注释代码
This commit is contained in:
parent
49e8adc353
commit
2148dcb241
@ -750,9 +750,9 @@ extension VRVideoTransformController {
|
||||
}
|
||||
}
|
||||
else {
|
||||
print(".....out pro:\(progress)")
|
||||
// print(".....out pro:\(progress)")
|
||||
DispatchQueue.main.async {
|
||||
print(".....in pro:\(progress)")
|
||||
// print(".....in pro:\(progress)")
|
||||
self?.progressView?.updateProgress(value: progress)
|
||||
}
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ class VideoWriter {
|
||||
var lastPresentationTime: CMTime?
|
||||
|
||||
init?(url: URL, width: Int, height: Int, orientation: CGAffineTransform, sessionStartTime: CMTime, isRealTime: Bool, queue: DispatchQueue) {
|
||||
print("VideoWriter init: width=\(width) height=\(height), url=\(url)")
|
||||
// print("VideoWriter init: width=\(width) height=\(height), url=\(url)")
|
||||
self.queue = queue
|
||||
let outputSettings: [String:Any] = [
|
||||
AVVideoCodecKey : AVVideoCodecType.h264, // or .hevc if you like
|
||||
@ -71,10 +71,10 @@ class VideoWriter {
|
||||
self.writerInput_Audio.expectsMediaDataInRealTime = false
|
||||
if writer.canAdd(self.writerInput_Audio) {
|
||||
writer.add(self.writerInput_Audio)
|
||||
print("writer 添加input audio成功...")
|
||||
// print("writer 添加input audio成功...")
|
||||
}
|
||||
else {
|
||||
print("writer 添加input audio失败...")
|
||||
// print("writer 添加input audio失败...")
|
||||
}
|
||||
|
||||
writer.add(input)
|
||||
@ -92,28 +92,29 @@ class VideoWriter {
|
||||
//追加音频
|
||||
func addAudio(assetTrackOutput:AVAssetReaderTrackOutput) {
|
||||
while let sample = assetTrackOutput.copyNextSampleBuffer() {
|
||||
print("audio read buffer....")
|
||||
// print("audio read buffer....")
|
||||
let formatDesc:CMFormatDescription = CMSampleBufferGetFormatDescription(sample)!
|
||||
let mediaType:CMMediaType = CMFormatDescriptionGetMediaType(formatDesc);
|
||||
if mediaType == kCMMediaType_Audio {
|
||||
if self.writerInput_Audio.isReadyForMoreMediaData {
|
||||
if self.writerInput_Audio.append(sample) == false {
|
||||
print("追加音频失败....:\(String(describing: self.writer.error?.localizedDescription))")
|
||||
self.writerInput_Audio.append(sample)
|
||||
// if self.writerInput_Audio.append(sample) == false {
|
||||
// print("追加音频失败....:\(String(describing: self.writer.error?.localizedDescription))")
|
||||
// }
|
||||
// else{
|
||||
// print("audio 追加成功....")
|
||||
// }
|
||||
}
|
||||
else{
|
||||
print("audio 追加成功....")
|
||||
}
|
||||
}
|
||||
else {
|
||||
print("audio 追加还未准备好...")
|
||||
// else {
|
||||
// print("audio 追加还未准备好...")
|
||||
|
||||
// }
|
||||
}
|
||||
// else {
|
||||
// print("不是audio类型...")
|
||||
// }
|
||||
}
|
||||
else {
|
||||
print("不是audio类型...")
|
||||
}
|
||||
}
|
||||
print("audio func 执行完毕。。。。...")
|
||||
// print("audio func 执行完毕。。。。...")
|
||||
}
|
||||
|
||||
func add(image: CIImage, presentationTime: CMTime) -> Bool {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user