Created
November 17, 2020 08:47
-
-
Save thieso2/04ed801ba47fdd16049be4b4961cb498 to your computer and use it in GitHub Desktop.
CMTimeFlags.description
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
| import CoreMediaIO | |
| extension CMTimeFlags: CustomStringConvertible { | |
| public var description: String { | |
| let flags : [(CMTimeFlags, String)] = [ | |
| (.valid, "valid"), | |
| (.hasBeenRounded, "hasBeenRounded"), | |
| (.positiveInfinity, "positiveInfinity"), | |
| (.negativeInfinity, "negativeInfinity"), | |
| (.indefinite, "indefinite"), | |
| (.impliedValueFlagsMask, "impliedValueFlagsMask") | |
| ] | |
| return flags | |
| .compactMap { self.contains($0.0) ? $0.1 : nil } | |
| .joined(separator: ",") | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment