Package pyvision :: Package beta :: Module vtm :: Class VideoTask
[hide private]
[frames] | no frames]

Class VideoTask

source code

object --+
         |
        VideoTask
Known Subclasses:

This provides an interface and support functions for a video processing task. Typically a subclass will overide the constructor which will be used as a task factory and will create the task and specify the arguments.

Instance Methods [hide private]
 
__init__(self, frame_id, args=[])
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
addData(self, data_item)
Check to see if the data item is needed for this task.
source code
 
ready(self)
Returns True if this task is ready to run.
source code
 
couldRun(self)
Returns True if this task could run with the default arguments.
source code
 
run(self) source code
 
getFrameId(self)
Returns: the frame_id associated with this task.
source code
 
required(self)
Returns: the list of required data.
source code
 
execute(self, *args, **kwargs)
This is an abstract method that needs to be implemented in subclasses.
source code
 
printInfo(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, frame_id, args=[])
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • frame_id - the frame_id associated with this task.
  • args - specification of the data that is required to execute the task.
Overrides: object.__init__

addData(self, data_item)

source code 

Check to see if the data item is needed for this task. If it is then keep a reference.

getFrameId(self)

source code 
Returns:
the frame_id associated with this task.

required(self)

source code 
Returns:
the list of required data.

execute(self, *args, **kwargs)

source code 

This is an abstract method that needs to be implemented in subclasses. One argument is suppled for each item in the required arguments. This method should return a list of new data items. If no data is generated by this method an empty list should be returned.