| 
									
										
										
										
											2021-02-19 16:28:05 +01:00
										 |  |  | // | 
					
						
							|  |  |  | //  AVFrameRateRange+includes.swift | 
					
						
							| 
									
										
										
										
											2021-06-21 22:42:46 +02:00
										 |  |  | //  mrousavy | 
					
						
							| 
									
										
										
										
											2021-02-19 16:28:05 +01:00
										 |  |  | // | 
					
						
							|  |  |  | //  Created by Marc Rousavy on 15.01.21. | 
					
						
							| 
									
										
										
										
											2021-06-01 13:07:57 +02:00
										 |  |  | //  Copyright © 2021 mrousavy. All rights reserved. | 
					
						
							| 
									
										
										
										
											2021-02-19 16:28:05 +01:00
										 |  |  | // | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import AVFoundation | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | extension AVFrameRateRange { | 
					
						
							| 
									
										
										
										
											2021-03-11 19:47:51 +01:00
										 |  |  |   /**
 | 
					
						
							|  |  |  |    * Returns true if this [AVFrameRateRange] contains the given [fps] | 
					
						
							|  |  |  |    */ | 
					
						
							| 
									
										
										
										
											2021-02-19 16:28:05 +01:00
										 |  |  |   func includes(fps: Double) -> Bool { | 
					
						
							|  |  |  |     return fps >= minFrameRate && fps <= maxFrameRate | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } |