ptz package
Subpackages
Submodules
ptz.main module
main
- ptz.main.main()
main application
- ptz.main.parse_args()
Parse arguments
ptz.media module
Media Class
- class ptz.media.Media(description: str, retry: bool = True, retry_delay: int = 5)
Bases:
object
Media Class, sets a Gstreamer pipeline, change its status, updates and gets the properties of the element specified
- get_property(element_name, property_name)
Gets the value of an elements property in the pipeline
- Parameters:
element_name (str) – Pipeline element to get the property from
property_name (str) – Property in the pipeline element to get the value from
- Returns:
property; the value of the elements property asked for, None if the element doesn’t exist in the pipeline.
- Return type:
property, Noner
- play()
Plays (change the state) of the parsed pipeline :returns: True is stop is successful, False if not :rtype: True or Flase
- set_property(element_name, property_name, value)
Set the ‘property_name’ in the pipeline ‘element_name’ to the specified ‘value’
- Parameters:
element_name (str) – Pipeline element to be changed
property_name (str) – Property in the pipeline element to be changed
value (str or float) – Value to be set in the property that belongs to the element in the pipeline
- Returns:
True if the pipeline element actually is in the pipeline. False if doesn’t.
- Return type:
True, Flase
- stop()
Stops (change the state) the pipeline played before :returns: True is stop is successful, False if not :rtype: True or Flase
ptz.ptz module
Class PTZ
- class ptz.ptz.PTZ(vst_uri='http://127.0.0.1:81', window_size: int = 500)
Bases:
object
Class PTZ, defines the functions of pan, tilt, and zoom.
- get_position()
Get the position (pan and tilt) in the rrpanorama ptz pipeline element
- Returns:
json -> contanis the obtained pan and tilt values, None if the element doesn’t exist in the pipeline.
- Return type:
json, None
- get_stream()
Get the in_stream, the out_port and the out_mapping in the pipeline
- Returns:
json -> contanis the obtained pan and tilt values, None if the element doesn’t exist in the pipeline.
- Return type:
json, None
- get_zoom()
Get the Zomm in the rrpanorama ptz pipeline element
- Returns:
json -> contanis the obtained pan and tilt values, None if the element doesn’t exist in the pipeline
- Return type:
json, None
- set_position(position: rrmsutils.models.ptz.position.Position)
Set the position (pan and tilt) in the rrpanorama ptz pipeline element
- Parameters:
position (Position) – a json file that contains the pan and tilt values to set in the pipeline element
- Returns:
True if the position is successfully set, False if the element doesn’t exist in the pipeline
- Return type:
True or False
- set_stream(stream: rrmsutils.models.ptz.stream.Stream)
Set the in_stream, the out_port and the out_mapping in the pipeline
- Parameters:
stream (Stream) – a json file that contains the stream value to set in the pipeline element
- Returns:
json -> contanis the obtained pan and tilt values, False if the element doesn’t exist in the pipeline, or error if there is an exception.
- Return type:
json, False, or error
- set_zoom(zoom: rrmsutils.models.ptz.zoom.Zoom)
Set the zoom in the rrpanorama ptz pipeline element
- Parameters:
zoom (Zoom) – a json file that contains the zoom value to set in the pipeline element
- Returns:
True if the zoom is successfully set and False if the element doesn’t exist in the pipeline
- Return type:
True or False
ptz.server module
Server