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.
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
self – TcamPropertyProvider instance that shall be queried
err – A
GError
pointer, may be NULL
- Returns
(element-type utf8) (transfer full): A list of property names supported by this object
- Return values
GSList* – A single linked list containing strings with property names
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
self – TcamPropertyProvider 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.
- Return values
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
self – The TcamPropertyBase instance
- Returns
(transfer none): The name of the property. This is valid and will not change until this property is released.
- Return values
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
self – The TcamPropertyBase instance
- Returns
(transfer none): The display name of the property. This is valid and will not change until this property is released.
- Return values
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
self – The TcamPropertyBase instance
- Returns
(transfer none): The description of the property. This is valid and will not change until this property is released.
- Return values
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
self – The TcamPropertyBase instance
- 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.
- Return values
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
self – The TcamPropertyBase instance
- 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
self – The TcamPropertyBase instance
- 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
self – The TcamPropertyBase instance
- 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¶
-
gboolean tcam_property_base_is_available(TcamPropertyBase *self, GError **err)¶
- Parameters
self – The TcamPropertyBase instance
err – A
GError
pointer, may be NULL
- 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¶
-
gboolean tcam_property_base_is_locked(TcamPropertyBase *self, GError **err)¶
- Parameters
self – The TcamPropertyBase instance
err – A
GError
pointer, may be NULL
- 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¶
TcamPropertyBase
with TCAM_PROPERTY_BOOLEAN(TcamPropertyBase*).tcam_property_boolean_get_value¶
-
gboolean tcam_property_boolean_get_value(TcamPropertyBoolean *self, GError **err)¶
- Parameters
self – The TcamPropertyBoolean instance
err – A
GError
pointer, may be NULL
- 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
self – The TcamPropertyBoolean instance
value – The new value to set.
err – A
GError
pointer, may be NULL
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¶
-
gboolean tcam_property_boolean_get_default(TcamPropertyBoolean *self, GError **err)¶
- Parameters
self – The TcamPropertyBoolean instance
err – A
GError
pointer, may be NULL
- 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.
-
type TcamPropertyInteger¶
tcam_property_integer_get_value¶
-
gint64 tcam_property_integer_get_value(TcamPropertyInteger *self, GError **err)¶
- Parameters
self – The TcamPropertyInteger instance
err – A
GError
pointer, may be NULL
- 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
self – The TcamPropertyInteger instance
value – The new value to set.
err – A
GError
pointer, may be NULL
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
self – The TcamPropertyInteger instance
err – A
GError
pointer, may be NULL
- 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
self – The TcamPropertyInteger instance
- Returns
(transfer none): String describing the property unit. The string is valid until the instance is released.
- Return values
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
self – The TcamPropertyInteger instance
- 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.
-
type TcamPropertyFloat¶
tcam_property_float_get_value¶
-
gdouble tcam_property_float_get_value(TcamPropertyFloat *self, GError **err)¶
- Parameters
self – The TcamPropertyFloat instance
err – A
GError
pointer, may be NULL
- 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
self – The TcamPropertyFloat instance
value – The new value to set.
err – A
GError
pointer, may be NULL
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
self – The TcamPropertyFloat instance
err – A
GError
pointer, may be NULL
- 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
self – The TcamPropertyFloat instance
- Returns
(transfer none): String describing the property unit. The string is valid until the instance is released.
- Return values
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
self – The TcamPropertyFloat instance
- 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.
-
type TcamPropertyEnumeration¶
tcam_property_enumeration_get_value¶
-
const gchar *tcam_property_enumeration_get_value(TcamPropertyEnumeration *self, GError **err);¶
- Parameters
self – The TcamPropertyEnumeration instance
err – A
GError
pointer, may be NULL
- 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
self – The TcamPropertyEnumeration instance
value – The new value to set
err – A
GError
pointer, may be NULL
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
self – The TcamPropertyEnumeration instance
err – A
GError
pointer, may be NULL
- Returns
(transfer full): A list of enumeration entries. All entries and the list itself must be freed by the caller.
- Return values
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
self – The TcamPropertyEnumeration instance
err – A
GError
pointer, may be NULL
- Returns
(transfer none): The default value for this property. The string is valid until this instance is released.
- Return values
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
self – The TcamPropertyInteger instance
err – A
GError
pointer, may be NULL
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¶
TcamPropertyBase
with TCAM_PROPERTY_STRING(TcamPropertyBase*).tcam_property_string_get_value¶
-
char *tcam_property_string_get_value(TcamPropertyString *self, GError **err)¶
- Parameters
self – The TcamPropertyString instance
err – A
GError
pointer, may be NULL
- 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
self – The TcamPropertyString instance
value – The new value to set.
err – A
GError
pointer, may be NULL
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¶
-
type 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¶
-
type GError¶
GObject error reporting mechanism.
TcamError
enum entry.