AXptz
ax_ptz_control_queue.h File Reference

The PTZ control queue and its functions. More...

Go to the source code of this file.

Typedefs

typedef struct _AXPTZControlQueueGroup AXPTZControlQueueGroup
 An opaque structure for a group in the PTZ control queue.
 

Enumerations

enum  AXPTZControlQueueRequest { AX_PTZ_CONTROL_QUEUE_GET, AX_PTZ_CONTROL_QUEUE_QUERY_STATUS, AX_PTZ_CONTROL_QUEUE_DROP, AX_PTZ_CONTROL_QUEUE_GET_TAKE_EQUAL_PRIORITY }
 

Functions

gboolean ax_ptz_control_queue_request (const AXPTZControlQueueGroup *group, gint video_channel, AXPTZControlQueueRequest request, gint *queue_pos, gint *time_to_pos_one, gint *poll_time, GError **error)
 Sends a request to the control queue. Possible requests are: AX_PTZ_CONTROL_QUEUE_GET, AX_PTZ_CONTROL_QUEUE_QUERY_STATUS, AX_PTZ_CONTROL_QUEUE_DROP, AX_PTZ_CONTROL_QUEUE_GET_TAKE_EQUAL_PRIORITY. More...
 
AXPTZControlQueueGroupax_ptz_control_queue_get_app_group_instance (GError **error)
 Gets the application group instance from the PTZ control queue. More...
 

Detailed Description

The PTZ control queue and its functions.

Control queue

AXPTZControlQueue and its member AXPTZControlQueueGroup are created when the AXPTZ library is initialized.

AXPTZControlQueueGroup creates a queue group with the same name as the application and is added to the list of PTZ control queue groups in the Axis product. AXPTZControlQueueGroup must be used as input parameter when calling the absolute, relative and continuous movement functions in AXPTZMovementHandler and all preset functions in AXPTZPresetHandler.

AXPTZControlQueue contains functions for interacting with the PTZ control queue. It is possible to request PTZ control (enter the control queue), to drop PTZ control (leave the queue) and to query the control queue for the application's current position. If the PTZ control queue is enabled in the Axis product, the application must get PTZ control (that is, first position in the queue), before calling any of the movement and preset functions that have AXPTZControlQueueGroup as input parameter.

Enumeration Type Documentation

◆ AXPTZControlQueueRequest

Available requests to the PTZ control queue.

Enumerator
AX_PTZ_CONTROL_QUEUE_GET 

Request PTZ control. The application will be placed in the PTZ control queue.

AX_PTZ_CONTROL_QUEUE_QUERY_STATUS 

Query the queue for the application's current PTZ control status.

AX_PTZ_CONTROL_QUEUE_DROP 

Drop PTZ control or leave the queue.

AX_PTZ_CONTROL_QUEUE_GET_TAKE_EQUAL_PRIORITY 

Request PTZ control. The application will be placed in the queue and will take over PTZ control from clients with the same or lower priority.

Function Documentation

◆ ax_ptz_control_queue_request()

gboolean ax_ptz_control_queue_request ( const AXPTZControlQueueGroup group,
gint  video_channel,
AXPTZControlQueueRequest  request,
gint *  queue_pos,
gint *  time_to_pos_one,
gint *  poll_time,
GError **  error 
)

Sends a request to the control queue. Possible requests are: AX_PTZ_CONTROL_QUEUE_GET, AX_PTZ_CONTROL_QUEUE_QUERY_STATUS, AX_PTZ_CONTROL_QUEUE_DROP, AX_PTZ_CONTROL_QUEUE_GET_TAKE_EQUAL_PRIORITY.

Parameters
groupA group in the PTZ control queue.
video_channelA video channel. Starts from video channel 1.
requestType of PTZ control queue request: get, drop or query.
queue_posReturns the current position in the PTZ control queue.
time_to_pos_oneReturns the estimated time left to enter the first position in the queue.
poll_timeReturns the recommended poll time in seconds. To keep its position in the queue, the application must send a new query request within the poll time.
errorReturn location for a GError or NULL.
Returns
TRUE on success, FALSE on failure.
Examples:
axptzexample.c.

◆ ax_ptz_control_queue_get_app_group_instance()

AXPTZControlQueueGroup* ax_ptz_control_queue_get_app_group_instance ( GError **  error)

Gets the application group instance from the PTZ control queue.

Parameters
errorReturn location for a GError or NULL.
Returns
The application group instance on success, NULL on failure.
Examples:
axptzexample.c.