![]() |
AXptz
|
The preset handler and its functions. More...
Go to the source code of this file.
Enumerations | |
enum | AXPTZPresetMovementSpace { AX_PTZ_PRESET_MOVEMENT_UNITLESS, AX_PTZ_PRESET_MOVEMENT_NUM_SPACES } |
Functions | |
gboolean | ax_ptz_preset_handler_create_preset_name (const AXPTZControlQueueGroup *group, gint video_channel, const gchar *preset_name, gint *preset_number, GError **error) |
Creates a PTZ preset with the specified preset_name . The preset number is returned. More... | |
gboolean | ax_ptz_preset_handler_remove_preset_number (const AXPTZControlQueueGroup *group, gint video_channel, gint preset_number, GError **error) |
Removes the PTZ preset with the specified preset_number . More... | |
gboolean | ax_ptz_preset_handler_remove_preset_name (const AXPTZControlQueueGroup *group, gint video_channel, const gchar *preset_name, GError **error) |
Removes the PTZ preset with the specified preset_name . More... | |
gboolean | ax_ptz_preset_handler_set_preset_number (const AXPTZControlQueueGroup *group, gint video_channel, gint preset_number, gboolean home, GError **error) |
Sets the current PTZ position as a preset with the specified preset_number . More... | |
gboolean | ax_ptz_preset_handler_set_preset_name (const AXPTZControlQueueGroup *group, gint video_channel, const gchar *preset_name, gboolean home, GError **error) |
Sets the current PTZ position as a preset with the specified preset_name . More... | |
gboolean | ax_ptz_preset_handler_goto_preset_number (const AXPTZControlQueueGroup *group, gint video_channel, gint preset_number, fixed_t speed, AXPTZPresetMovementSpace movement_space, AXPTZInvoke invoke, void *callback_func, void *user_data, GError **error) |
Go to the PTZ preset with the specified preset_number . More... | |
gboolean | ax_ptz_preset_handler_goto_preset_name (const AXPTZControlQueueGroup *group, gint video_channel, const gchar *preset_name, fixed_t speed, AXPTZPresetMovementSpace movement_space, AXPTZInvoke invoke, void *callback_func, void *user_data, GError **error) |
Go to the PTZ preset with the specified preset_name . More... | |
gboolean | ax_ptz_preset_handler_goto_home (const AXPTZControlQueueGroup *group, gint video_channel, fixed_t speed, AXPTZPresetMovementSpace movement_space, AXPTZInvoke invoke, void *callback_func, void *user_data, GError **error) |
Go to the PTZ preset which is set as home. More... | |
GList * | ax_ptz_preset_handler_query_presets (const AXPTZControlQueueGroup *group, gint video_channel, gboolean position_info, GError **error) |
Gets a list with the names of the PTZ presets. More... | |
The preset handler and its functions.
The preset handler AXPTZPresetHandler
is used to create, set and remove PTZ presets. Presets can also be listed and the camera view can be moved to one of the presets.
The goto functions have movement_space
as one of the input parameters. This is the unit space to use when moving to a preset position. Available space types and spaces are:
AXPTZPresetMovementSpace
for the speed of the preset movement.AX_PTZ_PRESET_MOVEMENT_UNITLESS
In this space, unitless speed is used.Here, unitless means a normalized range from 0 to 1.
gboolean ax_ptz_preset_handler_create_preset_name | ( | const AXPTZControlQueueGroup * | group, |
gint | video_channel, | ||
const gchar * | preset_name, | ||
gint * | preset_number, | ||
GError ** | error | ||
) |
Creates a PTZ preset with the specified preset_name
. The preset number is returned.
group | A group in the PTZ control queue. |
video_channel | A video channel. Starts from video channel 1. |
preset_name | The preset name. |
preset_number | Returns the preset number. |
error | Return location for a GError or NULL . |
TRUE
on success, FALSE
on failure. gboolean ax_ptz_preset_handler_remove_preset_number | ( | const AXPTZControlQueueGroup * | group, |
gint | video_channel, | ||
gint | preset_number, | ||
GError ** | error | ||
) |
Removes the PTZ preset with the specified preset_number
.
group | A group in the PTZ control queue. |
video_channel | A video channel. Starts from video channel 1. |
preset_number | The preset number. |
error | Return location for a GError or NULL . |
TRUE
on success, FALSE
on failure. gboolean ax_ptz_preset_handler_remove_preset_name | ( | const AXPTZControlQueueGroup * | group, |
gint | video_channel, | ||
const gchar * | preset_name, | ||
GError ** | error | ||
) |
Removes the PTZ preset with the specified preset_name
.
group | A group in the PTZ control queue. |
video_channel | A video channel. Starts from video channel 1. |
preset_name | The preset name. |
error | Return location for a GError or NULL . |
TRUE
on success, FALSE
on failure. gboolean ax_ptz_preset_handler_set_preset_number | ( | const AXPTZControlQueueGroup * | group, |
gint | video_channel, | ||
gint | preset_number, | ||
gboolean | home, | ||
GError ** | error | ||
) |
Sets the current PTZ position as a preset with the specified preset_number
.
group | A group in the PTZ control queue. |
video_channel | A video channel. Starts from video channel 1. |
preset_number | The preset number. |
home | Set the preset as home. |
error | Return location for a GError or NULL . |
TRUE
on success, FALSE
on failure. gboolean ax_ptz_preset_handler_set_preset_name | ( | const AXPTZControlQueueGroup * | group, |
gint | video_channel, | ||
const gchar * | preset_name, | ||
gboolean | home, | ||
GError ** | error | ||
) |
Sets the current PTZ position as a preset with the specified preset_name
.
group | A group in the PTZ control queue. |
video_channel | A video channel. Starts from video channel 1. |
preset_name | The preset name. |
home | Set the preset as home. |
error | Return location for a GError or NULL . |
TRUE
on success, FALSE
on failure. gboolean ax_ptz_preset_handler_goto_preset_number | ( | const AXPTZControlQueueGroup * | group, |
gint | video_channel, | ||
gint | preset_number, | ||
fixed_t | speed, | ||
AXPTZPresetMovementSpace | movement_space, | ||
AXPTZInvoke | invoke, | ||
void * | callback_func, | ||
void * | user_data, | ||
GError ** | error | ||
) |
Go to the PTZ preset with the specified preset_number
.
group | A group in the PTZ control queue. |
video_channel | A video channel. Starts from video channel 1. |
preset_number | The preset number. |
speed | The speed of the movement. |
movement_space | The space for the preset movement. Supported: AX_PTZ_PRESET_MOVEMENT_UNITLESS . |
invoke | The invoke type. Supported: ACAP_PTZ_INVOKE_ASYNC . |
callback_func | Future use. Must be set to NULL . |
user_data | Future use. Must be set to NULL . |
error | Return location for a GError or NULL . |
TRUE
if the movement command was successfully sent to the underlying PTZ framework, FALSE
on failure. gboolean ax_ptz_preset_handler_goto_preset_name | ( | const AXPTZControlQueueGroup * | group, |
gint | video_channel, | ||
const gchar * | preset_name, | ||
fixed_t | speed, | ||
AXPTZPresetMovementSpace | movement_space, | ||
AXPTZInvoke | invoke, | ||
void * | callback_func, | ||
void * | user_data, | ||
GError ** | error | ||
) |
Go to the PTZ preset with the specified preset_name
.
group | A group in the PTZ control queue. |
video_channel | A video channel. Starts from video channel 1. |
preset_name | The preset name. |
speed | The speed of the movement. |
movement_space | The space for the preset movement. Supported: AX_PTZ_PRESET_MOVEMENT_UNITLESS . |
invoke | The invoke type. Supported: ACAP_PTZ_INVOKE_ASYNC . |
callback_func | Future use. Must be set to NULL . |
user_data | Future use. Must be set to NULL . |
error | Return location for a GError or NULL . |
TRUE
if the movement command was successfully sent to the underlying PTZ framework, FALSE
on failure. gboolean ax_ptz_preset_handler_goto_home | ( | const AXPTZControlQueueGroup * | group, |
gint | video_channel, | ||
fixed_t | speed, | ||
AXPTZPresetMovementSpace | movement_space, | ||
AXPTZInvoke | invoke, | ||
void * | callback_func, | ||
void * | user_data, | ||
GError ** | error | ||
) |
Go to the PTZ preset which is set as home.
group | A group in the PTZ control queue. |
video_channel | A video channel. Starts from video channel 1. |
speed | The speed of the movement. |
movement_space | The space for the preset movement. Supported: AX_PTZ_PRESET_MOVEMENT_UNITLESS . |
invoke | The invoke type. Supported: ACAP_PTZ_INVOKE_ASYNC . |
callback_func | Future use. Must be set to NULL . |
user_data | Future use. Must be set to NULL . |
error | Return location for a GError or NULL . |
TRUE
if the movement command was successfully sent to the underlying PTZ framework, FALSE
on failure. GList* ax_ptz_preset_handler_query_presets | ( | const AXPTZControlQueueGroup * | group, |
gint | video_channel, | ||
gboolean | position_info, | ||
GError ** | error | ||
) |
Gets a list with the names of the PTZ presets.
group | A group in the PTZ control queue. |
video_channel | A video channel. Starts from video channel 1. |
position_info | Append position information (pan, tilt, zoom, focus and iris) to each element in the returned presets list. |
error | Return location for a GError or NULL . |
GList
of allocated strings with the names of the presets on success, NULL
on failure. Destroy it by using g_free on the elements and g_list_free on the list.