actfw_gstreamer package

Submodules

actfw_gstreamer.capture module

class actfw_gstreamer.capture.GstreamerCapture(builder: actfw_gstreamer.gstreamer.stream.GstStreamBuilder, restart_handler: actfw_gstreamer.restart_handler.RestartHandlerBase)

Bases: actfw_core.task.producer.Producer[PIL.Image.Image]

Captured Frame Producer using GStreamer.

Genrates Frame`s of given `GonverterBase::ConvertResult, where ConverterBase is in builder.

Parameters
  • builder (-) – GstStreamBuilder

  • restart_handler (-) – RestartHandlerBase

run()None

Run and start the activity

actfw_gstreamer.restart_handler module

class actfw_gstreamer.restart_handler.Restart

Bases: object

class actfw_gstreamer.restart_handler.RestartHandlerBase

Bases: abc.ABC

abstract connection_lost(err: actfw_gstreamer.gstreamer.exception.ConnectionLostError)Union[actfw_gstreamer.restart_handler.Stop, actfw_gstreamer.restart_handler.Restart]

Called from run when got ConnectionLostError.

abstract connection_lost_secs_threshold()Optional[float]

run waits a new frame this seconds. If cannot get no frames more than this seconds, raise ConnectionLostError.

abstract pipeline_build_error(err: actfw_gstreamer.gstreamer.exception.PipelineBuildError)Union[actfw_gstreamer.restart_handler.Stop, actfw_gstreamer.restart_handler.Restart]

Called from run when got PipelineBuildError.

class actfw_gstreamer.restart_handler.SimpleRestartHandler(connection_lost_secs_threshold: int, error_count_threshould: int)

Bases: actfw_gstreamer.restart_handler.RestartHandlerBase

connection_lost(err: actfw_gstreamer.gstreamer.exception.ConnectionLostError)Union[actfw_gstreamer.restart_handler.Stop, actfw_gstreamer.restart_handler.Restart]

Called from run when got ConnectionLostError.

connection_lost_secs_threshold()Optional[float]

run waits a new frame this seconds. If cannot get no frames more than this seconds, raise ConnectionLostError.

pipeline_build_error(err: actfw_gstreamer.gstreamer.exception.PipelineBuildError)Union[actfw_gstreamer.restart_handler.Stop, actfw_gstreamer.restart_handler.Restart]

Called from run when got PipelineBuildError.

class actfw_gstreamer.restart_handler.Stop

Bases: object

actfw_gstreamer.util module

Module contents