This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
| <title>I AM REAL</title> | |
| </head> | |
| <body> | |
| <script> | |
| function ready(fn) { |
This file contains hidden or 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
| if mediaType == AVMediaTypeVideo, let assetWriterAndInputs = self.newAssetWriterAndInputs { | |
| let sourceTime = CMSampleBufferGetPresentationTimeStamp(sampleBuffer) | |
| assetWriterAndInputs.assetWriter.startSessionAtSourceTime(sourceTime) | |
| self.currentAssetWriterAndInputs = assetWriterAndInputs | |
| self.newAssetWriterAndInputs = nil | |
| } |
This file contains hidden or 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
| func timerTick () { | |
| if let newAssetWriter = self.createAssetWriterAndInputs() { | |
| dispatch_async(_writingQueue) { | |
| self.newAssetWriterAndInputs = newAssetWriter; | |
| } | |
| } | |
| } |
This file contains hidden or 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
| let sourceTime = CMSampleBufferGetPresentationTimeStamp(sampleBuffer) | |
| assetWriter.startSessionAtSourceTime(sourceTime) |
This file contains hidden or 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
| func timerTick () { | |
| if let newAssetWriter = self.createAssetWriterAndInputs() { | |
| dispatch_async(_writingQueue) { | |
| self.currentAssetWriterAndInputs = newAssetWriter | |
| } | |
| } | |
| } |