| 
									
										
										
										
											2021-02-19 16:28:05 +01:00
										 |  |  | // | 
					
						
							|  |  |  | //  AVCapturePhotoOutput.QualityPrioritization+descriptor.swift | 
					
						
							| 
									
										
										
										
											2021-06-21 22:42:46 +02:00
										 |  |  | //  mrousavy | 
					
						
							| 
									
										
										
										
											2021-02-19 16:28:05 +01:00
										 |  |  | // | 
					
						
							|  |  |  | //  Created by Marc Rousavy on 15.12.20. | 
					
						
							| 
									
										
										
										
											2021-06-01 13:07:57 +02:00
										 |  |  | //  Copyright © 2020 mrousavy. All rights reserved. | 
					
						
							| 
									
										
										
										
											2021-02-19 16:28:05 +01:00
										 |  |  | // | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import AVFoundation | 
					
						
							|  |  |  | import Foundation | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @available(iOS 13.0, *) | 
					
						
							|  |  |  | extension AVCapturePhotoOutput.QualityPrioritization { | 
					
						
							|  |  |  |   init?(withString string: String) { | 
					
						
							|  |  |  |     switch string { | 
					
						
							|  |  |  |     case "speed": | 
					
						
							|  |  |  |       self = .speed | 
					
						
							|  |  |  |       return | 
					
						
							|  |  |  |     case "quality": | 
					
						
							|  |  |  |       self = .quality | 
					
						
							|  |  |  |       return | 
					
						
							|  |  |  |     case "balanced": | 
					
						
							|  |  |  |       self = .balanced | 
					
						
							|  |  |  |       return | 
					
						
							|  |  |  |     default: | 
					
						
							|  |  |  |       return nil | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } |