Common Pipeline Library Reference 7.3.2
|
Auxiliary frame data for recipe configurations. More...
Classes | |
struct | _cpl_framedata_ |
The public frame data object. More... | |
Typedefs | |
typedef struct _cpl_framedata_ | cpl_framedata |
The frame data object type. | |
Functions | |
void | cpl_framedata_clear (cpl_framedata *self) |
Clear a frame data object. | |
cpl_framedata * | cpl_framedata_create (const char *tag, cpl_size min_count, cpl_size max_count) |
Create a new frame data object and initialize it with the given values. | |
void | cpl_framedata_delete (cpl_framedata *self) |
Delete a frame data object. | |
cpl_framedata * | cpl_framedata_duplicate (const cpl_framedata *other) |
Create a duplicate of another frame data object. | |
cpl_size | cpl_framedata_get_max_count (const cpl_framedata *self) |
Get the maximum number of frames. | |
cpl_size | cpl_framedata_get_min_count (const cpl_framedata *self) |
Get the minimum number of frames. | |
const char * | cpl_framedata_get_tag (const cpl_framedata *self) |
Get the frame tag. | |
cpl_framedata * | cpl_framedata_new (void) |
Create an new frame data object. | |
cpl_error_code | cpl_framedata_set (cpl_framedata *self, const char *tag, cpl_size min_count, cpl_size max_count) |
Assign new values to a frame data object. | |
cpl_error_code | cpl_framedata_set_max_count (cpl_framedata *self, cpl_size max_count) |
Set the maximum number of frames. | |
cpl_error_code | cpl_framedata_set_min_count (cpl_framedata *self, cpl_size min_count) |
Set the minimum number of frames. | |
cpl_error_code | cpl_framedata_set_tag (cpl_framedata *self, const char *tag) |
Set the frame tag to the given value. | |
Auxiliary frame data for recipe configurations.
This module implements a frame data object, which stores auxiliary information of input and output frames of recipes. This information is used to store the frame configurations of recipes which can be queried by an application which is going to invoke the recipe.
The objects stores a frame tag, a unique identifier for a certain kind of frame, the minimum and maximum number of frames needed.
A frame is required if the data member min_count is set to a value greater than 0
. The minimum and maximum number of frames is unspecified if the respective member, min_count or max_count, is set to -1
.
The data members of this structure are public to allow for a static initialization. Any other access of the data members should still be done using the member functions.
typedef struct _cpl_framedata_ cpl_framedata |
The frame data object type.
void cpl_framedata_clear | ( | cpl_framedata * | self | ) |
Clear a frame data object.
self | The frame data object to clear. |
The function clears the contents of the frame data object self, i.e. resets the data members to their default values. If self is NULL
, nothing is done and no error is set.
Referenced by cpl_framedata_delete().
cpl_framedata * cpl_framedata_create | ( | const char * | tag, |
cpl_size | min_count, | ||
cpl_size | max_count | ||
) |
Create a new frame data object and initialize it with the given values.
tag | The frame tag initializer. |
min_count | The initial value for the minimum number of frames. |
max_count | The initial value for the maximum number of frames. |
NULL
otherwise.The function allocates the memory for a frame data object, and initializes its data members with the given values of the arguments tag, min_count, and max_count.
Referenced by cpl_recipeconfig_set_input(), cpl_recipeconfig_set_output(), and cpl_recipeconfig_set_outputs().
void cpl_framedata_delete | ( | cpl_framedata * | self | ) |
Delete a frame data object.
self | The frame data object to delete. |
The function destroys the frame data object self. All resources used by self are released. If self is NULL
, nothing is done and no error is set.
References cpl_framedata_clear().
Referenced by cpl_recipeconfig_set_input(), cpl_recipeconfig_set_inputs(), and cpl_recipeconfig_set_output().
cpl_framedata * cpl_framedata_duplicate | ( | const cpl_framedata * | other | ) |
Create a duplicate of another frame data object.
other | The frame data object to clone. |
NULL
otherwise.CPL_ERROR_NULL_INPUT | The parameter other is a NULL pointer. |
The function creates a clone of the given frame data object other. The created copy does not share any resources with the original object.
References CPL_ERROR_NULL_INPUT.
Referenced by cpl_recipeconfig_set_inputs().
cpl_size cpl_framedata_get_max_count | ( | const cpl_framedata * | self | ) |
Get the maximum number of frames.
self | The frame data object. |
-2
and an appropriate error code is set.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function returns the maximum number of frames value stored in self. If the returned value is -1
, the maximum number of frames is undefined, i.e. any number may be used.
References CPL_ERROR_NULL_INPUT.
cpl_size cpl_framedata_get_min_count | ( | const cpl_framedata * | self | ) |
Get the minimum number of frames.
self | The frame data object. |
-2
and an appropriate error code is set.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function returns the minimum number of frames value stored in self. If the returned value is -1
, the minimum number of frames is undefined, i.e. any number may be used.
References CPL_ERROR_NULL_INPUT.
const char * cpl_framedata_get_tag | ( | const cpl_framedata * | self | ) |
Get the frame tag.
self | The frame data object. |
NULL
if an error occurred.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function returns a handle to the frame tag stored in the frame data object self.
References CPL_ERROR_NULL_INPUT.
cpl_framedata * cpl_framedata_new | ( | void | ) |
Create an new frame data object.
NULL
otherwise.The function allocates the memory for a frame data object, and initializes the data members to their default values, i.e. tag is set to NULL
, and both, min_count and max_count are set to -1
.
cpl_error_code cpl_framedata_set | ( | cpl_framedata * | self, |
const char * | tag, | ||
cpl_size | min_count, | ||
cpl_size | max_count | ||
) |
Assign new values to a frame data object.
self | The frame data object. |
tag | The tag to assign. |
min_count | The value to set as minimum number of frames. |
max_count | The value to set as maximum number of frames. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_ILLEGAL_INPUT | The parameter tag is a NULL pointer or the empty string. |
The function updates the frame data object self with the given values for tag, min_count, and max_count. All previous values stored in self are replaced. The string tag is assigned by copying its contents.
References CPL_ERROR_ILLEGAL_INPUT, CPL_ERROR_NONE, and CPL_ERROR_NULL_INPUT.
cpl_error_code cpl_framedata_set_max_count | ( | cpl_framedata * | self, |
cpl_size | max_count | ||
) |
Set the maximum number of frames.
self | The frame data object. |
max_count | The value to set as maximum number of frames. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function sets the maximum number of frames value of self to max_count. If max_count is -1
the maximum number of frames is unspecified.
References CPL_ERROR_NONE, and CPL_ERROR_NULL_INPUT.
cpl_error_code cpl_framedata_set_min_count | ( | cpl_framedata * | self, |
cpl_size | min_count | ||
) |
Set the minimum number of frames.
self | The frame data object. |
min_count | The value to set as minimum number of frames. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function sets the minimum number of frames value of self to min_count. If min_count is -1
the minimum number of frames is unspecified.
References CPL_ERROR_NONE, and CPL_ERROR_NULL_INPUT.
cpl_error_code cpl_framedata_set_tag | ( | cpl_framedata * | self, |
const char * | tag | ||
) |
Set the frame tag to the given value.
self | The frame data object. |
tag | The tag to assign. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_ILLEGAL_INPUT | The parameter tag is a NULL pointer or the empty string. |
The function assigns the string tag to the corresponding data member of the frame data object self by copying its contents. Any previous tag stored in self is replaced.
References CPL_ERROR_ILLEGAL_INPUT, CPL_ERROR_NONE, and CPL_ERROR_NULL_INPUT.