|
libvdo
|
A class representing a channel. More...

Go to the source code of this file.
Functions | |
| VdoChannel * | vdo_channel_get (guint channel_nbr, GError **error) |
| Get an existing channel. More... | |
| GList * | vdo_channel_get_all (GError **error) |
| Gets all existing channels. More... | |
| GList * | vdo_channel_get_filtered (VdoMap *filter, GError **error) |
| Gets all existing channels matching a filter. More... | |
| VdoMap * | vdo_channel_get_info (VdoChannel *self, GError **error) |
| Get the info for this channel. More... | |
| VdoMap * | vdo_channel_get_settings (VdoChannel *self, GError **error) |
| Get the settings for this channel. More... | |
| gboolean | vdo_channel_set_settings (VdoChannel *self, VdoMap *settings, GError **error) |
| Update the settings for this channel. More... | |
| VdoMap * | vdo_channel_get_stream_profile (VdoChannel *self, const gchar *profile, VdoFormat format, GError **error) |
| Query stream profile for the specified name, format and channel. More... | |
| VdoResolutionSet * | vdo_channel_get_resolutions (VdoChannel *self, VdoMap *filter, GError **error) |
| Fetch all valid resolutions for a channel with specified stream format. More... | |
| guint | vdo_channel_get_id (VdoChannel *self) |
| gboolean | vdo_channel_set_framerate (VdoChannel *self, gdouble framerate, GError **error) |
| Update the framerate for the specified channel. More... | |
A class representing a channel.
A VdoChannel object is created in order to retrieve or control a video channel from the Vdo video service.
A VdoChannel represents the video from one sensor, or several sensors combined into a composite view. Every vdo stream has a channel as its source.
A VdoChannel supports the following generic settings. Settings are accessed by calling vdo_channel_get_settings() and vdo_channel_set_settings().
Crop Settings
| Name | Type | Description |
|---|---|---|
| "crop.max_width" | uint32 | The width of the buffer we crop from, (crop.x + crop.width must be less than this) |
| "crop.max_height" | uint32 | The height of the buffer we crop from, (crop.y + crop.height must be less than this) |
| "crop.x" | uint32 | The x position of the crop |
| "crop.y" | uint32 | The y position of the crop |
| "crop.width" | uint32 | The width of the crop |
| "crop.height" | uint32 | The height of the crop |
User video settings
| Name | Type | Description |
|---|---|---|
| "yuv.input.path" | string | Path to user video input file |
A VdoChannel provides the following info. Info is obtained by calling vdo_channel_get_info().
| Name | Type | Description |
|---|---|---|
| "mirror.possible" | boolean | Whether mirroring is possible on this channel |
| "crop.possible" | boolean | Whether crop is possible on this channel |
| "dptz.possible" | boolean | Whether dptz is possible on this channel |
| "available_rotations" | string | Available rotations for this channel |
Copyright (C) 2016-2018, Axis Communications AB, Lund
| VdoChannel* vdo_channel_get | ( | guint | channel_nbr, |
| GError ** | error | ||
| ) |
Get an existing channel.
Create a new VdoChannel object representing an existing channel session with the specified channel number.
| channel_nbr | A channel number |
| error | A location to return an error. |
NULL on error. Free with g_object_unref(). | GList* vdo_channel_get_all | ( | GError ** | error | ) |
Gets all existing channels.
Create new VdoChannel objects representing each existing channel and return those in a GList.
| error | A location to return an error. |
GList containing VdoStream objects or NULL on error. Free with g_list_free_full(list, g_object_unref). | GList* vdo_channel_get_filtered | ( | VdoMap * | filter, |
| GError ** | error | ||
| ) |
Gets all existing channels matching a filter.
Create new VdoChannel objects representing existing channels matching a filter and return those in a GList.
| filter | A VdoMap specifying filter or NULL for all channels. |
| error | A location to return an error. |
GList containing VdoStream objects or NULL on error. Free with g_list_free_full(list, g_object_unref). | guint vdo_channel_get_id | ( | VdoChannel * | self | ) |
vdo_channel_get_id: : The VdoChannel object to get id of
Returns: The id of the channel
| VdoMap* vdo_channel_get_info | ( | VdoChannel * | self, |
| GError ** | error | ||
| ) |
Get the info for this channel.
This function is called in order to get a pointer to the info map for this channel. The returned pointer is a pointer to a newly allocated VdoMap owned by the caller of this function. For example:
| self | A VdoChannel. |
| error | A location to return an error. |
NULL if error is set. Free with g_object_unref(). | VdoResolutionSet* vdo_channel_get_resolutions | ( | VdoChannel * | self, |
| VdoMap * | filter, | ||
| GError ** | error | ||
| ) |
Fetch all valid resolutions for a channel with specified stream format.
Get a VdoResolutionSet of valid resolutions.
| error | A location to return an error. |
| filter | A VdoMap specifying filter or NULL for default. |
| Name | Type | Description |
|---|---|---|
| "format" | uint32 | Video stream format as VdoFormat. |
| "subformat" | string | The subformat for streams in YUV format. |
| "select" | string | Supports: "all", "min", "max", "minmax". |
| "aspect_ratio" | string | Supports: "1:1", "4:3", "5:4", "16:9", "16:10", "native". |
| "pixel.limit" | uint32 | The default pixel limit is tuned per platform (YUV Only). |
VdoResolutionSet on success. NULL if error is set. Free with g_free. | VdoMap* vdo_channel_get_settings | ( | VdoChannel * | self, |
| GError ** | error | ||
| ) |
Get the settings for this channel.
This function is called in order to get a pointer to the settings map for this channel. The returned pointer is a pointer to a newly allocated VdoMap owned by the caller of this function. For example:
| self | A VdoChannel. |
| error | A location to return an error. |
NULL if error is set. Free with g_object_unref(). | VdoMap* vdo_channel_get_stream_profile | ( | VdoChannel * | self, |
| const gchar * | profile, | ||
| VdoFormat | format, | ||
| GError ** | error | ||
| ) |
Query stream profile for the specified name, format and channel.
The combination of profile and format is unique and may have different stream settings.
| self | The VdoChannel to query. |
| profile | The name of the stream profile |
| format | The format of the stream profile. |
| error | A location to return an error. |
NULL if error is set. Free with g_object_unref(). | gboolean vdo_channel_set_framerate | ( | VdoChannel * | self, |
| gdouble | framerate, | ||
| GError ** | error | ||
| ) |
Update the framerate for the specified channel.
This function is invoked in order to update the framerate of a channel. All streams that are connected to this channel may be changed. Only streams with a higher fps set than the channel framerate will be affected.
| self | The VdoChannel to set framerate on. |
| framerate | A framerate. |
| error | A location to return an error. |
TRUE on success, FALSE if error is set. | gboolean vdo_channel_set_settings | ( | VdoChannel * | self, |
| VdoMap * | settings, | ||
| GError ** | error | ||
| ) |
Update the settings for this channel.
This function is invoked in order to update the settings of a channel. The caller owns the VdoMap containing the new/updated settings.
| self | A VdoChannel. |
| settings | A VdoMap containing new/updated settings. |
| error | A location to return an error. |
TRUE on success, FALSE if error is set.