mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	* recordings data pub/sub * function to process recording stream frames * model runner * lpr model runner * refactor to mixin class and use model runner * separate out realtime and post processors * move model and mixin folders * basic postprocessor * clean up * docs * postprocessing logic * clean up * return none if recordings are disabled * run postprocessor handle_requests too * tweak expansion * add put endpoint * postprocessor tweaks with endpoint
		
			
				
	
	
		
			37 lines
		
	
	
		
			875 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			875 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| """Facilitates communication between processes."""
 | |
| 
 | |
| import logging
 | |
| from enum import Enum
 | |
| 
 | |
| from .zmq_proxy import Publisher, Subscriber
 | |
| 
 | |
| logger = logging.getLogger(__name__)
 | |
| 
 | |
| 
 | |
| class RecordingsDataTypeEnum(str, Enum):
 | |
|     all = ""
 | |
|     recordings_available_through = "recordings_available_through"
 | |
| 
 | |
| 
 | |
| class RecordingsDataPublisher(Publisher):
 | |
|     """Publishes latest recording data."""
 | |
| 
 | |
|     topic_base = "recordings/"
 | |
| 
 | |
|     def __init__(self, topic: RecordingsDataTypeEnum) -> None:
 | |
|         topic = topic.value
 | |
|         super().__init__(topic)
 | |
| 
 | |
|     def publish(self, payload: tuple[str, float]) -> None:
 | |
|         super().publish(payload)
 | |
| 
 | |
| 
 | |
| class RecordingsDataSubscriber(Subscriber):
 | |
|     """Receives latest recording data."""
 | |
| 
 | |
|     topic_base = "recordings/"
 | |
| 
 | |
|     def __init__(self, topic: RecordingsDataTypeEnum) -> None:
 | |
|         topic = topic.value
 | |
|         super().__init__(topic)
 |