tcam-property

This page describes the official gobject-introspection API.

Note

The current version of this API is 1.0

Table of Contents

TcamPropertyProvider

This object is typically a casted gstreamer element like tcambin, tcamsrc or tcamdutils.

Properties require the GStreamer element to be at least in the state GST_STATE_READY.

Properties will become invalid once the GStreamer element enters the state GST_STATE_NULL.
In such a case TCAM_ERROR_DEVICE_NOT_OPENED will be returned.

tcam_property_provider_get_tcam_property_names

Retrieve a list of all currently available properties. GstElement must be GST_STATE_READY or higher.

GSList* tcam_property_provider_get_tcam_property_names(TcamPropertyProvider* self, GError** err)
Parameters:
Returns:

(element-type utf8) (transfer full): A list of property names supported by this object

Retval GSList*:

A single linked list containing strings with property names

Retval NULL:

If an error occurs, NULL will be returned

GstElement* source = gst_element_factory_make("tcambin", "source");

gst_element_set_state(source, GST_STATE_READY);

GSList* property_names = tcam_property_provider_get_names(TCAM_PROPERTY_PROVIDER(source));

// free GSList and all contained strings
g_slist_free_full(property_names, g_free);

gst_element_set_state(source, GST_STATE_NULL);

// free GstElement
gst_object_unref(source);
Tcam.PropertyProvider.get_tcam_property_names()
Exception:May raise an GLib.Error when communication with a device fails
Returns:A list of property names supported by this object
Return type:List of strings
source = Gst.ElementFactory.make("tcambin", "source")
source.set_state(Gst.State.READY)

try:
    names = source.get_tcam_property_names()
except GLib.Error as err:
    # error handling

# nothing to do for memory management
# python cleans up automatically

tcam_property_provider_get_tcam_property

Retrieve a specific property instance.

Property has to be unreferenced after usage.

Instances will return a GError containing ref:TCAM_ERROR_NO_DEVICE_OPEN when the providing device is closed or lost.

GSList* tcam_property_provider_get_tcam_property(TcamPropertyProvider* self, const char* name, GError** err)
Parameters:
  • selfTcamPropertyProvider instance that shall be queried
  • name – A string pointer, naming the property which instance shall be returned.
  • err – A GError pointer, may be NULL
Returns:

(transfer full): A TcamPropertyBase object.

Retval NULL:

If an error occurs, NULL will be returned. Check err

Retval:

a valid TcamPropertyProvider instance

GstElement* tcambin = ....
GError* err = NULL;

TcamPropertyBase* base_property = tcam_property_provider_get_tcam_property(TCAM_PROPERTY_PROVIDER(tcambin), "name", &err);

if (!base_provider)
{
    if (err)
    {
        // error handling
    }
}

// no error
// do property handling

if (base_property)
{
    g_object_unref(base_property);
    base_property = NULL;
}
Tcam.PropertyProvider.get_tcam_property(name)
Parameters:name – Name of the property to return
Exception:May raise an GLib.Error when communication with a device fails
Returns:A instance of a TcamPropertyBase derived object
tcambin = ....
try:
    property = tcambin.get_tcam_property("name")
except GLib.Error as err:
    # error handling

tcam_property_provider_set_tcam_boolean

Convenience function to set the value of a boolean.

For complex applications it is recommended to use a TcamPropertyBoolean instance instead.

void tcam_property_provider_set_tcam_boolean(TcamPropertyProvider* self, const char* name, gboolean value, GError** err)
Parameters:
  • self – The TcamPropertyProvider instance
  • name – A string, naming the property that shall be set.
  • value – The value to set.
  • err – A GError pointer, may be NULL
GstElement* tcambin = ....
GError* err = NULL;
gboolean value = TRUE;

tcam_property_provider_set_tcam_boolean(TCAM_PROPERTY_PROVIDER(tcambin), "name", value, &err);

if (err)
{
    // error handling
}
Tcam.PropertyProvider.set_tcam_boolean(name, value)
Parameters:
  • name – Name of the property
  • value – New value to set
Exception:

May raise an GLib.Error when setting the property fails

tcambin = ....
value = True

try:
    tcambin.set_tcam_boolean("name", value)
except GLib.Error as err:
    # error handling

tcam_property_provider_set_tcam_integer

Convenience function to set the value of an integer.

For complex applications it is recommended to use a TcamPropertyInteger instance instead.

void tcam_property_provider_set_tcam_integer(TcamPropertyProvider* self, const char* name, gint64 value, GError** err)
Parameters:
  • self – The TcamPropertyProvider instance
  • name – A string, naming the property that shall be set.
  • value – The value to set.
  • err – A GError pointer, may be NULL
GstElement* tcambin = ....
GError* err = NULL;
int value = 500;

tcam_property_provider_set_tcam_integer(TCAM_PROPERTY_PROVIDER(tcambin), "name", value, &err);

if (err)
{
    // error handling
}
Tcam.PropertyProvider.set_tcam_integer(name, value)
Parameters:
  • name – Name of the property
  • value – New value to set
Exception:

May raise an GLib.Error when setting the property fails

tcambin = ....
value = 500

try:
    tcambin.set_tcam_integer("name", value)
except GLib.Error as err:
    # error handling

tcam_property_provider_set_tcam_float

Convenience function to set the value of a float.

For complex applications it is recommended to use a TcamPropertyFloat instance instead.

void tcam_property_provider_set_tcam_float(TcamPropertyProvider* self, const char* name, gdouble value, GError** err)
Parameters:
  • self – The TcamPropertyProvider instance
  • name – A string, naming the property that shall be set.
  • value – The value to set.
  • err – A GError pointer, may be NULL
GstElement* tcambin = ....
GError* err = NULL;
double value = 3000.0;

tcam_property_provider_set_tcam_float(TCAM_PROPERTY_PROVIDER(tcambin), "name", value, &err);

if (err)
{
    // error handling
}
Tcam.PropertyProvider.set_tcam_float(name, value)
Parameters:
  • name – Name of the property
  • value – New value to set
Exception:

May raise an GLib.Error when setting the property fails

tcambin = ....
value = 3000.0
try:
    tcambin.set_tcam_float("name", value)
except GLib.Error as err:
    # error handling

tcam_property_provider_set_tcam_enumeration

Convenience function to set the value of an enum.

For complex applications it is recommended to use a TcamPropertyEnumeration instance instead.

void tcam_property_provider_set_tcam_enumeration(TcamPropertyProvider* self, const char* name, const char* value, GError** err)
Parameters:
  • self – The TcamPropertyProvider instance
  • name – A string, naming the property that shall be set.
  • value – The string of the enumeration entry to set.
  • err – A GError pointer, may be NULL
GstElement* tcambin = ....
GError* err = NULL;
const char* value = "entry";

tcam_property_provider_set_tcam_enumeration(TCAM_PROPERTY_PROVIDER(tcambin), "name", value, &err);

if (err)
{
    // error handling
}
Tcam.PropertyProvider.set_tcam_enumeration(name, value)
Parameters:
  • name – Name of the property
  • value – New value to set
Exception:

May raise an GLib.Error when setting the property fails

tcambin = ....
value = "entry"

try:
    tcambin.set_tcam_enumeration("name", value)
except GLib.Error as err:
    # error handling

tcam_property_provider_set_tcam_command

Convenience function to execute a command.

For complex applications it is recommended to use a TcamPropertyCommand instance instead.

void tcam_property_provider_set_tcam_command(TcamPropertyProvider* self, const char* name, GError** err)
Parameters:
  • self – The TcamPropertyProvider instance
  • name – A string, naming the property that shall be set.
  • err – A GError pointer, may be NULL
GstElement* tcambin = ....
GError* err = NULL;

tcam_property_provider_set_tcam_command(TCAM_PROPERTY_PROVIDER(tcambin), "name", &err);

if (err)
{
    // error handling
}
Tcam.PropertyProvider.set_tcam_command(name)
Parameters:name – Name of the property
Exception:May raise an GLib.Error when setting the property fails
tcambin = ....

try:
    tcambin.set_tcam_command("name")
except GLib.Error as err:
    # error handling

tcam_property_provider_get_tcam_boolean

Convenience function to retrieve the value of a boolean property.

For complex applications it is recommended to use a TcamPropertyBoolean instance instead.

gboolean tcam_property_provider_get_tcam_boolean(TcamPropertyProvider* self, const char* name, GError** err)
Parameters:
  • self – The TcamPropertyProvider instance
  • name – A string, naming the property that shall be retrieved.
  • err – A GError pointer, may be NULL
Returns:

The value of the property or on error an unspecified value.

GstElement* tcambin = ....
GError* err = NULL;

gboolean value = tcam_property_provider_get_tcam_boolean(TCAM_PROPERTY_PROVIDER(tcambin), "name", &err);

if (err)
{
   // error handling
}
Tcam.PropertyProvider.get_tcam_boolean(name)
Parameters:name – Name of the property
Exception:May raise an GLib.Error when setting the property fails
Returns:The value of the property
tcambin = ....
value = True
try:
    value = tcambin.get_tcam_boolean("name")
except GLib.Error as err:
    # error handling

tcam_property_provider_get_tcam_integer

Convenience function to retrieve the value of an integer property.

For complex applications it is recommended to use a TcamPropertyInteger instance instead.

gint64 tcam_property_provider_get_tcam_integer(TcamPropertyProvider* self, const char* name, GError** err)
Parameters:
  • self – The TcamPropertyProvider instance
  • name – A string, naming the property that shall be retrieved.
  • err – A GError pointer, may be NULL
Returns:

The value of the property or on error an unspecified value.

GstElement* tcambin = ....
GError* err = NULL;

gint64 value = tcam_property_provider_get_tcam_integer(TCAM_PROPERTY_PROVIDER(tcambin), "name", &err);

if (err)
{
    // error handling
}
Tcam.PropertyProvider.get_tcam_integer(name)
Parameters:name – Name of the property
Exception:May raise an GLib.Error when setting the property fails
Returns:The value of the property
tcambin = ....

try:
    value = tcambin.get_tcam_integer("name")
except GLib.Error as err:
    # error handling

tcam_property_provider_get_tcam_float

Convenience function to retrieve the value of a float property.

For complex applications it is recommended to use a TcamPropertyFloat instance instead.

gdouble tcam_property_provider_get_tcam_float(TcamPropertyProvider* self, const char* name, GError** err)
Parameters:
  • self – The TcamPropertyProvider instance
  • name – A string, naming the property that shall be retrieved.
  • err – A GError pointer, may be NULL
Returns:

The value of the property or on error an unspecified value.

GstElement* tcambin = ....
GError* err = NULL;

double value = tcam_property_provider_get_tcam_float(TCAM_PROPERTY_PROVIDER(tcambin), "name", &err);

if (err)
{
   // error handling
}
Tcam.PropertyProvider.get_tcam_float(name)
Parameters:name – Name of the property
Exception:May raise an GLib.Error when setting the property fails
Returns:The value of the property
tcambin = ....

try:
    value = tcambin.get_tcam_float("name")
except GLib.Error as err:
    # error handling

tcam_property_provider_get_tcam_enumeration

Convenience function to retrieve the value of an enumeration property.

For complex applications it is recommended to use a TcamPropertyEnumeration instance instead.

const char* tcam_property_provider_get_tcam_enumeration(TcamPropertyProvider* self, const char* name, GError** err)
Parameters:
  • self – The TcamPropertyProvider instance
  • name – A string, naming the property that shall be retrieved.
  • err – A GError pointer, may be NULL
Returns:

(transfer none): The current enumeration entry string of the property or on error an unspecified value.

GstElement* tcambin = ....
GError* err = NULL;

const char* value = tcam_property_provider_get_tcam_enumeration(TCAM_PROPERTY_PROVIDER(tcambin), "name", &err);

if (err)
{
    // error handling
}
Tcam.PropertyProvider.get_tcam_enumeration(name)
Parameters:name – Name of the property
Exception:May raise an GLib.Error when setting the property fails
Returns:The value of the property
tcambin = ....

try:
    value = tcambin.get_tcam_enumeration("name")
except GLib.Error as err:
    # error handling

TcamPropertyBase

Base class for all properties. Can be cast into different derived classes.

Check the property type via tcam_property_base_get_property_type to ensure the correct cast will be used.

Python users will have to do nothing.

Retrieval of properties is done by calling tcam_property_provider_get_tcam_property.

tcam_property_base_get_name

Fetches the name of this property.

const char* tcam_property_base_get_name(TcamPropertyBase* self)
Parameters:
Returns:

(transfer none): The name of the property. This is valid and will not change until this property is released.

Retval NULL:

This is only NULL if the passed in instance is not a TcamPropertyBase.

TcamPropertyBase* base_property = ....

const char* name = tcam_property_base_get_name(base_property);
Tcam.PropertyBase.get_name()
Returns:The name of this property
name = base_property.get_name()

tcam_property_base_get_display_name

The display name is a human readable name intended for GUIs and similar interfaces.

const gchar* tcam_property_base_get_display_name(TcamPropertyBase* self)
Parameters:
Returns:

(transfer none): The display name of the property. This is valid and will not change until this property is released.

Retval NULL:

Maybe NULL if no display name is available for this property.

TcamPropertyBase* base_property = ....

const char* display_name = tcam_property_base_get_display_name(base_property);
Tcam.PropertyBase.get_display_name()
Returns:The display name of the property.
display_name = base_property.get_display_name()

tcam_property_base_get_description

Description of the property.

const gchar* tcam_property_base_get_description(TcamPropertyBase* self)
Parameters:
Returns:

(transfer none): The description of the property. This is valid and will not change until this property is released.

Retval NULL:

Maybe NULL if no description is available for this property.

TcamPropertyBase* base_property = ....

const char* description = tcam_property_base_get_description(base_property);
Tcam.PropertyBase.get_description()
Returns:The description of the property.
description = base_property.get_description()

tcam_property_base_get_category

Category string for simple property organization.

const gchar* tcam_property_base_get_category(TcamPropertyBase* self)
Parameters:
Returns:

(transfer none): The name of the category this property is associated with. This is valid and will not change until this property is released.

Retval NULL:

Maybe NULL if no category is available for this property.

TcamPropertyBase* base_property = ....

const char* category = tcam_property_base_get_category(base_property);
Tcam.PropertyBase.get_category()
Returns:The name of the category this property is associated with.
category = base_property.get_category()

tcam_property_base_get_access

Specifies the TcamPropertyAccess for the property.

TcamPropertyAccess tcam_property_base_get_access(TcamPropertyBase* self)
Parameters:
Returns:

The TcamPropertyAccess of the property

TcamPropertyBase* base_property = ...

TcamPropertyAccess access = tcam_property_base_get_access(base_property);
Tcam.TcamPropertyAccess Tcam.PropertyBase.get_access()
Returns:the TcamPropertyAccess of the property
access_level = base_property.get_access()

tcam_property_base_get_visibility

Specifies a TcamPropertyVisibility for the property, providing a recommended visibility level for applications.

TcamPropertyVisibility tcam_property_base_get_visibility(TcamPropertyBase* self)
Parameters:
Returns:

The TcamPropertyVisibility of the property

TcamPropertyBase* base_property = ...

TcamPropertyVisibility vis = tcam_property_base_get_visibility(base_property);
Tcam.PropertyVisibility Tcam.PropertyBase.get_visibility()
Returns:the TcamPropertyVisibility of the property
visibility = base_property.get_visibility()

tcam_property_base_get_property_type

A TcamPropertyType describing the specific property type of the TcamPropertyBase instance.

Cast the TcamPropertyBase instance into a derived type to access more functions.

TcamPropertyType tcam_property_base_get_property_type(TcamPropertyBase* self)
Parameters:
Returns:

The TcamPropertyType of the property

TcamPropertyType type = tcam_property_base_get_property_type(base_property);
Tcam.PropertyType Tcam.PropertyBase.get_property_type()
Returns:the TcamPropertyType of the property
property_type = base_property.get_property_type()

tcam_property_base_is_available

Check if property is currently available.
If the property is not available it means that a stream setting is preventing usage.
A typical example would be BalanceWhiteAuto being not available while streaming video/x-raw,format=GRAY8.
gboolean tcam_property_base_is_available(TcamPropertyBase* self, GError** err)
Parameters:
Returns:

Returns TRUE if the property is currently available, otherwise false.

if (tcam_property_base_is_available(base_property, &err))
{
    // property is locked and cannot be changed
}

if (err)
{
    // error handling
}
Tcam.PropertyBase.is_available()
Exception:May raise an GLib.Error when fetching the property fails
Returns:Returns if this property is available.
try:
    if base_property.is_available():
        # property is locked and cannot be changed
    except GLib.Error as err:
        # error handling

tcam_property_base_is_locked

Check if property is currently locked.
If the property is locked it means that no write actions are possible, due to another property preventing such actions.
A typical example would be ExposureAuto locking ExposureTime.
gboolean tcam_property_base_is_locked(TcamPropertyBase* self, GError** err)
Parameters:
Returns:

Returns TRUE if the property is currently locked, otherwise false.

if (tcam_property_base_is_locked(base_property, &err))
{
    // property is locked and cannot be changed
}

if (err)
{
    // error handling
}
Tcam.PropertyBase.is_locked()
Exception:May raise an GLib.Error when fetching the property fails
Returns:Returns if this property is locked.
try:
    if base_property.is_locked():
        # property is locked and cannot be changed
except GLib.Error as err:
    # error handling

TcamPropertyBoolean

Property representing a bool value.
Can be obtained by casting a TcamPropertyBase with TCAM_PROPERTY_BOOLEAN(TcamPropertyBase*).
Inherits from TcamPropertyBase.
Upon cleanup g_object_unref has to be called on the property.

tcam_property_boolean_get_value

gboolean tcam_property_boolean_get_value(TcamPropertyBoolean* self, GError** err)
Parameters:
Returns:

Returns the current value of the property.

TcamPropertyBoolean* bool_property = TCAM_PROPERTY_BOOLEAN(base_property);
GError* err = NULL;

gboolean current_value = tcam_property_boolean_get_value(bool_property, &err);

if (err)
{
    // error handling
}
Tcam.PropertyBoolean.get_value()
Exception:May raise an GLib.Error when fetching the property fails
Returns:Returns the value of this property
try:
    current_value = base_property.get_value()
except GLib.Error as err:
    # error handling

tcam_property_boolean_set_value

void tcam_property_boolean_set_value(TcamPropertyBoolean* self, gboolean value, GError** err)
Parameters:
TcamPropertyBoolean* bool_property = TCAM_PROPERTY_BOOLEAN(base_property);
GError* err = NULL;


gboolean new_value = TRUE;
tcam_property_boolean_set_value(bool_property, new_value, &err);

if (err)
{
    // error handling
}
Tcam.PropertyBoolean.set_value(value)
Parameters:value – The new value to set.
Exception:May raise an GLib.Error when setting the property fails
try:
    new_value = True
    base_property.set_value(new_value)
except GLib.Error as err:
    # error handling

tcam_property_boolean_get_default

Query for the default value of a boolean property.
This might fail with TCAM_ERROR_PROPERTY_DEFAULT_NOT_AVAILABLE if no default value is available for this property.
gboolean tcam_property_boolean_get_default(TcamPropertyBoolean* self, GError** err)
Parameters:
Returns:

Returns the default value of the property

TcamPropertyBoolean* bool_property = TCAM_PROPERTY_BOOLEAN(base_property);
GError* err = NULL;

bool default_value = tcam_property_boolean_get_default(bool_property, &err);

if (err)
{
    // error handling
}
Tcam.PropertyBoolean.get_default()
Exception:May raise an GLib.Error when fetching the property fails
Returns:Returns the default value of the property
try:
    current_value = base_property.get_default()
except GLib.Error as err:
    # error handling

TcamPropertyInteger

Property representing an integer value.

An instance can be retrieved by casting a TcamPropertyBase pointer. TCAM_PROPERTY_INTEGER(TcamPropertyBase*)

Upon cleanup g_object_unref has to be called on the property.

TcamPropertyInteger

tcam_property_integer_get_value

gint64 tcam_property_integer_get_value(TcamPropertyInteger* self, GError** err)
Parameters:
Returns:

Returns the current value of the property

TcamPropertyInteger* int_property = TCAM_PROPERTY_INTEGER(base_property);
GError* err = NULL;

gint64 current_value = tcam_property_integer_get_value(int_property, &err);

if (err)
{
    // error handling
}
Tcam.PropertyInteger.get_value()
Exception:May raise an GLib.Error when fetching the property fails
Returns:Returns the value of the property
try:
    current_value = base_property.get_value()
except GLib.Error as err:
    # error handling

tcam_property_integer_set_value

void tcam_property_integer_set_value(TcamPropertyInteger* self, gint64 value, GError** err)
Parameters:
TcamPropertyInteger* int_property = TCAM_PROPERTY_INTEGER(base_property);
GError* err = NULL;

int64 new_value = 500;
tcam_property_integer_set_value(int_property, new_value, &err);

if (err)
{
    // error handling
}
Tcam.PropertyInteger.set_value(value)
Parameters:value – The new value to set.
Exception:May raise an GLib.Error when setting the property fails
try:
    new_value = 500
    base_property.set_value(new_value)
except GLib.Error as err:
    # error handling

tcam_property_integer_get_range

void tcam_property_integer_get_range(TcamPropertyInteger* self, gint64* min_value, gint64* max_value, gint64* step_value, GError** err)
Parameters:
  • self – The TcamPropertyInteger instance
  • min_value – out value. pointer to a int64 that will be filled with the minimal value the property may have. May be NULL.
  • max_value – out value. pointer to a int64 that will be filled with the maximum value the property may have. May be NULL.
  • step_value – out value. pointer to a int64 that will be filled with the step size between values. May be NULL.
  • err – A GError pointer, may be NULL
TcamPropertyInteger* int_property = TCAM_PROPERTY_INTEGER(base_property);
GError* err = NULL;
int64 min_value;
int64 max_value;
int64 step_value;
tcam_property_integer_get_range(int_property,
                                         &min_value,
                                         &max_value,
                                         &step_value,
                                         &err);

if (err)
{
    // error handling
}
[min,max,step] = Tcam.PropertyInteger.get_range()
Exception:May raise an GLib.Error when fetching the property fails
Returns:Returns the range and step of the property
Retval min:The minimum for this property
Retval max:The maximum for this property
Retval step:The step for this property
try:
    min_value, max_value, step_value = base_property.get_range()
except GLib.Error as err:
    # error handling

tcam_property_integer_get_default

gint64 tcam_property_integer_get_default(TcamPropertyInteger* self, GError** err)
Parameters:
Returns:

Returns the default value of the property

TcamPropertyInteger* int_property = TCAM_PROPERTY_INTEGER(base_property);
GError* err = NULL;
int64 default_value = tcam_property_integer_get_default(int_property, &err);

if (err)
{
    // error handling
}
Tcam.PropertyInteger.get_default()
Exception:May raise an GLib.Error when fetching the property fails
Returns:Returns the default value of the property
try:
    default_value = base_property.get_default()
except GLib.Error as err:
    # error handling

tcam_property_integer_get_unit

const gchar* tcam_property_integer_get_unit (TcamPropertyInteger* self);
Parameters:
Returns:

(transfer none): String describing the property unit. The string is valid until the instance is released.

Retval NULL:

If the unit is not available, NULL is returned.

TcamPropertyInteger* int_property = TCAM_PROPERTY_INTEGER(base_property);
GError* err = NULL;
const char* unit = tcam_property_integer_get_unit(int_property, &err);

if (!unit)
{
    if (err)
    {
        // error handling
    }
}
Tcam.PropertyInteger.get_unit()
Exception:May raise an GLib.Error when fetching the property fails
Returns:Returns the unit name for this property
try:
    unit = base_property.get_unit()
except GLib.Error as err:
    # error handling

tcam_property_integer_get_representation

TcamPropertyIntRepresentation tcam_property_integer_get_representation(TcamPropertyInteger* self)
Parameters:
Returns:

TcamPropertyIntRepresentation describing the recommended way of displaying the property.

TcamPropertyInteger* int_property = TCAM_PROPERTY_INTEGER(base_property);
GError* err = NULL;
TcamPropertyIntRepresentation representation = tcam_property_integer_get_representation(int_property, &err);

if (err)
{
    // error handling
}
Tcam.PropertyInteger.get_representation()
Exception:May raise an GLib.Error when fetching the property fails
Returns:Returns the TcamPropertyIntRepresentation for this property
try:
    representation = base_property.get_representation()
except GLib.Error as err:
    # error handling

TcamPropertyFloat

Property representing a floating point value.

An instance can be retrieved by casting a TcamPropertyBase pointer. TCAM_PROPERTY_FLOAT(TcamPropertyBase*)

Upon cleanup g_object_unref has to be called on the property.

TcamPropertyFloat

tcam_property_float_get_value

gdouble tcam_property_float_get_value(TcamPropertyFloat* self, GError** err)
Parameters:
Returns:

Returns the current value of the property

TcamPropertyFloat* float_property = TCAM_PROPERTY_FLOAT(base_property);
GError* err = NULL;

double current_value = tcam_property_float_get_value(float_property, &err);

if (err)
{
    // error handling
}
Tcam.PropertyFloat.get_value()
Exception:May raise an GLib.Error when fetching the property fails
Returns:Returns the current value for this property
try:
    current_value = base_property.get_value()
except GLib.Error as err:
    # error handling

tcam_property_float_set_value

void tcam_property_float_set_value(TcamPropertyFloat* self, gdouble value, GError** err)
Parameters:
TcamPropertyFloat* float_property = TCAM_PROPERTY_FLOAT(base_property);
GError* err = NULL;

double new_value = 30000.0;
tcam_property_float_set_value(float_property, new_value, &err);

if (err)
{
    // error handling
}
Tcam.PropertyFloat.set_value(value)
Parameters:value – The new value to set.
Exception:May raise an GLib.Error when fetching the property fails
try:
    new_value = 30000.0
    base_property.set_value(new_value)
except GLib.Error as err:
    # error handling

tcam_property_float_get_range

void tcam_property_float_get_range (TcamPropertyFloat* self, gdouble* min_value, gdouble* max_value, gdouble* step_value, GError** err);
Parameters:
  • self – The TcamPropertyFloat instance
  • min_value – out value. pointer to a gdouble that will be filled with the minimal value the property may have. May be NULL.
  • max_value – out value. pointer to a gdouble that will be filled with the maximum value the property may have. May be NULL.
  • step_value – out value. pointer to a gdouble that will be filled with the step size between values. May be NULL.
  • err – A GError pointer, may be NULL
TcamPropertyFloat* float_property = TCAM_PROPERTY_FLOAT(base_property);
GError* err = NULL;
double min_value;
double max_value;
double step_value;
tcam_property_float_get_representation(float_property,
                                       &min_value,
                                       &max_value,
                                       &step_value,
                                       &err);

if (err)
{
    // error handling
}
[min,max,step] = Tcam.PropertyFloat.get_range()
Exception:May raise an GLib.Error when fetching the property fails
Returns:Returns the range and step of the property
Retval min:The minimum for this property
Retval max:The maximum for this property
Retval step:The step for this property
try:
    min_value, max_value, step_value = base_property.get_range()
except GLib.Error as err:
    # error handling

tcam_property_float_get_default

gdouble tcam_property_float_get_default (TcamPropertyFloat* self, GError** err);
Parameters:
Returns:

Returns the default value of the property

TcamPropertyFloat* float_property = TCAM_PROPERTY_FLOAT(base_property);
GError* err = NULL;
double default_value = tcam_property_float_get_default(float_property, &err);

if (err)
{
    // error handling
}
Tcam.PropertyFloat.get_default()
Exception:May raise an GLib.Error when fetching the property fails
Returns:Returns the default value of the property
try:
    default_value = base_property.get_default()
except GLib.Error as err:
    # error handling

tcam_property_float_get_unit

const gchar* tcam_property_float_get_unit (TcamPropertyFloat* self);
Parameters:
Returns:

(transfer none): String describing the property unit. The string is valid until the instance is released.

Retval NULL:

If the unit is not available, NULL is returned.

TcamPropertyFloat* float_property = TCAM_PROPERTY_FLOAT(base_property);
GError* err = NULL;
const char* unit = tcam_property_float_get_unit(float_property, &err);

if (!unit)
{
    if (err)
    {
        // error handling
    }
}
Tcam.PropertyFloat.get_unit()
Exception:May raise an GLib.Error when fetching the property fails
Returns:Returns the unit name of the property
try:
    unit = base_property.get_unit()
except GLib.Error as err:
    # error handling

tcam_property_float_get_representation

TcamPropertyFloatRepresentation tcam_property_float_get_representation (TcamPropertyFloat* self);
Parameters:
Returns:

TcamPropertyFloatRepresentation describing the recommended way of displaying the property.

TcamPropertyFloat* float_property = TCAM_PROPERTY_FLOAT(base_property);
GError* err = NULL;
TcamPropertyFloatRepresentation representation = tcam_property_float_get_representation(float_property, &err);

if (err)
{
    // error handling
}
Tcam.PropertyFloat.get_unit()
Exception:May raise an GLib.Error when fetching the property fails
Returns:Returns the TcamPropertyFloatRepresentation of the property
try:
    representation = base_property.get_representation()
except GLib.Error as err:
    # error handling

TcamPropertyEnumeration

Property representing an enumeration/menu value.

An instance can be retrieved by casting a TcamPropertyBase pointer. TCAM_PROPERTY_ENUMERATION(TcamPropertyBase*)

Upon cleanup g_object_unref has to be called on the property.

TcamPropertyEnumeration

tcam_property_enumeration_get_value

const gchar* tcam_property_enumeration_get_value (TcamPropertyEnumeration* self, GError** err);
Parameters:
Returns:

(transfer none): Returns the current value of the property. NULL on error. The string is valid until the instance is released.

TcamPropertyEnumeration* enumeration = TCAM_PROPERTY_ENUMERATION(base_property);
GError* err = NULL;
const char* current_value = tcam_property_enumeration_get_value(enumeration, &err);

if (!current_value)
{
    if (err)
    {
        // error handling
    }
}
Tcam.PropertyEnumeration.get_value()
Exception:May raise an GLib.Error when fetching the property fails
Returns:Returns current value of the property
try:
    current_value = base_property.get_value()
except GLib.Error as err:
    # error handling

tcam_property_enumeration_set_value

void tcam_property_enumeration_set_value (TcamPropertyEnumeration* self, const gchar* value, GError** err);
Parameters:
TcamPropertyEnumeration* enumeration = TCAM_PROPERTY_ENUMERATION(base_property);
GError* err = NULL;
const char* new_value = "entry";
tcam_property_enumeration_set_value(enumeration, new_value, &err);

if (err)
{
    // error handling
}
Tcam.PropertyEnumeration.set_value(value)
Parameters:value – The new value to set
Exception:May raise an GLib.Error when fetching the property fails
try:
    new_value = "entry"
    base_property.set_value(new_value)
except GLib.Error as err:
    # error handling

tcam_property_enumeration_get_enum_entries

The caller takes ownership of the returned list and its values. Call g_slist_free_full(enum_entries, g_free) when not done.

param self:property instance
param err:Pointer to GError pointer to be used in case of error. Can be NULL.
returns:A GSList containing string values describing all possible property values. NULL on error.
retval:GSList*
GSList* tcam_property_enumeration_get_enum_entries (TcamPropertyEnumeration* self, GError** err);
Parameters:
Returns:

(transfer full): A list of enumeration entries. All entries and the list itself must be freed by the caller.

Retval NULL:

Returns NULL on error.

TcamPropertyEnumeration* enumeration = TCAM_PROPERTY_ENUMERATION(base_property);
GError* err = NULL;
GSList* entry_list = tcam_property_enumeration_get_enum_entries(enumeration, &err);

if (!entry_list)
{
    if (err)
    {
        // error handling
    }
}

// when done call
g_slist_free_full(entry_list, g_free);
Tcam.PropertyEnumeration.get_enum_entries()
Exception:May raise an GLib.Error when fetching the property fails
Returns:Returns a list of strings for the enumeration entries
try:
    entry_list = base_property.get_enum_entries()
except GLib.Error as err:
    # error handling

tcam_property_enumeration_get_default

const gchar* tcam_property_enumeration_get_default (TcamPropertyEnumeration* self, GError** err);
Parameters:
Returns:

(transfer none): The default value for this property. The string is valid until this instance is released.

Retval NULL:

Returns NULL on error.

TcamPropertyEnumeration* enumeration = TCAM_PROPERTY_ENUMERATION(base_property);
GError* err = NULL;
const char* default_value = tcam_property_enumeration_get_default(enumeration, &err);

if (!default_value)
{
    if (err)
    {
        // error handling
    }
}
Tcam.PropertyEnumeration.get_default()
Exception:May raise an GLib.Error when fetching the property fails
Returns:Returns the defaulkt value for this property.
try:
    default_value = base_property.get_default()
except GLib.Error as err:
    # error handling

TcamPropertyCommand

Property representing a command/button value.

An instance can be retrieved by casting a TcamPropertyBase pointer. TCAM_PROPERTY_COMMAND(TcamPropertyBase*)

Upon cleanup g_object_unref has to be called on the property.

tcam_property_command_set_command

Execute the command.

void tcam_property_command_set_command (TcamPropertyCommand* self, GError** err);
Parameters:
TcamPropertyCommand* command = TCAM_PROPERTY_COMMAND(base_property);
GError* err = NULL;
tcam_property_command_set_command(command, &err);

if (err)
{
    // error handling
}
Tcam.PropertyCommand.set_command()
Exception:May raise an GLib.Error when fetching the property fails
try:
    base_property.set_command()
except GLib.Error as err:
    # error handling

TcamPropertyString

Property representing a string value.
Inherits from TcamPropertyBase.
Can be obtained by casting a TcamPropertyBase with TCAM_PROPERTY_STRING(TcamPropertyBase*).
Upon cleanup g_object_unref has to be called on the property.

tcam_property_string_get_value

char* tcam_property_string_get_value(TcamPropertyString* self, GError** err)
Parameters:
Returns:

(transfer full): Returns the current value of the property. This string must be freed by the caller

TcamPropertyString* property = TCAM_PROPERTY_STRING(base_property);
GError* err = NULL;

char* current_value = tcam_property_string_get_value(property, &err);

if (err)
{
    // error handling
}

g_free(current_value);
Tcam.PropertyString.get_value()
Exception:May raise an GLib.Error when fetching the property fails
Returns:Returns the value of this property
try:
    current_value = base_property.get_value()
except GLib.Error as err:
    # error handling

tcam_property_string_set_value

void tcam_property_string_set_value(TcamPropertyString* self, const char* value, GError** err)
Parameters:
TcamPropertyString* property = TCAM_PROPERTY_STRING(base_property);
GError* err = NULL;

const char* new_value = "test";
tcam_property_string_set_value(property, new_value, &err);

if (err)
{
    // error handling
}
Tcam.PropertyString.set_value(value)
Parameters:value – The new value to set.
Exception:May raise an GLib.Error when setting the property fails
try:
    new_value = True
    base_property.set_value(new_value)
except GLib.Error as err:
    # error handling

Helper Types

TcamError

TcamError is the tcam-property enumeration that contains all potential error tcam-property implementations might produce. This does not mean that other error might not also occur.

enum TcamError

Enumeration containing all possible error types tcam-property will return.

enumerator TCAM_ERROR_SUCCESS
Should not be encountered.
Describes no error state.
enumerator TCAM_ERROR_TIMEOUT
A function failed with a timeout.
enumerator TCAM_ERROR_UNKNOWN
Catch all error code for things that do not fit other codes.
enumerator TCAM_ERROR_NOT_IMPLEMENTED
Generic not implemented error value.
enumerator TCAM_ERROR_PARAMETER_INVALID
A parameter was not valid.
enumerator TCAM_ERROR_PROPERTY_NOT_IMPLEMENTED
enumerator TCAM_ERROR_PROPERTY_NOT_AVAILABLE
Circumstances prevent this property from being usable.
This is typically due to the selected stream format.
e.g. BalanceWhite* not being usable when streaming mono.
enumerator TCAM_ERROR_PROPERTY_NOT_WRITEABLE
The property is either read only or temporarily locked.
Call tcam_property_base_is_locked for verification.
enumerator TCAM_ERROR_PROPERTY_VALUE_OUT_OF_RANGE
Value is out of bounds.
Check the *_get_range function for boundaries.
enumerator TCAM_ERROR_PROPERTY_DEFAULT_NOT_AVAILABLE
The property has no default value.
enumerator TCAM_ERROR_PROPERTY_TYPE_INCOMPATIBLE
The property is of a different type.
enumerator TCAM_ERROR_DEVICE_NOT_OPENED
No device has been opened that can offer properties.
This typically means the GstElement is not in GST_STATE_READY or higher.
enumerator TCAM_ERROR_DEVICE_LOST
The device has been lost.
This should be considered a fatal, unrecoverable error.
enumerator TCAM_ERROR_DEVICE_NOT_ACCESSIBLE
The property cannot query the device for data.

TcamPropertyAccess

Indicates a static property access mode.

enum TcamPropertyAccess
enumerator TCAM_PROPERTY_ACCESS_RW

Read and write operations are available.

enumerator TCAM_PROPERTY_ACCESS_RO

Only read operations are available.

enumerator TCAM_PROPERTY_ACCESS_WO

Only write operations are available.

TcamPropertyVisibility

enum TcamPropertyVisibility
enumerator TCAM_PROPERTY_VISIBILITY_BEGINNER

Should always be displayed.

enumerator TCAM_PROPERTY_VISIBILITY_EXPERT

Should only be displayed to users, who know what they are doing.

enumerator TCAM_PROPERTY_VISIBILITY_GURU

Should only be displayed to users, who really know what they are doing.

enumerator TCAM_PROPERTY_VISIBILITY_INVISIBLE

Should never be displayed.

TcamPropertyIntRepresentation

enum TcamPropertyIntRepresentation

Enumeration describing recommendations on how the property should be represented.

enumerator TCAM_PROPERTY_INTREPRESENTATION_LINEAR

Property is best displayed with a linear slider.

enumerator TCAM_PROPERTY_INTREPRESENTATION_LOGARITHMIC

Property is best displayed with a logarithmic slider.

enumerator TCAM_PROPERTY_INTREPRESENTATION_PURENUMBER

Property is best displayed with an edit box (e.g. QSpinBox, Gtk SpinButton).

enumerator TCAM_PROPERTY_INTREPRESENTATION_HEXNUMBER

Same as pure number but with hexadecimal values.

TcamPropertyFloatRepresentation

enum TcamPropertyFloatRepresentation

Enumeration describing recommendations on how the property should be represented.

enumerator TCAM_PROPERTY_FLOATREPRESENTATION_LINEAR

Property is best displayed with a linear slider.

enumerator TCAM_PROPERTY_FLOATREPRESENTATION_LOGARITHMIC

Property is best displayed with a logarithmic slider.

enumerator TCAM_PROPERTY_FLOATREPRESENTATION_PURENUMBER

Property is best displayed with an edit box (e.g. QSpinBox, Gtk SpinButton).

TcamPropertyType

enum TcamPropertyType

Enumeration containing all possible property types.

enumerator TCAM_PROPERTY_TYPE_INTEGER
enumerator TCAM_PROPERTY_TYPE_FLOAT
enumerator TCAM_PROPERTY_TYPE_ENUMERATION
enumerator TCAM_PROPERTY_TYPE_BOOLEAN
enumerator TCAM_PROPERTY_TYPE_COMMAND

External Types

All tiscamera gstreamer elements implement the TcamPropertyProvider interface. This interface allows access to all properties that the camera and software offer.

GSList

GSList

In tcamprop this is always a list with element-type utf8 which has to be deallocated via:

Example:

GSList* list = tcam_prop_get_device_serials (self);

// ... do sth with list

g_slist_free_full (list, ::g_free);

GError

GError

GObject error reporting mechanism.

A returned GError has to _always_ be freed by the user with g_error_free().
The GError will contain a string describing the cause of the error and an error code.
The message can be accessed through the member variable message.
The error code can be accessed though the member variable code.
The error code will be a TcamError enum entry.