telemetry.internal.image_processing.fake_frame_generator
index
telemetry/internal/image_processing/fake_frame_generator.py

# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

 
Modules
       
telemetry.internal.util.external_modules
telemetry.internal.image_processing.frame_generator
numpy

 
Classes
       
telemetry.internal.image_processing.frame_generator.FrameGenerator(__builtin__.object)
FakeFrameGenerator

 
class FakeFrameGenerator(telemetry.internal.image_processing.frame_generator.FrameGenerator)
    Fakes a Frame Generator, for testing.
 
Attributes:
  _frame_index: A frame read counter.
  _timestamps: A generator of timestamps to return, or None.
  _timestamp: The current timestamp.
  _dimensions: The dimensions to return.
  _channels: The number of color channels to return in the generated frames.
  _frames: The number of frames to return before fake EOF.
 
 
Method resolution order:
FakeFrameGenerator
telemetry.internal.image_processing.frame_generator.FrameGenerator
__builtin__.object

Methods defined here:
__init__(self, frames=1e+16, dimensions=(320, 240), channels=3, timestamps=<generator object <genexpr>>)
Initializes the FakeFrameGenerator object.
 
Args:
  frames: int, The number of frames to return before fake EOF.
  dimensions: (int, int), The dimensions to return.
  timestamps: generator, A generator of timestamps to return. The default
      value is an infinite 0 generator.
  channels: int, The number of color channels to return in the generated
      frames, 1 for greyscale, 3 for RGB.

Data descriptors defined here:
CurrentFrameNumber
CurrentTimestamp
Dimensions

Data and other attributes defined here:
__abstractmethods__ = frozenset([])

Data descriptors inherited from telemetry.internal.image_processing.frame_generator.FrameGenerator:
Generator
Returns:
A reference to the created generator.
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from telemetry.internal.image_processing.frame_generator.FrameGenerator:
__metaclass__ = <class 'abc.ABCMeta'>
Metaclass for defining Abstract Base Classes (ABCs).
 
Use this metaclass to create an ABC.  An ABC can be subclassed
directly, and then acts as a mix-in class.  You can also register
unrelated concrete classes (even built-in classes) and unrelated
ABCs as 'virtual subclasses' -- these and their descendants will
be considered subclasses of the registering ABC by the built-in
issubclass() function, but the registering ABC won't show up in
their MRO (Method Resolution Order) nor will method
implementations defined by the registering ABC be callable (not
even via super()).