Auxiliary frame data for recipe configurations.
More...
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.
- Synopsis:
#include <cpl_framedata.h>
The frame data object type.
Clear a frame data object.
- Parameters
-
self | The frame data object to clear. |
- Returns
- Nothing.
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.
Create a new frame data object and initialize it with the given values.
- Parameters
-
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. |
- Returns
- On success the function returns a pointer to the newly created object, or
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.
Delete a frame data object.
- Parameters
-
self | The frame data object to delete. |
- Returns
- Nothing.
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.
Create a duplicate of another frame data object.
- Parameters
-
other | The frame data object to clone. |
- Returns
- On success the function returns a pointer to the newly created copy of the frame data object, or
NULL
otherwise.
- Errors:
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.
Get the maximum number of frames.
- Parameters
-
self | The frame data object. |
- Returns
- The function returns the maximum number of frames on success. In case an error occurred, the return value is
-2
and an appropriate error code is set.
- Errors:
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.
Get the minimum number of frames.
- Parameters
-
self | The frame data object. |
- Returns
- The function returns the minimum number of frames on success. In case an error occurred, the return value is
-2
and an appropriate error code is set.
- Errors:
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.
Get the frame tag.
- Parameters
-
self | The frame data object. |
- Returns
- The function returns a pointer to the frame tag on success, or
NULL
if an error occurred.
- Errors:
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.
Create an new frame data object.
- Returns
- On success the function returns a pointer to the newly created object, or
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
.
Assign new values to a frame data object.
- Parameters
-
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. |
- Returns
- The function returns
CPL_ERROR_NONE
on success or a CPL error code otherwise.
- Errors:
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.
- See Also
- cpl_framedata_set_tag()
Set the maximum number of frames.
- Parameters
-
self | The frame data object. |
max_count | The value to set as maximum number of frames. |
- Returns
- The function returns
CPL_ERROR_NONE
on success or a CPL error code otherwise.
- Errors:
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.
Set the minimum number of frames.
- Parameters
-
self | The frame data object. |
min_count | The value to set as minimum number of frames. |
- Returns
- The function returns
CPL_ERROR_NONE
on success or a CPL error code otherwise.
- Errors:
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.
Set the frame tag to the given value.
- Parameters
-
self | The frame data object. |
tag | The tag to assign. |
- Returns
- The function returns
CPL_ERROR_NONE
on success or a CPL error code otherwise.
- Errors:
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.