Example #1
0
 def __init__(self, instance, factory, stream_):
     if stream_.dar and stream_.par:
         self.aspect = float(stream_.dar)
     rate = stream_.framerate
     RandomAccessPreviewer.__init__(self, instance, factory, stream_)
     self.tstep = Zoomable.pixelToNsAt(self.twidth, Zoomable.max_zoom)
     if rate.num:
         frame_duration = (gst.SECOND * rate.denom) / rate.num
         self.tstep = max(frame_duration, self.tstep)
Example #2
0
 def __init__(self, instance, factory, stream_):
     if stream_.dar and stream_.par:
         self.aspect = float(stream_.dar)
     rate = stream_.framerate
     RandomAccessPreviewer.__init__(self, instance, factory, stream_)
     self.tstep = Zoomable.pixelToNsAt(self.twidth, Zoomable.max_zoom)
     if rate.num:
         frame_duration = (gst.SECOND * rate.denom) / rate.num
         self.tstep = max(frame_duration, self.tstep)