Example #1
0
 def stopRecording(self):
     """
     Stop recording of the content. Also send 'stopRecording' to every
     outlet that conforms to IKNRecorder.
     """
     self.log.info('Stopping recording')
     for outlet in self.outlets:
         if IKNRecorder.implementedBy(outlet.__class__):
             if outlet.recording:
                 outlet.stopRecording()
Example #2
0
 def startRecording(self, autoStop=None):
     """
     Send 'startRecording' message to every outlet that conforms to 
     IKNRecorder. IKNRecorder implementations make streams persistent.
     Keyword Arguments:
     autoStop: Automatically stop this recording in x seconds
     """
     self.log.info('Starting recording')
     for outlet in self.outlets:
         if IKNRecorder.implementedBy(outlet.__class__):
             if not outlet.recording:
                 outlet.startRecording()
             else:
                 outlet.log.warning('Already recording. Can not start again.')
         if autoStop:
             reactor.callLater(autoStop,outlet.stopRecording)