去掉无效注释代码

This commit is contained in:
bluesea 2024-04-30 15:25:25 +08:00
parent 49e8adc353
commit 2148dcb241
2 changed files with 20 additions and 19 deletions

View File

@ -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)
}

View File

@ -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))")
}
else{
print("audio 追加成功....")
}
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...")
// }
}
print("audio func 执行完毕。。。。...")
// print("audio func ...")
}
func add(image: CIImage, presentationTime: CMTime) -> Bool {